CFx SDK Documentation  2020SP3
FxBIMEntity.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "FxBIM.h"
4 
5 #include <DbObject.h>
6 #include <Ge/GeVector3d.h>
7 
8 #include <map>
9 
10 class CFxBIMEntity;
12 
13 class CFxBIMDatabase;
15 
16 class CFxBIMDiscipline;
17 typedef std::shared_ptr< CFxBIMDiscipline > CFxBIMDisciplinePtr;
18 
19 class CFxBIMZone;
20 typedef std::shared_ptr< CFxBIMZone > CFxBIMZonePtr;
21 
22 class CFxBIMSpace;
23 typedef std::shared_ptr< CFxBIMSpace > CFxBIMSpacePtr;
24 
25 class CFxBIMFloor;
26 typedef std::shared_ptr< CFxBIMFloor > CFxBIMFloorPtr;
27 
28 class CFxBIMCategory;
29 typedef std::shared_ptr< CFxBIMCategory > CFxBIMCategoryPtr;
30 
31 class CFxBIMType;
32 typedef std::shared_ptr< CFxBIMType > CFxBIMTypePtr;
33 
34 class CFxBIMProperty;
35 typedef std::shared_ptr< CFxBIMProperty > CFxBIMPropertyPtr;
36 
37 class CFxBIMMaterial;
39 
40 class OdDbDwgFiler;
41 
43 {
44 public:
46 
47  virtual ~CFxBIMEntity();
48 
49  virtual bool IsEqual( CFxBIMEntityPtr p ) const;
50 
53  virtual const std::vector< CFxBIMZonePtr >& Zones() const;
54  virtual void Zones( const std::vector< CFxBIMZonePtr >& zones );
55  virtual CFxBIMSpacePtr Space() const;
56  virtual void SetSpace( CFxBIMSpacePtr p );
57  virtual CFxBIMFloorPtr Floor() const;
58  virtual void SetFloor( CFxBIMFloorPtr p );
59  virtual CFxBIMCategoryPtr Category() const;
60  virtual void SetCategory( CFxBIMCategoryPtr p );
61  virtual CFxBIMTypePtr Type() const;
62  virtual void SetType( CFxBIMTypePtr p );
63 
64  virtual const OdGeMatrix3d& OriginalTransform() const;
65  virtual std::vector< CFxBIMPropertyPtr >& Properties();
66 
68  {
70  {
72  ePlan
73  };
75  {
85  eUnset
86  };
87 
88  static TargetView s2e( const OdString &s );
89  static OdString e2s( const TargetView &e );
90  static std::vector<TargetView> fromDirection( const OdGeVector3d &direction );
91 
92  static GeometryView Plan( const OdString &name = OdString() );
93  static GeometryView Ceiling( const OdString &name = OdString() );
94  static GeometryView Section( const OdString &name = OdString() );
96  static GeometryView Unset();
97 
99  Representation representation = eModel,
100  TargetView targetView = eMODEL_VIEW,
101  const OdString &name = OdString());
102 
103  void setTargetView( const OdString &s );
104  bool operator<( const GeometryView &r ) const;
105  bool isModel() const;
106  bool isUnset() const;
107  void reset();
108 
112  };
113 
115  {
116  std::map<GeometryView, std::map<OdString, OdDbObjectId>> data;
117 
118  OdInt64 size() const;
119  bool hasPlanView() const;
120 
121  std::map<OdString, GeometryView> views(const GeometryView::TargetView &view) const;
122  std::map<OdString, GeometryView> views(const OdGeVector3d &direction) const;
123 
126  OdDbObjectIdArray get( const OdGeVector3d &direction ) const;
127 
128  void add( const GeometryView &view, const OdDbObjectId &block );
129  };
130 
132  {
140  ePlumbingFixtures
141  };
142 
143  virtual OdDbObjectId Generate2dGeometry( const OdGeVector3d &direction );
145 
146  virtual std::map<OdString, GeometryView> Views(const OdGeVector3d &direction) const;
147 
148  // Get all blocks from all views that match *direction*
149  virtual OdDbObjectIdArray Geometry( const OdGeVector3d &direction ) const;
150 
151  // Get a block corresponding to *view*. If *view* is not specified, the
152  // block corresponding to the model will be returned.
153  virtual OdDbObjectId Geometry( const GeometryView &view = GeometryView() ) const; //OdDbBlockTableRecord
154 
155  virtual ElementType GetElementType() const;
156 
157  virtual OdDbHandle OriginalHandle() const;
158 
159 public:
160  virtual OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
161  virtual void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
162 
163  virtual OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
164  virtual void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
165 
166 protected:
168 };
OdResult
OdResult
Definition: OdResult.h:29
CFxBIMEntity::GeometryContainer::get
OdDbObjectId get(const GeometryView &view=CFxBIMEntity::GeometryView()) const
CFxBIMCategoryPtr
std::shared_ptr< CFxBIMCategory > CFxBIMCategoryPtr
Definition: FxBIMEntity.h:28
CFxBIMType
Definition: FxBIMType.h:14
OdGeVector3d
Definition: GeVector3d.h:54
OdString
Definition: OdString.h:95
CFxBIMEntity::GeometryView::eUSERDEFINED
@ eUSERDEFINED
Definition: FxBIMEntity.h:83
CFxBIMEntity::GetElementType
virtual ElementType GetElementType() const
CFxBIMEntity::GeometryView::Plan
static GeometryView Plan(const OdString &name=OdString())
CFxBIMSpacePtr
std::shared_ptr< CFxBIMSpace > CFxBIMSpacePtr
Definition: FxBIMEntity.h:22
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
CFxBIMEntity::SetType
virtual void SetType(CFxBIMTypePtr p)
OdInt64
Definition: Int64.h:43
CFxBIMEntity::GeometryView::eMODEL_VIEW
@ eMODEL_VIEW
Definition: FxBIMEntity.h:78
CFxBIMEntity::GeometryView::eModel
@ eModel
Definition: FxBIMEntity.h:71
CFxBIMEntity::GeometryContainer::add
void add(const GeometryView &view, const OdDbObjectId &block)
CFxBIMEntity::eUnspecified
@ eUnspecified
Definition: FxBIMEntity.h:133
DbObject.h
CFxBIMZonePtr
std::shared_ptr< CFxBIMZone > CFxBIMZonePtr
Definition: FxBIMEntity.h:19
CFxBIMEntity::GeometryView::eNOTDEFINED
@ eNOTDEFINED
Definition: FxBIMEntity.h:84
CFxBIMEntity::~CFxBIMEntity
virtual ~CFxBIMEntity()
CFxBIMTypePtr
std::shared_ptr< CFxBIMType > CFxBIMTypePtr
Definition: FxBIMCategory.h:10
CFxBIMEntity::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler) override
CFxBIMMaterial
Definition: FxBIMMaterial.h:14
CFxBIMEntity::GeometryView::representation
Representation representation
Definition: FxBIMEntity.h:109
OdDbObjectId
Definition: DbObjectId.h:99
CFxBIMEntity::GeometryContainer::get
OdDbObjectIdArray get(const GeometryView::TargetView &view) const
CFxBIMEntity::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const override
CFxBIMEntity::GeometryView::e2s
static OdString e2s(const TargetView &e)
CFxBIMEntity::SetSpace
virtual void SetSpace(CFxBIMSpacePtr p)
CFxBIMCategory
Definition: FxBIMCategory.h:14
CFxBIMEntity::IsEqual
virtual bool IsEqual(CFxBIMEntityPtr p) const
OdArray< OdDbObjectId, OdMemoryAllocator< OdDbObjectId > >
FXBIM_API
#define FXBIM_API
Definition: FxBIM.h:4
CFxBIMEntity::GeometryView::eELEVATION_VIEW
@ eELEVATION_VIEW
Definition: FxBIMEntity.h:82
CFxBIMEntity::OriginalHandle
virtual OdDbHandle OriginalHandle() const
OdGeMatrix3d
Definition: GeMatrix3d.h:73
CFxBIMEntity::GeometryView::eSECTION_VIEW
@ eSECTION_VIEW
Definition: FxBIMEntity.h:81
CFxBIMCategoryPtr
std::shared_ptr< CFxBIMCategory > CFxBIMCategoryPtr
Definition: FxBIMCategory.h:7
CFxBIMEntity::Generate2dGeometry
virtual OdDbObjectId Generate2dGeometry(const GeometryView::TargetView &view)
CFxBIMDatabase
Definition: FxBIMDatabase.h:40
CFxBIMEntity::Discipline
virtual CFxBIMDisciplinePtr Discipline() const
CFxBIMEntity::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(CFxBIMEntity)
CFxBIMEntity::eFloor
@ eFloor
Definition: FxBIMEntity.h:137
CFxBIMEntity::Category
virtual CFxBIMCategoryPtr Category() const
CFxBIMEntity::ElementType
ElementType
Definition: FxBIMEntity.h:132
OdString
OdString OdString
Definition: OdString.h:1224
CFxBIMSpace
Definition: FxBIMSpace.h:14
OdSmartPtr
Definition: SmartPtr.h:58
CFxBIMEntity::GeometryContainer::data
std::map< GeometryView, std::map< OdString, OdDbObjectId > > data
Definition: FxBIMEntity.h:116
CFxBIMEntity::GeometryContainer
Definition: FxBIMEntity.h:115
CFxBIMEntity::GeometryView::isUnset
bool isUnset() const
CFxBIMEntityPtr
OdSmartPtr< CFxBIMEntity > CFxBIMEntityPtr
Definition: FxBIMEntity.h:10
CFxBIMFloor
Definition: FxBIMFloor.h:11
CFxBIMMaterialPtr
OdSmartPtr< CFxBIMMaterial > CFxBIMMaterialPtr
Definition: FxBIMEntity.h:37
CFxBIMEntity::Floor
virtual CFxBIMFloorPtr Floor() const
CFxBIMDatabasePtr
OdSmartPtr< CFxBIMDatabase > CFxBIMDatabasePtr
Definition: FxBIMEntity.h:13
CFxBIMEntity::Zones
virtual const std::vector< CFxBIMZonePtr > & Zones() const
CFxBIMEntity::SetFloor
virtual void SetFloor(CFxBIMFloorPtr p)
CFxBIMEntity::GeometryView::Section
static GeometryView Section(const OdString &name=OdString())
CFxBIMDisciplinePtr
std::shared_ptr< CFxBIMDiscipline > CFxBIMDisciplinePtr
Definition: FxBIMEntity.h:16
CFxBIMEntity::Space
virtual CFxBIMSpacePtr Space() const
CFxBIMEntity::GeometryView::fromDirection
static std::vector< TargetView > fromDirection(const OdGeVector3d &direction)
CFxBIMEntity::GeometryView::Elevation
static GeometryView Elevation(const OdString &name=OdString())
CFxBIMEntity::GeometryView::TargetView
TargetView
Definition: FxBIMEntity.h:75
CFxBIMEntity::GeometryView::Unset
static GeometryView Unset()
OdDbDxfFiler
Definition: DbFiler.h:194
CFxBIMEntity::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const override
CFxBIMEntity::SetDiscipline
virtual void SetDiscipline(CFxBIMDisciplinePtr p)
CFxBIMFloorPtr
std::shared_ptr< CFxBIMFloor > CFxBIMFloorPtr
Definition: FxBIMEntity.h:25
CFxBIMEntity::GeometryView::ePLAN_VIEW
@ ePLAN_VIEW
Definition: FxBIMEntity.h:79
CFxBIMProperty
Definition: FxBIMProperty.h:11
GeVector3d.h
CFxBIMEntity::eWall
@ eWall
Definition: FxBIMEntity.h:139
CFxBIMEntity::Type
virtual CFxBIMTypePtr Type() const
CFxBIMEntity::SetCategory
virtual void SetCategory(CFxBIMCategoryPtr p)
CFxBIMEntity::GeometryView::s2e
static TargetView s2e(const OdString &s)
CFxBIMEntity::eCeiling
@ eCeiling
Definition: FxBIMEntity.h:138
CFxBIMEntity::GeometryView::Ceiling
static GeometryView Ceiling(const OdString &name=OdString())
CFxBIMEntity::GeometryContainer::hasPlanView
bool hasPlanView() const
CFxBIMEntity::GeometryContainer::size
OdInt64 size() const
CFxBIMEntity::GeometryView::operator<
bool operator<(const GeometryView &r) const
CFxBIMPropertyPtr
std::shared_ptr< CFxBIMProperty > CFxBIMPropertyPtr
Definition: FxBIMEntity.h:34
FxBIM.h
CFxBIMEntity::Zones
virtual void Zones(const std::vector< CFxBIMZonePtr > &zones)
CFxBIMEntity::GeometryView::targetView
TargetView targetView
Definition: FxBIMEntity.h:110
CFxBIMDisciplinePtr
std::shared_ptr< CFxBIMDiscipline > CFxBIMDisciplinePtr
Definition: FxBIMDiscipline.h:7
CFxBIMEntity::GeometryView::Representation
Representation
Definition: FxBIMEntity.h:70
CFxBIMTypePtr
std::shared_ptr< CFxBIMType > CFxBIMTypePtr
Definition: FxBIMEntity.h:31
OdDbHandle
Definition: DbHandle.h:67
CFxBIMEntity::GeometryView::eREFLECTED_PLAN_VIEW
@ eREFLECTED_PLAN_VIEW
Definition: FxBIMEntity.h:80
CFxBIMEntity::GeometryView::name
OdString name
Definition: FxBIMEntity.h:111
CFxBIMEntity::GeometryView::reset
void reset()
CFxBIMEntity::Properties
virtual std::vector< CFxBIMPropertyPtr > & Properties()
CFxBIMEntity::GeometryView::setTargetView
void setTargetView(const OdString &s)
CFxBIMEntity::eDoor
@ eDoor
Definition: FxBIMEntity.h:134
CFxBIMEntity
Definition: FxBIMEntity.h:43
CFxBIMEntity::GeometryView
Definition: FxBIMEntity.h:68
CFxBIMEntity::OriginalTransform
virtual const OdGeMatrix3d & OriginalTransform() const
CFxBIMEntity::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler) override
CFxBIMEntity::Views
virtual std::map< OdString, GeometryView > Views(const OdGeVector3d &direction) const
CFxBIMEntity::CFxBIMEntity
CFxBIMEntity()
CFxBIMEntity::GeometryContainer::views
std::map< OdString, GeometryView > views(const GeometryView::TargetView &view) const
CFxBIMEntity::GeometryView::eSKETCH_VIEW
@ eSKETCH_VIEW
Definition: FxBIMEntity.h:77
CFxBIMDiscipline
Definition: FxBIMDiscipline.h:35
CFxBIMEntity::GeometryView::eGRAPH_VIEW
@ eGRAPH_VIEW
Definition: FxBIMEntity.h:76
CFxBIMEntity::GeometryContainer::views
std::map< OdString, GeometryView > views(const OdGeVector3d &direction) const
CFxBIMEntity::GeometryView::GeometryView
GeometryView(Representation representation=eModel, TargetView targetView=eMODEL_VIEW, const OdString &name=OdString())
CFxBIMEntity::GeometryView::isModel
bool isModel() const
CFxBIMEntity::eWindow
@ eWindow
Definition: FxBIMEntity.h:135
OdDbObject
Definition: DbObject.h:211
CFxBIMEntity::eStairs
@ eStairs
Definition: FxBIMEntity.h:136
OdDbDwgFiler
Definition: DbFiler.h:1031
CFxBIMZone
Definition: FxBIMZone.h:11
CFxBIMEntity::Geometry
virtual OdDbObjectId Geometry(const GeometryView &view=GeometryView()) const
CFxBIMEntity::Generate2dGeometry
virtual OdDbObjectId Generate2dGeometry(const OdGeVector3d &direction)
CFxBIMEntity::Geometry
virtual OdDbObjectIdArray Geometry(const OdGeVector3d &direction) const
CFxBIMEntity::GeometryContainer::get
OdDbObjectIdArray get(const OdGeVector3d &direction) const