CFx SDK Documentation  2023 SP0
FxBIMDatabaseReference.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2020-2022 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "FxBIM.h"
20 
21 #include <DbObject.h>
22 #include <DoubleArray.h>
23 
26 
27 class CFxBIMDatabase;
29 
31 class OdDbDwgFiler;
32 
34 {
35 public:
37 
39 
40  static CFxBIMDatabaseReferencePtr Create( const OdString& dwgPath, const OdString& originalPath, const OdString& projectPath, Error& err );
41 
43  {
44  eMF_None = 0x0,
45  eMF_Process = 0x1,
46  eMF_Final = 0x2,
47  };
48  Error Merge( const OdString& dwgPath, int flags );
49 
50  virtual const OdString& BimFileName() const;
51  virtual const OdString& BimViewName() const;
53 
54  virtual Error CreateEntityRefs( OdDbObjectId idOwner, const OdGeMatrix3d& trf );
57 
58  virtual Error Load( bool bNotify = true );
59  virtual Error Unload();
60 
61  virtual bool IsUnloaded();
62 
63  virtual OdDouble Scale() const;
64 
65  virtual const OdGeMatrix3d& Transform() const;
66  virtual void SetTransform( const OdGeMatrix3d& transform );
67 
68  virtual size_t EntityRefCount() const;
69  virtual OdDbObjectId EntityRef( size_t index ) const; //CFxBIMEntityReference
70 
71  virtual bool IsLocked() const;
72  virtual Error Lock();
73  virtual Error Unlock();
74 
75  virtual bool IsOn() const;
76  virtual Error On();
77  virtual Error Off();
78 
79  virtual Error Insert();
80 
81  virtual Error Remove();
83 
84  enum Flags
85  {
86  eNone = 0,
87  eLoad = 0x1,
88  eMaterials = 0x2,
89  eMergeQueueFilled = 0x4,
90  eConversionFinished = 0x8,
91  };
92 
93  virtual int Flags() const;
94  virtual void SetFlags( int flags );
95 
96 public:
97  OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
98  void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
99 
100  OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
101  void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
102 
103  void subClose() override;
104 
105  void applyPartialUndo( OdDbDwgFiler* pFiler, OdRxClass* pClass ) override;
106 
107  void subHandOverTo( OdDbObject* pNewObject ) override;
108 
109 protected:
111 };
double OdDouble
Definition: DoubleArray.h:31
Error
Definition: FxBIM.h:50
#define FXBIM_API
Definition: FxBIM.h:20
OdSmartPtr< CFxBIMDatabaseReference > CFxBIMDatabaseReferencePtr
OdSmartPtr< CFxBIMDatabase > CFxBIMDatabasePtr
OdResult
Definition: OdResult.h:29
void dxfOutFields(OdDbDxfFiler *pFiler) const override
virtual const OdString & BimViewName() const
virtual Error Unload()
virtual CFxBIMDatabasePtr BimDatabase(OdDb::OpenMode openMode)
void dwgOutFields(OdDbDwgFiler *pFiler) const override
virtual void SetFlags(int flags)
virtual Error Off()
virtual int Flags() const
virtual Error CreateEntityRefs(OdDbObjectId idOwner, const OdGeMatrix3d &trf)
static CFxBIMDatabaseReferencePtr Create(const OdString &dwgPath, const OdString &originalPath, const OdString &projectPath, Error &err)
OdResult dxfInFields(OdDbDxfFiler *pFiler) override
virtual bool IsLocked() const
virtual Error Insert()
virtual Error Load(bool bNotify=true)
virtual Error On()
virtual bool IsOn() const
virtual Error ReloadFrom(CFxBIMDatabaseReferencePtr pNew, OdDbObjectId idOwner, const OdGeMatrix3d &trf)
virtual OdDbObjectId EntityRef(size_t index) const
virtual OdDouble Scale() const
virtual bool IsUnloaded()
virtual Error RemoveReferredObjectsFromGsModel()
virtual Error Lock()
virtual void SetTransform(const OdGeMatrix3d &transform)
virtual Error Remove()
Error Merge(const OdString &dwgPath, int flags)
virtual size_t EntityRefCount() const
void subHandOverTo(OdDbObject *pNewObject) override
virtual const OdString & BimFileName() const
void subClose() override
void applyPartialUndo(OdDbDwgFiler *pFiler, OdRxClass *pClass) override
virtual const OdGeMatrix3d & Transform() const
OdResult dwgInFields(OdDbDwgFiler *pFiler) override
ODDB_DECLARE_MEMBERS(CFxBIMDatabaseReference)
virtual Error DestroyEntityRefs()
virtual ~CFxBIMDatabaseReference()
virtual Error Unlock()
GLuint index
Definition: gles2_ext.h:265
OpenMode
Definition: DbObjectId.h:54