CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxBIMDatabase.h
Go to the documentation of this file.
1//
2// (C) Copyright 2020-2023 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#include "FxBIMStringDictionary.h"
22
24
25#include <DbObject.h>
26#include <DbDatabase.h>
27
28#if !defined( FX_BIM_CONVERTERS ) && !defined( XENON ) && !defined( FXBIM_SC )
29 #include <IfcHostAppServices.h>
30
31 #if TD_VERSION >= 201000
32
33 class OdIfcFile;
35
36 #else
37
38 namespace OdIfc
39 {
40 class OdIfcFile;
42 }
43
44 #endif
45
48
49 class OdBmDatabase;
51#endif //FX_BIM_CONVERTERS
52
53class CFxBIMDatabase;
55
56class OdDbDwgFiler;
57
58#if !defined( XENON )
59 class CFxBIMIPCClient;
60#endif // !defined( XENON )
61
62enum class DisciplineType;
63
65{
66public:
67 static Error Convert( const OdString& source, Conversion& c, bool async );
68
69public:
71
72 virtual ~CFxBIMDatabase();
73
74 virtual const OdString& FileName() const;
75 virtual fileType FileType() const;
76 virtual size_t FileSize() const; //in bytes
77 virtual const OdString& FileCreator() const; //author's name
78
79 virtual CFxBIMDbIteratorRAPtr Entities(); //CFxBIMEntity
80 virtual Error AddEntity( CFxBIMEntityPtr pEntity );
81 virtual OdDbObjectId Entity( const OdString &UniqueId ) const;
82
85 virtual Error AddDiscipline( CFxBIMDisciplinePtr pDiscipline );
87
90 virtual Error AddZone( CFxBIMZonePtr pZone );
91
94 virtual Error AddSpace( CFxBIMSpacePtr pSpace );
95
98 virtual Error AddFloor( CFxBIMFloorPtr pFloor );
99
102 virtual Error AddCategory( CFxBIMCategoryPtr pCategory );
103
105
106 virtual CFxBIMDbIteratorRAPtr Models(); //CFxBIMDatabaseReference
107
108#if !defined( FX_BIM_CONVERTERS ) && !defined( XENON ) && !defined( FXBIM_SC )
109#if TD_VERSION >= 201000
110 static OdIfcFilePtr GetIFC( const OdString& fileName, OdIfcHostAppServicesPtr pIfcHAS = OdIfcHostAppServicesPtr() );
111#else
113#endif
114
115#if !defined (Q_OS_MAC) && !defined (Q_OS_LINUX)
116 static OdBmDatabasePtr GetRVT( const OdString& fileName );
117#endif
118
119 // 0 - undefined schema,
120 // 1 - 2x3 schema,
121 // 2 - 4 schema,
122 // 3 - 4x2 schema
123#if TD_VERSION >= 201000
124 static OdIfcFilePtr CreateIFC( int schema, OdIfcHostAppServicesPtr pIfcHAS = OdIfcHostAppServicesPtr() );
125#else
127#endif
128#endif
129
131 virtual OdDbObjectId GetMaterial( const OdString& name ); //CFxBIMMaterial
132 virtual Error AddMaterial( CFxBIMMaterialPtr pMaterial );
134
135public:
136 virtual OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
137 virtual void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
138
139 virtual OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
140 virtual void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
141
142protected:
144};
std::shared_ptr< CFxBIMDbIteratorRA > CFxBIMDbIteratorRAPtr
Definition: FxBIM.h:235
Error
Definition: FxBIM.h:66
std::shared_ptr< CFxBIMIteratorRA > CFxBIMIteratorRAPtr
Definition: FxBIM.h:231
fileType
Definition: FxBIM.h:102
#define FXBIM_COMMON_CODE_API
Definition: FxBIM.h:21
std::shared_ptr< CFxBIMIterator > CFxBIMIteratorPtr
Definition: FxBIM.h:229
std::shared_ptr< CFxBIMCategory > CFxBIMCategoryPtr
Definition: FxBIMCategory.h:24
OdSmartPtr< OdIfcHostAppServices > OdIfcHostAppServicesPtr
Definition: FxBIMDatabase.h:47
OdSmartPtr< OdBmDatabase > OdBmDatabasePtr
Definition: FxBIMDatabase.h:50
OdSmartPtr< CFxBIMDatabase > CFxBIMDatabasePtr
Definition: FxBIMDatabase.h:54
DisciplineType
std::shared_ptr< CFxBIMDiscipline > CFxBIMDisciplinePtr
std::shared_ptr< CFxBIMZone > CFxBIMZonePtr
Definition: FxBIMEntity.h:44
std::shared_ptr< CFxBIMSpace > CFxBIMSpacePtr
Definition: FxBIMEntity.h:47
std::shared_ptr< CFxBIMFloor > CFxBIMFloorPtr
Definition: FxBIMEntity.h:50
OdSmartPtr< OdIfcFile > OdIfcFilePtr
Definition: IfcFile.h:266
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 const OdString & FileCreator() const
virtual Error AddFloor(CFxBIMFloorPtr pFloor)
virtual CFxBIMIteratorRAPtr Zones()
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 const OdString & FileName() const
virtual Error SetDisciplineForAll(DisciplineType type, const OdString &customName=OdString::kEmpty)
static Error Convert(const OdString &source, Conversion &c, bool async)
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
virtual CFxBIMDbIteratorRAPtr Materials()
defined( FX_BIM_CONVERTERS ) && !defined( XENON ) && !defined( FXBIM_SC )
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:41