CFx SDK Documentation  2023 SP0
IfcModel.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2019, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Open Design Alliance software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Open Design Alliance Copyright (C) 2002-2019 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _IFC_MODEL_H_
25 #define _IFC_MODEL_H_
26 
27 #include "daiModule.h"
28 #include "daiObjectId.h"
29 #include "daiSchema.h"
30 #include "daiModel.h"
31 
32 #include "IfcCore.h"
33 #include "IfcGUID.h"
34 #include "IfcSchemaModule.h"
35 #include "IfcEntity.h"
36 #include "IfcModelContext.h"
37 
38 #include "IfcGeomModule.h"
39 
43 namespace OdIfc {
44 
45 class OdIfcEntResolver;
46 
51 {
52 public:
53 
54  //DOM-IGNORE-BEGIN
56  //DOM-IGNORE-END
57 
62 
67 
72  void setResolver(OdIfcEntResolver *pEntResolver);
73 
80  void setProjectId(OdDAIObjectId projectId);
81 
87 
94 
100  OdIfcEntityPtr get(const OdDAIObjectId id) const;
101 
108 
116 
117  bool getContextSelected(const OdDAIObjectId &h) const;
118 
129 
138  OdIfcEntityPtr createEntityInstanceBT(OdIfcEntityType entityType);
139 
145 
150  void setContext(const OdIfcModelContext& context);
151 
152 //DOM-IGNORE-BEGIN
153 protected:
154 
156  virtual void subInitialize();
157 
158 private:
159 
160  //OdIfcGeomModulePtr m_geom;
161 
162  OdIfcGeomModulePtr m_pGeom;
163  OdIfcEntResolver *m_pEntResolver;
164  OdIfcModelContext m_context;
165  OdDAIObjectIds m_selContexts;
166 //DOM-IGNORE-END
167 };
168 
173 
178 {
179 //DOM-IGNORE-BEGIN
180 protected:
181 
183 
184  void assignEntity(OdIfcCompoundPtr pComplex, OdIfcEntity *pInst);
185 //DOM-IGNORE-END
186 
187 public:
188 
192  virtual ~OdIfcEntResolver() {};
193 
198  void setModel(OdIfcModel *pModel) { m_pModel = pModel; };
199 
206  virtual bool resolve(OdIfcEntityPtr pEntity, OdDbHandle h) = 0;
207 };
208 
209 }
210 
211 #endif // _IFC_MODEL_H_
#define IFCCORE_EXPORT
OdResult
Definition: OdResult.h:29
OdIfcModel * m_pModel
Definition: IfcModel.h:182
virtual bool resolve(OdIfcEntityPtr pEntity, OdDbHandle h)=0
void setModel(OdIfcModel *pModel)
Definition: IfcModel.h:198
virtual ~OdIfcEntResolver()
Definition: IfcModel.h:192
void assignEntity(OdIfcCompoundPtr pComplex, OdIfcEntity *pInst)
OdDAIObjectId getProjectId()
OdResult setContextSelection(const OdDAIObjectIds &contexts)
OdResult setGeomResource()
ODRX_DECLARE_MEMBERS(OdIfcModel)
OdIfcModelContext getContext() const
OdResult get(const OdArray< OdDAIObjectId > &ids) const
OdIfcEntityPtr get(const OdDAIObjectId id) const
OdResult getGeomExtents(OdGeExtents3d &ext) const
void setResolver(OdIfcEntResolver *pEntResolver)
OdIfcEntityPtr createEntityInstanceBT(OdIfcEntityType entityType)
virtual void subInitialize()
bool getContextSelected(const OdDAIObjectId &h) const
void setContext(const OdIfcModelContext &context)
void setProjectId(OdDAIObjectId projectId)
OdSmartPtr< OdIfcModel > OdIfcModelPtr
Definition: IfcModel.h:172