CFx SDK Documentation  2022 SP0
FxBIMDatabaseReference.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2020-2021 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 
25 
26 class CFxBIMDatabase;
28 
30 class OdDbDwgFiler;
31 
33 {
34 public:
36 
38 
39  static CFxBIMDatabaseReferencePtr Create( const OdString& dwgPath, const OdString& originalPath, Error& err );
40 
42  {
43  eMF_None = 0x0,
44  eMF_Process = 0x1,
45  eMF_Final = 0x2,
46  };
47  Error Merge( const OdString& dwgPath, int flags );
48 
49  virtual const OdString& BimFileName() const;
50  virtual const OdString& BimViewName() const;
52 
53  virtual Error CreateEntityRefs( OdDbObjectId idOwner, const OdGeMatrix3d& trf );
56 
57  virtual Error Load();
58  virtual Error Unload();
59 
60  virtual bool IsUnloaded();
61 
62  virtual const OdGeMatrix3d& Transform() const;
63  virtual void SetTransform( const OdGeMatrix3d& transform );
64 
65  virtual size_t EntityRefCount() const;
66  virtual OdDbObjectId EntityRef( size_t index ) const; //CFxBIMEntityReference
67 
68  virtual bool IsLocked() const;
69  virtual Error Lock();
70  virtual Error Unlock();
71 
72  virtual bool IsOn() const;
73  virtual Error On();
74  virtual Error Off();
75 
76  virtual Error Insert();
77 
78  virtual Error Remove();
80 
81  enum Flags
82  {
83  eNone = 0,
84  eLoad = 0x1,
85  eMaterials = 0x2,
86  eMergeQueueFilled = 0x4,
87  eConversionFinished = 0x8,
88  };
89 
90  virtual int Flags() const;
91  virtual void SetFlags( int flags );
92 
93 public:
94  OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
95  void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
96 
97  OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
98  void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
99 
100  void subClose() override;
101 
102  void applyPartialUndo( OdDbDwgFiler* pFiler, OdRxClass* pClass ) override;
103 
104  void subHandOverTo( OdDbObject* pNewObject ) override;
105 
106 protected:
108 };
Error
Definition: FxBIM.h:44
#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)
OdResult dxfInFields(OdDbDxfFiler *pFiler) override
virtual bool IsLocked() const
virtual Error Insert()
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 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
static CFxBIMDatabaseReferencePtr Create(const OdString &dwgPath, const OdString &originalPath, Error &err)
virtual const OdString & BimFileName() const
void subClose() override
void applyPartialUndo(OdDbDwgFiler *pFiler, OdRxClass *pClass) override
virtual Error Load()
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