CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxBIMStorage.h
Go to the documentation of this file.
1//
2// (C) Copyright 2020-2025 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
23#include <vector>
24#include <map>
25
26class CFxBIMStorage;
28
31
32class CFxBIMDrawing;
33typedef std::shared_ptr< CFxBIMDrawing > CFxBIMDrawingPtr;
34
35class CFxBIMSection;
37
38class CFxBIMDatabase;
40
42{
43public:
44 static CFxBIMStoragePtr GetStorage( OdDbDatabase* pDatabase, OdDb::OpenMode eMode = OdDb::kForRead, bool bCreateIfNotExist = false );
45
46public:
48
49 virtual ~CFxBIMStorage();
50
53
54 virtual CFxBIMDbIteratorRAPtr DatabaseRefs() const; //CFxBIMDatabaseReference
56
57 virtual Error AddSection( OdDbObjectId idSection );
58 virtual Error RemoveSection( OdDbObjectId idSection );
59 virtual OdDbObjectId FindSection( const OdString& name ) const;
60
61 virtual CFxBIMDbIteratorRAPtr Sections() const; //CFxBIMSection
62
63 virtual CFxBIMIteratorPtr Disciplines( OdDb::OpenMode openMode ) const;
64 virtual CFxBIMIteratorPtr Zones( OdDb::OpenMode openMode ) const;
65 virtual CFxBIMIteratorPtr Spaces( OdDb::OpenMode openMode ) const;
66 virtual CFxBIMIteratorPtr Floors( OdDb::OpenMode openMode ) const;
68 virtual CFxBIMIteratorPtr Categories( OdDb::OpenMode openMode ) const;
69 virtual CFxBIMIteratorPtr Types( OdDb::OpenMode openMode ) const;
71
72 virtual CFxBIMDbIteratorPtr Entities( OdDb::OpenMode openMode ) const;
74
75 virtual Error AddReactor( CFxBIMObjectPtr p ) const; //CFxBIMDatabaseReferenceReactor, CFxBIMSectionReactor, CFxBIMMaterialReactor, etc.
77
78 virtual CFxBIMDbIteratorPtr Materials( OdDb::OpenMode openMode ) const;
79
80 virtual const std::vector< CFxBIMDrawingPtr >& BimDrawings( CFxBIMSectionPtr pS ) const;
81 virtual std::vector< CFxBIMDrawingPtr >& BimDrawings( CFxBIMSectionPtr pS );
82
83 using drawings_map = std::map< OdDbHandle, std::vector< CFxBIMDrawingPtr > >; //CFxBIMSection to bim drawings
84 virtual const drawings_map& BimDrawings() const;
86
87 enum
88 {
93 };
94 virtual int Flags() const;
95 virtual void SetFlags( int flags );
96
97public:
98 OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
99 void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
100
101 OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
102 void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
103
104 void subClose() override;
105
106 void audit( OdDbAuditInfo* pAuditInfo ) override;
107
108 void applyPartialUndo( OdDbDwgFiler* pFiler, OdRxClass* pClass ) override;
109
110protected:
112};
std::shared_ptr< CFxBIMDbIterator > CFxBIMDbIteratorPtr
Definition FxBIM.h:145
std::shared_ptr< CFxBIMDbIteratorRA > CFxBIMDbIteratorRAPtr
Definition FxBIM.h:147
Error
Definition FxBIM.h:40
std::shared_ptr< CFxBIMObject > CFxBIMObjectPtr
Definition FxBIM.h:112
std::shared_ptr< CFxBIMIterator > CFxBIMIteratorPtr
Definition FxBIM.h:141
OdSmartPtr< CFxBIMDatabase > CFxBIMDatabasePtr
OdSmartPtr< CFxBIMDatabaseReference > CFxBIMDatabaseReferencePtr
#define FXBIM_API
Definition FxBIMDefs.h:4
OdSmartPtr< CFxBIMSection > CFxBIMSectionPtr
std::shared_ptr< CFxBIMDrawing > CFxBIMDrawingPtr
OdSmartPtr< CFxBIMStorage > CFxBIMStoragePtr
Definition FxBIMProject.h:6
OdResult
Definition OdResult.h:29
virtual CFxBIMDbIteratorPtr Entities(OdDb::OpenMode openMode) const
virtual const drawings_map & BimDrawings() const
virtual Error RemoveDatabaseRef(CFxBIMDatabaseReferencePtr pBimDbRef)
virtual ~CFxBIMStorage()
virtual Error RemoveSection(OdDbObjectId idSection)
virtual drawings_map & BimDrawings()
OdResult dwgInFields(OdDbDwgFiler *pFiler) override
void dwgOutFields(OdDbDwgFiler *pFiler) const override
virtual CFxBIMDbIteratorPtr EntityRefs(OdDb::OpenMode openMode) const
void dxfOutFields(OdDbDxfFiler *pFiler) const override
void applyPartialUndo(OdDbDwgFiler *pFiler, OdRxClass *pClass) override
void audit(OdDbAuditInfo *pAuditInfo) override
virtual CFxBIMIteratorPtr Floors(OdDb::OpenMode openMode) const
virtual CFxBIMDbIteratorPtr Materials(OdDb::OpenMode openMode) const
virtual std::vector< CFxBIMDrawingPtr > & BimDrawings(CFxBIMSectionPtr pS)
virtual Error AddSection(OdDbObjectId idSection)
OdResult dxfInFields(OdDbDxfFiler *pFiler) override
virtual OdDbObjectId FindSection(const OdString &name) const
static CFxBIMStoragePtr GetStorage(OdDbDatabase *pDatabase, OdDb::OpenMode eMode=OdDb::kForRead, bool bCreateIfNotExist=false)
virtual Error AddDatabaseRef(CFxBIMDatabaseReferencePtr pBimDbRef)
CFxBIMIteratorPtr Buildings(OdDb::OpenMode openMode) const
virtual CFxBIMDbIteratorRAPtr Sections() const
virtual CFxBIMDbIteratorRAPtr DatabaseRefs() const
virtual Error RemoveReactor(CFxBIMObjectPtr p) const
void subClose() override
virtual CFxBIMDatabaseReferencePtr DatabaseRef(CFxBIMDatabasePtr pBimDb) const
virtual Error AddReactor(CFxBIMObjectPtr p) const
ODDB_DECLARE_MEMBERS(CFxBIMStorage)
virtual CFxBIMIteratorPtr Types(OdDb::OpenMode openMode) const
virtual const std::vector< CFxBIMDrawingPtr > & BimDrawings(CFxBIMSectionPtr pS) const
CFxBIMDbIteratorPtr Levels(OdDb::OpenMode openMode) const
virtual CFxBIMIteratorPtr Zones(OdDb::OpenMode openMode) const
virtual CFxBIMIteratorPtr Spaces(OdDb::OpenMode openMode) const
virtual CFxBIMIteratorPtr Disciplines(OdDb::OpenMode openMode) const
virtual void SetFlags(int flags)
virtual CFxBIMIteratorPtr Categories(OdDb::OpenMode openMode) const
std::map< OdDbHandle, std::vector< CFxBIMDrawingPtr > > drawings_map
virtual int Flags() const
GLuint const GLchar * name
Definition gles2_ext.h:265
@ kForRead
Definition DbObjectId.h:56