CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxBIMStorage.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
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;
67 virtual CFxBIMIteratorPtr Categories( OdDb::OpenMode openMode ) const;
68 virtual CFxBIMIteratorPtr Types( OdDb::OpenMode openMode ) const;
69
70 virtual CFxBIMDbIteratorPtr Entities( OdDb::OpenMode openMode ) const;
72
73 virtual Error AddReactor( CFxBIMObjectPtr p ) const; //CFxBIMDatabaseReferenceReactor, CFxBIMSectionReactor, CFxBIMMaterialReactor, etc.
75
76 virtual CFxBIMDbIteratorPtr Materials( OdDb::OpenMode openMode ) const;
77
78 virtual const std::vector< CFxBIMDrawingPtr >& BimDrawings( CFxBIMSectionPtr pS ) const;
79 virtual std::vector< CFxBIMDrawingPtr >& BimDrawings( CFxBIMSectionPtr pS );
80
81 using drawings_map = std::map< OdDbHandle, std::vector< CFxBIMDrawingPtr > >; //CFxBIMSection to bim drawings
82 virtual const drawings_map& BimDrawings() const;
84
85 enum
86 {
87 eModifyUnlocked = 0x1,
88 eMainDatabase = 0x2,
89 eFlatshotDatabase = 0x4,
90 };
91 virtual int Flags() const;
92 virtual void SetFlags( int flags );
93
94public:
95 OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
96 void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
97
98 OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
99 void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
100
101 void subClose() override;
102
103 void audit( OdDbAuditInfo* pAuditInfo ) override;
104
105protected:
107};
std::shared_ptr< CFxBIMDbIterator > CFxBIMDbIteratorPtr
Definition: FxBIM.h:233
std::shared_ptr< CFxBIMDbIteratorRA > CFxBIMDbIteratorRAPtr
Definition: FxBIM.h:235
Error
Definition: FxBIM.h:66
#define FXBIM_API
Definition: FxBIM.h:20
std::shared_ptr< CFxBIMObject > CFxBIMObjectPtr
Definition: FxBIM.h:200
std::shared_ptr< CFxBIMIterator > CFxBIMIteratorPtr
Definition: FxBIM.h:229
OdSmartPtr< CFxBIMSection > CFxBIMSectionPtr
Definition: FxBIMStorage.h:36
OdSmartPtr< CFxBIMStorage > CFxBIMStoragePtr
Definition: FxBIMStorage.h:27
OdSmartPtr< CFxBIMDatabaseReference > CFxBIMDatabaseReferencePtr
Definition: FxBIMStorage.h:30
OdSmartPtr< CFxBIMDatabase > CFxBIMDatabasePtr
Definition: FxBIMStorage.h:39
std::shared_ptr< CFxBIMDrawing > CFxBIMDrawingPtr
Definition: FxBIMStorage.h:33
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 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)
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
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
Definition: FxBIMStorage.h:81
virtual int Flags() const
GLuint const GLchar * name
Definition: gles2_ext.h:265
OpenMode
Definition: DbObjectId.h:54
@ kForRead
Definition: DbObjectId.h:56