CFx SDK Documentation  2022 SP0
FxBIMDatabase.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 #include "FxBIMEntity.h"
21 
22 #include "FxBIMDatabaseReference.h"
23 
24 #include <DbObject.h>
25 #include <DbDatabase.h>
26 #include <IfcHostAppServices.h>
27 
28 class CFxBIMDatabase;
30 
31 class OdDbDwgFiler;
32 
33 #if TD_VERSION >= 201000
34 
35 class OdIfcFile;
37 
38 #else
39 
40 namespace OdIfc
41 {
42  class OdIfcFile;
44 }
45 
46 #endif
47 
50 
51 class OdBmDatabase;
53 
54 enum class DisciplineType;
55 
57 {
58 public:
59  static Error Convert( const OdString& source, Conversion c, bool async );
60 
61 public:
63 
64  virtual ~CFxBIMDatabase();
65 
66  virtual const OdString& FileName() const;
67  virtual fileType FileType() const;
68  virtual size_t FileSize() const; //in bytes
69  virtual const OdString& FileCreator() const; //author's name
70 
71  virtual CFxBIMDbIteratorRAPtr Entities(); //CFxBIMEntity
72  virtual Error AddEntity( CFxBIMEntityPtr pEntity );
73  virtual OdDbObjectId Entity( const OdString &UniqueId ) const;
74 
77  virtual Error AddDiscipline( CFxBIMDisciplinePtr pDiscipline );
79 
81  virtual CFxBIMZonePtr GetZone( const OdString& name );
82  virtual Error AddZone( CFxBIMZonePtr pZone );
83 
85  virtual CFxBIMSpacePtr GetSpace( const OdString& name );
86  virtual Error AddSpace( CFxBIMSpacePtr pSpace );
87 
89  virtual CFxBIMFloorPtr GetFloor( const OdString& name );
90  virtual Error AddFloor( CFxBIMFloorPtr pFloor );
91 
94  virtual Error AddCategory( CFxBIMCategoryPtr pCategory );
95 
97 
98  virtual CFxBIMDbIteratorRAPtr Models(); //CFxBIMDatabaseReference
99 #if TD_VERSION >= 201000
100  static OdIfcFilePtr GetIFC( const OdString& fileName, OdIfcHostAppServicesPtr pIfcHAS = OdIfcHostAppServicesPtr() );
101 #else
103 #endif
104 
105 #if !defined (Q_OS_MAC) && !defined (Q_OS_LINUX)
106  static OdBmDatabasePtr GetRVT( const OdString& fileName );
107 #endif
108 
109  // 0 - undefined schema,
110  // 1 - 2x3 schema,
111  // 2 - 4 schema,
112  // 3 - 4x2 schema
113 #if TD_VERSION >= 201000
114  static OdIfcFilePtr CreateIFC( int schema, OdIfcHostAppServicesPtr pIfcHAS = OdIfcHostAppServicesPtr() );
115 #else
117 #endif
118 
120  virtual OdDbObjectId GetMaterial( const OdString& name ); //CFxBIMMaterial
121  virtual Error AddMaterial( CFxBIMMaterialPtr pMaterial );
122  virtual Error RemoveMaterial( CFxBIMMaterialPtr pMaterial );
123 
124 public:
125  virtual OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
126  virtual void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
127 
128  virtual OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
129  virtual void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
130 
131 protected:
133 };
std::shared_ptr< CFxBIMDbIteratorRA > CFxBIMDbIteratorRAPtr
Definition: FxBIM.h:187
Error
Definition: FxBIM.h:44
std::shared_ptr< CFxBIMIteratorRA > CFxBIMIteratorRAPtr
Definition: FxBIM.h:183
#define FXBIM_API
Definition: FxBIM.h:20
fileType
Definition: FxBIM.h:72
std::shared_ptr< CFxBIMIterator > CFxBIMIteratorPtr
Definition: FxBIM.h:181
std::shared_ptr< CFxBIMCategory > CFxBIMCategoryPtr
Definition: FxBIMCategory.h:23
OdSmartPtr< OdIfcHostAppServices > OdIfcHostAppServicesPtr
Definition: FxBIMDatabase.h:48
OdSmartPtr< OdBmDatabase > OdBmDatabasePtr
Definition: FxBIMDatabase.h:51
OdSmartPtr< CFxBIMDatabase > CFxBIMDatabasePtr
Definition: FxBIMDatabase.h:28
DisciplineType
std::shared_ptr< CFxBIMDiscipline > CFxBIMDisciplinePtr
std::shared_ptr< CFxBIMZone > CFxBIMZonePtr
Definition: FxBIMEntity.h:37
std::shared_ptr< CFxBIMSpace > CFxBIMSpacePtr
Definition: FxBIMEntity.h:40
std::shared_ptr< CFxBIMFloor > CFxBIMFloorPtr
Definition: FxBIMEntity.h:43
OdResult
Definition: OdResult.h:29
virtual CFxBIMIteratorPtr Types()
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const override
virtual CFxBIMCategoryPtr GetCategory(const OdString &name)
virtual size_t FileSize() const
virtual Error RemoveMaterial(CFxBIMMaterialPtr pMaterial)
virtual Error AddDiscipline(CFxBIMDisciplinePtr pDiscipline)
virtual CFxBIMZonePtr GetZone(const OdString &name)
virtual Error AddFloor(CFxBIMFloorPtr pFloor)
virtual const OdString & FileCreator() const
virtual CFxBIMIteratorRAPtr Zones()
virtual const OdString & FileName() const
virtual ~CFxBIMDatabase()
virtual OdDbObjectId GetMaterial(const OdString &name)
virtual Error AddCategory(CFxBIMCategoryPtr pCategory)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const override
virtual CFxBIMIteratorRAPtr Spaces()
virtual Error AddMaterial(CFxBIMMaterialPtr pMaterial)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler) override
virtual CFxBIMDisciplinePtr GetDiscipline(const OdString &name)
virtual Error SetDisciplineForAll(DisciplineType type, const OdString &customName=OdString::kEmpty)
static OdIfc::OdIfcFilePtr GetIFC(const OdString &fileName, OdIfcHostAppServicesPtr pIfcHAS=OdIfcHostAppServicesPtr())
virtual CFxBIMDbIteratorRAPtr Models()
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler) override
virtual OdDbObjectId Entity(const OdString &UniqueId) const
virtual CFxBIMIteratorRAPtr Floors()
static OdBmDatabasePtr GetRVT(const OdString &fileName)
virtual Error AddSpace(CFxBIMSpacePtr pSpace)
ODDB_DECLARE_MEMBERS(CFxBIMDatabase)
virtual fileType FileType() const
static Error Convert(const OdString &source, Conversion c, bool async)
virtual CFxBIMDbIteratorRAPtr Materials()
static OdIfc::OdIfcFilePtr CreateIFC(int schema, OdIfcHostAppServicesPtr pIfcHAS=OdIfcHostAppServicesPtr())
virtual CFxBIMDbIteratorRAPtr Entities()
virtual CFxBIMIteratorRAPtr Disciplines()
virtual Error AddZone(CFxBIMZonePtr pZone)
virtual Error AddEntity(CFxBIMEntityPtr pEntity)
virtual CFxBIMSpacePtr GetSpace(const OdString &name)
virtual CFxBIMFloorPtr GetFloor(const OdString &name)
virtual CFxBIMIteratorRAPtr Categories()
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLsizei GLsizei GLchar * source
Definition: gles2_ext.h:282
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdSmartPtr< OdIfcFile > OdIfcFilePtr
Definition: FxBIMDatabase.h:42