DATAKIT SDK  V2026.2
IFCWriter.h
Go to the documentation of this file.
1 #ifndef _IFCW_HPP_
2 #define _IFCW_HPP_
3 //! \brief Exported APIs for Ifc (.ifc) Write Library
4 
5 namespace Ifcw
6 {
7  //! \class WriteOptions
8  //! \brief This class provides several options to tune the IFC Writer.\n
9  //! It must be provided to Ifcw::InitWrite method.
10  //! \code
11  //! //...
12  //! Dtk_string LogFile = L"MyLogFile.log";
13  //! Ifcw::WriteOptions IFCOptions;
14  //! Dtk_ErrorStatus err = Ifcw::InitWrite( LogFile, NULL, PdfOptions);
15  //! //...
16  //! \endcode
18  {
19  protected:
20  public:
21 
22  //! \BaseConstructor
24  {
25  }
26 
27  //! Int representing IFC version to use : 0 ( default ) = IFC2x3; 1 = IFC4
29  //! DTK_TRUE : enable building type recognition (deduces if an element is an IFCWALL, IFCWINDOW...), DTK_FALSE : disable building type recognition
31  };
32 
33  //! \struct ProjectInformation
34  //! \brief This struct enables the user to define global properties regarding the project, construction site and building.\n
35  //! It is used in the Ifcw::InitWrite method.
36  //! \see InitWrite
37  //!
38  //! Here is the detailed mapping of this struct field and IFC data :
39  //! projectPhase <-> IFCPROJECT.Phase
40  //! projectName <-> IFCPROJECT.Name
41  //! projectDetailedName <-> IFCPROJECT.LongName
42  //! siteLatitude <-> IFCSITE.RefLatitude in degree
43  //! siteLongitude <-> IFCSITE.RefLongitude in degree
44  //! siteElevation <-> IFCSITE.RefElevation in meter
45  //! buildingAddress <-> IFCBUILDING.BuildingAddress
46  //! buildingName <-> IFCBUILDING.Name AND IFCBUILDING.LongName
47  //! projectAuthor <-> IFCPERSON.GivenName
48  //! organizationName <-> IFCORGANIZATION.Name
49  //! organizationDescription <-> IFCORGANIZATION.Description
51  {
64  projectPhase("Project Phase"),
65  projectName("Project Name"),
66  projectDetailedName("Project Detailed Name"),
67  buildingAddress("Building Address"),
68  buildingName("Building Name"),
69  projectAuthor("Author"),
70  organizationName("Organization name"),
71  organizationDescription("Organization description"),
72  siteLatitude(0.),
73  siteLongitude(0.),
74  siteElevation(0.)
75  { };
78  };
79 
80 
81  //! \class IfcCalendarDate
82  //! \brief This class represents an IFC date.\n
83  //! \remark Definition from ISO/CD 10303-41:1992: A date which is defined by a day in a month of a year.
85  {
86  private:
87  int day; //!< An int between 1 and 31.
88  int month; //!< An int between 1 and 12.
89  int year; //!< A positive int.
90  public:
91  //! \BaseConstructor
93  IfcCalendarDate( const int& inDay, const int& inMonth, const int& iYear );
94  friend bool operator==( IfcCalendarDate const& lhs, IfcCalendarDate const& rhs )
95  {
96  return lhs.day == rhs.day && lhs.month == rhs.month && lhs.year == rhs.year;
97  };
98  //! \brief Getter for the date day
99  //! \return The date day
100  int GetDay() const;
101  //! \brief Getter for the date month
102  //! \return The date month
103  int GetMonth() const;
104  //! \brief Getter for the date year
105  //! \return The date year
106  int GetYear() const;
107  };
108 
109  namespace classification
110  {
111  //! \class IfcClassification
112  //! \brief A class that represents a classification system, like UniFormat, Omniclass, SfB...
113  //! \remark Ifc objects are not directly link to IfcClassification in 2x3 and have to be linked to IfcClassificationReference
114  //! \see IfcClassificationReference
115  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcexternalreferenceresource/lexical/ifcclassification.htm
117  {
118  private:
119  IfcCalendarDate editionDate; //!< Classification version date ou publication.
120  Dtk_string source; //!< Where the classification comes from (publisher). Mandatory.
121  Dtk_string edition; //!< Classification version. Mandatory.
122  Dtk_string name; //!< Classifition name, like "UniFormat". Optionnal.
123  public:
124  //! \BaseConstructor
125  //! \remark Should not be used because at classification source and edition are mandatory parameter.
127  //! \brief Constructor taking 3 parameters.
128  //! \param [in] inSource : Classification source.
129  //! \param [in] inEdition : Classification edition.
130  //! \param [in] inName : Classification name.
131  //! \remark name is optionnal.
132  IfcClassification( Dtk_string inSource, Dtk_string inEdition, Dtk_string inName = "" );
133  friend bool operator==( IfcClassification const& lhs, IfcClassification const& rhs )
134  {
135  return lhs.editionDate == rhs.editionDate && lhs.source == rhs.source && lhs.edition == rhs.edition && lhs.name == rhs.name;
136  };
137  //! \brief Getter for the classification edition date
138  //! \return The classification edition date
140  //! \brief Getter for the classification source
141  //! \return The classification source
142  const Dtk_string & GetSource() const;
143  //! \brief Getter for the classification edition
144  //! \return The classification edition
145  const Dtk_string & GetEdition() const;
146  //! \brief Getter for the classification name
147  //! \return The classification name
148  const Dtk_string & GetName() const;
149  //! \brief Setter for the classification name
150  //! \param [in] inName : The classification name to be used
151  void SetName( Dtk_string inName );
152  //! \brief Setter for the classification source
153  //! \param [in] inSource : The classification source to be used
154  void SetSource( Dtk_string inSource );
155  //! \brief Setter for the classification edition
156  //! \param [in] inEdition : The classification edition to be used
157  void SetEdition( Dtk_string inEdition );
158  //! \brief Setter for the classification edition date
159  //! \param [in] inDate : The ifc date to be used
161  //! \brief Setter for the classification edition date
162  //! \param [in] inDay : The day of date to be used
163  //! \param [in] inMonth : The month of date to be used
164  //! \param [in] inYear : The year of date to be used
165  void SetEditionDate( int inDay, int inMonth, int inYear );
166  };
167 
168  //! \class IfcClassificationReference
169  //! \brief This class represent a classification reference to be used for an ifc object, e.g.: B2010 in OmniClass for exterior walls. It is link to a classification.
170  //! \see IfcClassification
171  //! \remark One of its parameter have to be assigned (all optionals).
172  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcexternalreferenceresource/lexical/ifcclassificationreference.htm
173  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcexternalreferenceresource/lexical/ifcexternalreference.htm
175  {
176  private:
177  IfcClassification referencedSource;//!< The classification that is referred.
178  Dtk_string location;//!< Location where the classification can be accessed (URL). Optionnal.
179  Dtk_string itemReference;//!< Item reference provides a unique identifier of the referenced item within the classification. Optionnal.
180  Dtk_string name;//!< Name to further specify the reference. Optionnal.
181 
182  public:
183  //! \BaseConstructor
184  //! \remark One of the parameter should be set, otherwise name will be set to 'Undefined'.
185  IfcClassificationReference( Dtk_string inLocation = "", Dtk_string inItemReference = "", Dtk_string inName = "", IfcClassification inReferencedSource = IfcClassification() );
187  {
188  return lhs.referencedSource == rhs.referencedSource
189  && lhs.location == rhs.location
190  && lhs.itemReference == rhs.itemReference && lhs.name == rhs.name;
191  };
192  //! \brief Getter for the classification the reference is linked to
193  //! \return The classification the reference is linked to
195  //! \brief Getter for the reference location
196  //! \return The reference location
197  const Dtk_string & GetLocation() const;
198  //! \brief Getter for the reference item reference
199  //! \return The reference item reference
200  const Dtk_string & GetItemReference() const;
201  //! \brief Getter for the reference name
202  //! \return The reference name
203  const Dtk_string & GetName() const;
204  //! \brief Setter for the reference location
205  //! \param [in] inLocation : reference location to be used
206  void SetLocation( Dtk_string inLocation );
207  //! \brief Setter for the reference item reference
208  //! \param [in] inItemReference : reference item reference to be used
209  void SetItemReference( Dtk_string inItemReference );
210  //! \brief Setter for the reference name
211  //! \param [in] inName : reference name to be used
212  void SetName( Dtk_string inName );
213  };
214 
215  }
216 
217  //! \enum IfcBuildingElement
218  //! \brief This enum provides commonly used ifc building elements types, to define entities to be written.\n
219  //! It is used in the Ifcw::SetIfcBuildingElement method.
220  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcproductextension/lexical/ifcbuiltelement.htm
222  {
240  IfcWindow
241  };
242 
243  //! \class IfcType
244  //! \brief A IfcType is used to define the common properties of a certain type or style of an entity that may be applied to instances of that entity type.
245  //! \remark Types may be exchanged without being already assigned to occurrences.
246  //! \remark Type shapes are overwritten by occurence shapes. Type properties are added to occurence properties and overwritten for those which have the same filed.
247  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcproductextension/lexical/ifcelementtype.htm
248  class IfcType
249  {
250  private :
251  Dtk_tab<Dtk_MetaDataPtr> propertySet; //!< The shared properties of the objects that will be assigned this type. Optional.
252  Dtk_tab <Dtk_EntityPtr> shapeReprensentation; //!< The shared representation shape of the objects that will be assigned this type.
253  Dtk_string buildingElement; //!< The building element type of the objects that will be assigned to this type. (e.g. IfcWall, IfcBeam...)
254  Dtk_string predefinedType; //!< Predefined type of the building element subtype (e.g. if productSubType = IFCROOF : FLAT_ROOF, SHED_ROOF...). If not set, will be set to "NOTDEFINED". Overrides IfcElement predefined type
255  Dtk_string tag; //!< The tag (or label) identifier at the particular type of a product, e.g. the article number (like the EAN). Optional.
256  Dtk_string name; //!< Name for the defined type. Optional.
257  Dtk_ID ID; //!< Id of the type, to be identified when creating objects of that type.
258 
259  public:
262  //! \brief Getter for type property set
263  //! \return The set of properties assigned to the type
265  //! \brief Getter for type shape representation
266  //! \return The entities of the shape reprentation of the type
268  //! \brief Getter for type tag
269  //! \return The tag of the type
270  const Dtk_string & GetTag() const;
271  //! \brief Getter for type name
272  //! \return The name of the type
273  const Dtk_string & GetName() const;
274  //! \brief Getter for type ID
275  //! \return The ID of the type
276  Dtk_ID GetID() const;
277  //! \brief Getter for IfcType building element subtype.
278  //! \return The Ifc building element type assigned in the IfcType
280  //! \brief Getter for IfcType predefined type.
281  //! \return The predefined type assigned in the IfcType
282  const Dtk_string & GetPredefinedType() const;
283  //! \brief Setter for IfcType building element type.
284  //! \param [in] inType : The building element type to be assigned in the IfcType
285  void SetBuildingElementType( const Dtk_string & inType );
286  //! \brief Setter for IfcElement building element subtype.
287  //! \param [in] inTypeEnum : The building element subtype to be assigned in the IfcType
289  //! \brief Setter for IfcType propertySet.
290  //! \param [in] inProperties : The property set to be attached to the IfcType
291  //! \param [in] inSetName : The name of the property set (default is "UserDefined")
292  void SetPropertySet( Dtk_tab<Dtk_MetaDataPtr> inProperties, const Dtk_string & inSetName = "" );
293  //! \brief Adds a property to IfcType current property set.
294  //! \param [in] inProperty : The property to be added to the property set
295  //! \param [in] inSetName : The name of the property set in which the property belong
296  void AddProperty( Dtk_MetaDataPtr inProperty, const Dtk_string & inSetName = "" );
297  //! \brief Setter for IfcType shapeRepresentation (geometry)
298  //! \param [in] inShapes : The entities to be assigned as shape representation (only Dtk_mesh are supported for now)
300  //! \brief Adds an entity to IfcType shape representation (geometry)
301  //! \param [in] inShape : The entity to add in the shape representation (only Dtk_mesh are supported for now)
302  void AddShape( Dtk_EntityPtr inShape );
303  //! \brief Setter for IfcType tag
304  //! \param [in] inTag : The tag of the type
305  void SetTag( const Dtk_string & inTag );
306  //! \brief Setter for IfcType name
307  //! \param [in] inName : The name of the type
308  void SetName( const Dtk_string & inName );
309  //! \brief Setter for IfcType ID
310  //! \param [in] inID : The ID of the type
311  void SetID( const Dtk_ID & inID );
312  //! \brief Setter for IfcType predefined type
313  //! \param [in] inType : The predefined type of the IfcType
314  void SetPredefinedType( const Dtk_string & inType );
315  };
316 
317  //! \class IfcElement
318  //! \brief This class provides several parameters for the next ifc entity to be written, as its custom property set, level, classification.\n
319  //! It must be provided to Ifcw::InitObject method.
320  //! \remark The propertySet can gather properties from different IfcPropertySet, we'll write as many set as there are different set names
321  //! \see SetPropertySet, AddProperty
322  //! \code
323  //! //...
324  //! Dtk_string ifcType = L"IFCWALL";
325  //! Ifcw::IfcElement* entityParams = new IfcElement();
326  //! entityParams->SetIfcType( ifcType );
327  //! Dtk_ErrorStatus err = Ifcw::InitObject( entityParams );
328  //! //...
329  //! \endcode
331  {
332  private:
333  classification::IfcClassificationReference classificationReference; //!< Object reference in classification. Optionnal.
334  Dtk_tab<Dtk_MetaDataPtr> propertySet; //!< Object properties. Set name is determine by Dtk_MetaData category. If different categories are set, different property sets will be written.
335  Dtk_string name; //!< Object name. Default is 'UNDEFINED'
336  Dtk_string buildingElementType; //!< Object type, like IFCWALL, IFCCOLUMN... Default is IFCBUILDINGELEMENTPROXY \see IfcBuildingElement
337  Dtk_string predefinedType; //!< //!< Predefined type of the building element subtype (e.g. if productSubType = IFCROOF : FLAT_ROOF, SHED_ROOF...). If not set, will be set to "NOTDEFINED"
338  Dtk_string GUID; //!< Object GUID. If not set a GUID will be generated.
339  Dtk_string level; //!< Building level where the object belongs to. If not set will be placed in the building without level.
340  Dtk_string tag; //!< Tag identifier of the object occurence, e.g. position, serial number.
341  Dtk_RGB color; //!< Object color. Default is grey.
342  Dtk_transfo instanceTrf; //!< Instance transformation matrice (if the object is instantiated)
343  Dtk_ID typeID; //!< Object IfcType ID (only if it belongs to a IfcType). If type shapes are defined, they will be used as this object representation shapes (if it has no shape entities assigned through further WriteEntity call).
344 
345  public:
346  //! \BaseConstructor
348  //! \brief Getter for IfcElement propertySet
349  //! \return The table of propertySet assigned to the IfcElement
351  //! \brief Getter for a single IfcElement property
352  //! \param [in] pos : The position in the table for the property to retrieve
353  //! \return The property at position pos
355  //! \brief Getter for IfcType ID.
356  //! \return The ID of the current object type
357  Dtk_ID GetTypeID() const;
358  //! \brief Getter for IfcElement name.
359  //! \return The name assigned in the IfcElement
360  const Dtk_string & GetName() const;
361  //! \brief Getter for IfcElement GUID
362  //! \return The GUID assigned in the IfcElement.
363  const Dtk_string & GetGUID() const;
364  //! \brief Getter for IfcElement level
365  //! \return The level assigned in the IfcElement.
366  const Dtk_string & GetLevel() const;
367  //! \brief Getter for IfcElement tag
368  //! \return The tag assigned in the IfcElement.
369  const Dtk_string & GetTag() const;
370  //! \brief Getter for IfcElement building element type.
371  //! \return The building element type assigned in the IfcElement
373  //! \brief Getter for IfcElement predefined type.
374  //! \return The building element predefined type assigned in the IfcElement
375  const Dtk_string & GetPredefinedType() const;
376  //! \brief Getter for IfcElement color.
377  //! \return The color assigned in the IfcElement
378  Dtk_RGB GetColor() const;
379  //! \brief Getter for IfcElement instance transformation matrice.
380  //! \return The instance transformation matrice assigned in the IfcElement
381  const Dtk_transfo & GetInstanceTrf() const;
382  //! \brief Getter for classification reference
383  //! \return The classification reference assigned in the IfcElement
385  //! \brief Setter for IfcElement propertySet.
386  //! \param [in] inProperties : The property set to be attached to the IfcElement
387  //! \param [in] inSetName : The name of the property set (default is "UserDefined")
388  void SetPropertySet( Dtk_tab<Dtk_MetaDataPtr> inProperties, const Dtk_string & inSetName = "" );
389  //! \brief Adds a property to IfcElement current property set.
390  //! \param [in] inProperty : The property to be added to the property set
391  //! \param [in] inSetName : The name of the property set in which the property belong
392  void AddProperty( Dtk_MetaDataPtr inProperty, Dtk_string inSetName = "" );
393  //! \brief Setter for IfcElement name.
394  //! \param [in] inName : The name to be assigned in the IfcElement
395  void SetName( Dtk_string inName );
396  //! \brief Setter for IfcElement IfcType ID.
397  //! \param [in] inID : The type ID to be assigned in the IfcElement
398  void SetTypeID( const Dtk_ID & inID );
399  //! \brief Setter for IfcElement GUID.
400  //! \param [in] inGUID : The GUID to be assigned in the IfcElement
401  void SetGUID( Dtk_string inGUID );
402  //! \brief Setter for IfcElement level.
403  //! \param [in] inLevel : The level to be assigned in the IfcElement
404  void SetLevel( Dtk_string inLevel );
405  //! \brief Setter for IfcElement tag.
406  //! \param [in] inTag : The tag to be assigned in the IfcElement
407  void SetTag( Dtk_string inTag );
408  //! \brief Setter for IfcElement building element type.
409  //! \param [in] inType : The building element type to be assigned in the IfcElement
411  //! \brief Setter for IfcElement building element type.
412  //! \param [in] inTypeEnum : The building element type to be assigned in the IfcElement
414  //! \brief Setter for IfcElement predefined type.
415  //! \param [in] inType : The building element predefined type to be assigned in the IfcElement
416  void SetPredefinedType( const Dtk_string & inType );
417  //! \brief Setter for IfcElement color.
418  //! \param [in] inColor : The color to be assigned in the IfcElement
419  void SetColor( const Dtk_RGB & inColor );
420  //! \brief Setter for IfcElement instance transformation matrice.
421  //! \param [in] inTrf : The instance transformation matrice to be assigned in the IfcElement
422  void SetInstanceTrf( const Dtk_transfo & inTrf );
423  //! \brief Setter for IfcElement classification reference
424  //! \param [in] inClassificationRef : The classification reference to be assigned in the IfcElement
426  };
427 
428  //! \brief Initialize the Ifc Writer and the IFC version you want to write
429  //! \return dtkNoError if it is OK.
430  //! \param [in] inOutputFile : Output file name
431  //! \param [in] inLogFile : Log file
432  //! \param [in] inOptions : options to tune the IFC Writer
433  //! \remark This function is the first call for the writer, it must me called after Dtk_API::StartAPI(...)
434  //! \see WriteOptions
435  DtkErrorStatus InitWrite(const Dtk_string& inOutputFile, const Dtk_string& inLogFile, const WriteOptions& inOptions, ProjectInformation* inProjectInfo = nullptr);
436 
437 
438  //! \brief Creation of the output file and free the Ifc Writer
439  //! \return dtkNoError if it is OK.
440  //! \remark used as the last function used for the writer.
442 
443  //! \brief Initialize an ifcobject with various information.
444  //! \param [in] inParameters : The parameters you want for the object to be written (see IfcElement class)
445  //! \return dtkNoError if it is OK.
446  //! \remark To close the current object you will need to call EndObject() function .
448 
449  //! \brief Ends the current object
450  //! \return dtkNoError if it is OK.
452 
453  //! \brief Write the entity provided in parameter. The entity corresponds to current object geometry (e.g: a Dtk_MeshPtr())
454  //! \param [in] inEntity : The Entity to be written
455  //! \param [in] inMat : The matrice that needs to be applied before the writing
456  //! \return dtkNoError if it is OK.
457  //! \remark This function is used to write entities (only Dtk_MeshPtr ).
458  Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr& inEntity, const Dtk_transfo & inMat = Dtk_transfo());
459 
460  //! \brief Write the type provided in parameter. The type can exists by itself without having entities related to it.
461  //! \param [in] inType : The ifcType to be written
462  //! \return dtkNoError if it is OK.
463  //! \remark Should be used before WriteEntity if the entity to be written uses the current ifcType.
465 
466 }// namespace Ifcw
467 
468 #endif
Ifcw::IfcType::GetPropertySet
const Dtk_tab< Dtk_MetaDataPtr > & GetPropertySet() const
Getter for type property set.
Ifcw::classification::IfcClassificationReference::SetLocation
void SetLocation(Dtk_string inLocation)
Setter for the reference location.
Ifcw::IfcType::SetPredefinedType
void SetPredefinedType(const Dtk_string &inType)
Setter for IfcType predefined type.
Ifcw::IfcType::GetName
const Dtk_string & GetName() const
Getter for type name.
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:681
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Ifcw::IfcPlate
@ IfcPlate
Definition: IFCWriter.h:231
Ifcw::classification::IfcClassification::SetSource
void SetSource(Dtk_string inSource)
Setter for the classification source.
Ifcw::IfcElement::SetGUID
void SetGUID(Dtk_string inGUID)
Setter for IfcElement GUID.
Ifcw::ProjectInformation::buildingName
Dtk_string buildingName
Definition: IFCWriter.h:56
Ifcw::WriteEntity
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity, const Dtk_transfo &inMat=Dtk_transfo())
Write the entity provided in parameter. The entity corresponds to current object geometry (e....
Ifcw::IfcElement::SetPropertySet
void SetPropertySet(Dtk_tab< Dtk_MetaDataPtr > inProperties, const Dtk_string &inSetName="")
Setter for IfcElement propertySet.
Ifcw::IfcElement::SetLevel
void SetLevel(Dtk_string inLevel)
Setter for IfcElement level.
Ifcw::IfcType::SetBuildingElementType
void SetBuildingElementType(const Dtk_string &inType)
Setter for IfcType building element type.
Ifcw::classification::IfcClassification::GetName
const Dtk_string & GetName() const
Getter for the classification name.
Ifcw::IfcElement::GetGUID
const Dtk_string & GetGUID() const
Getter for IfcElement GUID.
Ifcw::classification::IfcClassification::GetEditionDate
const IfcCalendarDate & GetEditionDate() const
Getter for the classification edition date.
Ifcw::classification::IfcClassification::IfcClassification
IfcClassification(Dtk_string inSource, Dtk_string inEdition, Dtk_string inName="")
Constructor taking 3 parameters.
Ifcw::IfcRamp
@ IfcRamp
Definition: IFCWriter.h:233
Ifcw::IfcType::~IfcType
~IfcType()
Ifcw::IfcMember
@ IfcMember
Definition: IFCWriter.h:230
Ifcw::IfcElement::AddProperty
void AddProperty(Dtk_MetaDataPtr inProperty, Dtk_string inSetName="")
Adds a property to IfcElement current property set.
Ifcw::IfcType
A IfcType is used to define the common properties of a certain type or style of an entity that may be...
Definition: IFCWriter.h:249
Ifcw::IfcRoof
@ IfcRoof
Definition: IFCWriter.h:235
Ifcw::IfcType::SetBuildingElementType
void SetBuildingElementType(IfcBuildingElement inTypeEnum)
Setter for IfcElement building element subtype.
Ifcw::IfcType::GetTag
const Dtk_string & GetTag() const
Getter for type tag.
Ifcw::classification::IfcClassification::SetEditionDate
void SetEditionDate(int inDay, int inMonth, int inYear)
Setter for the classification edition date.
Ifcw::classification::IfcClassificationReference::operator==
friend bool operator==(IfcClassificationReference const &lhs, IfcClassificationReference const &rhs)
Definition: IFCWriter.h:186
Ifcw::ProjectInformation::buildingAddress
Dtk_string buildingAddress
Definition: IFCWriter.h:55
Ifcw::ProjectInformation::siteElevation
Dtk_Double64 siteElevation
Definition: IFCWriter.h:62
Ifcw::ProjectInformation::operator=
ProjectInformation & operator=(ProjectInformation &&p)
Ifcw::InitWrite
DtkErrorStatus InitWrite(const Dtk_string &inOutputFile, const Dtk_string &inLogFile, const WriteOptions &inOptions, ProjectInformation *inProjectInfo=nullptr)
Initialize the Ifc Writer and the IFC version you want to write.
Ifcw::IfcElement::SetColor
void SetColor(const Dtk_RGB &inColor)
Setter for IfcElement color.
Ifcw::WriteOptions::versionIndicator
int versionIndicator
Int representing IFC version to use : 0 ( default ) = IFC2x3; 1 = IFC4.
Definition: IFCWriter.h:28
DTK_TRUE
#define DTK_TRUE
Definition: define.h:719
Ifcw::ProjectInformation::projectPhase
Dtk_string projectPhase
Definition: IFCWriter.h:52
Ifcw::WriteOptions::buildingTypeRecognition
Dtk_bool buildingTypeRecognition
DTK_TRUE : enable building type recognition (deduces if an element is an IFCWALL, IFCWINDOW....
Definition: IFCWriter.h:30
Ifcw::IfcElement::GetBuildingElementType
const Dtk_string & GetBuildingElementType() const
Getter for IfcElement building element type.
Ifcw::IfcElement
This class provides several parameters for the next ifc entity to be written, as its custom property ...
Definition: IFCWriter.h:331
Ifcw::IfcElement::SetTag
void SetTag(Dtk_string inTag)
Setter for IfcElement tag.
Ifcw::classification::IfcClassificationReference::GetItemReference
const Dtk_string & GetItemReference() const
Getter for the reference item reference.
Ifcw::InitObject
DtkErrorStatus InitObject(IfcElement inParameters)
Initialize an ifcobject with various information.
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:704
Ifcw::IfcFooting
@ IfcFooting
Definition: IFCWriter.h:229
Ifcw::classification::IfcClassificationReference::SetItemReference
void SetItemReference(Dtk_string inItemReference)
Setter for the reference item reference.
Ifcw::IfcStair
@ IfcStair
Definition: IFCWriter.h:237
Ifcw::IfcElement::GetPropertyAtPos
Dtk_MetaDataPtr GetPropertyAtPos(Dtk_Size_t pos) const
Getter for a single IfcElement property.
Ifcw::IfcElement::GetColor
Dtk_RGB GetColor() const
Getter for IfcElement color.
Ifcw::ProjectInformation::projectAuthor
Dtk_string projectAuthor
Definition: IFCWriter.h:57
Ifcw::IfcType::SetTag
void SetTag(const Dtk_string &inTag)
Setter for IfcType tag.
Dtk_bool
char Dtk_bool
Definition: define.h:717
Ifcw::IfcElement::GetTag
const Dtk_string & GetTag() const
Getter for IfcElement tag.
Ifcw::IfcBuildingElementProxy
@ IfcBuildingElementProxy
Definition: IFCWriter.h:224
Dtk_Double64
double Dtk_Double64
Definition: define.h:691
Ifcw::IfcSlab
@ IfcSlab
Definition: IFCWriter.h:236
Ifcw::IfcRailing
@ IfcRailing
Definition: IFCWriter.h:232
Ifcw::EndObject
DtkErrorStatus EndObject()
Ends the current object.
Ifcw::IfcCalendarDate::GetDay
int GetDay() const
Getter for the date day.
Ifcw::IfcType::AddShape
void AddShape(Dtk_EntityPtr inShape)
Adds an entity to IfcType shape representation (geometry)
Ifcw::classification::IfcClassificationReference::GetReferencedSource
const IfcClassification & GetReferencedSource() const
Getter for the classification the reference is linked to.
Ifcw::classification::IfcClassificationReference::GetLocation
const Dtk_string & GetLocation() const
Getter for the reference location.
Ifcw::IfcType::GetBuildingElementType
const Dtk_string & GetBuildingElementType() const
Getter for IfcType building element subtype.
Ifcw::IfcType::GetShapeRepresentation
const Dtk_tab< Dtk_EntityPtr > & GetShapeRepresentation() const
Getter for type shape representation.
Ifcw::IfcCalendarDate::operator==
friend bool operator==(IfcCalendarDate const &lhs, IfcCalendarDate const &rhs)
Definition: IFCWriter.h:94
Ifcw::IfcElement::SetPredefinedType
void SetPredefinedType(const Dtk_string &inType)
Setter for IfcElement predefined type.
Ifcw::IfcCovering
@ IfcCovering
Definition: IFCWriter.h:226
Ifcw::IfcElement::IfcElement
IfcElement()
Default constructor.
Ifcw::IfcCalendarDate::GetMonth
int GetMonth() const
Getter for the date month.
Ifcw::IfcCalendarDate
This class represents an IFC date. .
Definition: IFCWriter.h:85
Ifcw::IfcElement::SetBuildingElementType
void SetBuildingElementType(Dtk_string inType)
Setter for IfcElement building element type.
Ifcw::IfcCalendarDate::GetYear
int GetYear() const
Getter for the date year.
Ifcw::ProjectInformation::organizationName
Dtk_string organizationName
Definition: IFCWriter.h:58
Ifcw::classification::IfcClassificationReference::IfcClassificationReference
IfcClassificationReference(Dtk_string inLocation="", Dtk_string inItemReference="", Dtk_string inName="", IfcClassification inReferencedSource=IfcClassification())
Default constructor.
Ifcw::IfcCalendarDate::IfcCalendarDate
IfcCalendarDate()
Default constructor.
Ifcw::IfcElement::SetTypeID
void SetTypeID(const Dtk_ID &inID)
Setter for IfcElement IfcType ID.
Ifcw::IfcType::SetPropertySet
void SetPropertySet(Dtk_tab< Dtk_MetaDataPtr > inProperties, const Dtk_string &inSetName="")
Setter for IfcType propertySet.
Ifcw::ProjectInformation::siteLatitude
Dtk_Double64 siteLatitude
Definition: IFCWriter.h:60
Ifcw::IfcCalendarDate::IfcCalendarDate
IfcCalendarDate(const int &inDay, const int &inMonth, const int &iYear)
Ifcw::IfcElement::GetLevel
const Dtk_string & GetLevel() const
Getter for IfcElement level.
Ifcw::classification::IfcClassification::SetName
void SetName(Dtk_string inName)
Setter for the classification name.
Ifcw::IfcElement::GetInstanceTrf
const Dtk_transfo & GetInstanceTrf() const
Getter for IfcElement instance transformation matrice.
Ifcw::WriteOptions
This class provides several options to tune the IFC Writer. It must be provided to Ifcw::InitWrite me...
Definition: IFCWriter.h:18
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Ifcw::IfcElement::SetClassificationReference
void SetClassificationReference(classification::IfcClassificationReference inClassificationRef)
Setter for IfcElement classification reference.
Ifcw::EndWrite
DtkErrorStatus EndWrite()
Creation of the output file and free the Ifc Writer
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Ifcw::IfcType::SetID
void SetID(const Dtk_ID &inID)
Setter for IfcType ID.
Ifcw::ProjectInformation::siteLongitude
Dtk_Double64 siteLongitude
Definition: IFCWriter.h:61
Ifcw::ProjectInformation::~ProjectInformation
~ProjectInformation()
Definition: IFCWriter.h:76
Ifcw::classification::IfcClassification::SetEditionDate
void SetEditionDate(IfcCalendarDate inDate)
Setter for the classification edition date.
Ifcw::IfcWindow
@ IfcWindow
Definition: IFCWriter.h:240
Ifcw::WriteType
Dtk_ErrorStatus WriteType(const IfcType &inType)
Write the type provided in parameter. The type can exists by itself without having entities related t...
Ifcw::IfcType::AddProperty
void AddProperty(Dtk_MetaDataPtr inProperty, const Dtk_string &inSetName="")
Adds a property to IfcType current property set.
Ifcw::classification::IfcClassification::operator==
friend bool operator==(IfcClassification const &lhs, IfcClassification const &rhs)
Definition: IFCWriter.h:133
Ifcw::IfcType::SetShape
void SetShape(Dtk_tab< Dtk_EntityPtr > inShapes)
Setter for IfcType shapeRepresentation (geometry)
Ifcw::IfcType::GetPredefinedType
const Dtk_string & GetPredefinedType() const
Getter for IfcType predefined type.
Ifcw::IfcElement::SetName
void SetName(Dtk_string inName)
Setter for IfcElement name.
Ifcw::ProjectInformation::organizationDescription
Dtk_string organizationDescription
Definition: IFCWriter.h:59
Ifcw::IfcElement::GetName
const Dtk_string & GetName() const
Getter for IfcElement name.
Ifcw::WriteOptions::WriteOptions
WriteOptions()
Default constructor.
Definition: IFCWriter.h:23
Ifcw::IfcElement::GetTypeID
Dtk_ID GetTypeID() const
Getter for IfcType ID.
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Ifcw::classification::IfcClassificationReference::SetName
void SetName(Dtk_string inName)
Setter for the reference name.
Ifcw::classification::IfcClassificationReference
This class represent a classification reference to be used for an ifc object, e.g....
Definition: IFCWriter.h:175
Ifcw::classification::IfcClassificationReference::GetName
const Dtk_string & GetName() const
Getter for the reference name.
Ifcw::IfcElement::GetPredefinedType
const Dtk_string & GetPredefinedType() const
Getter for IfcElement predefined type.
Ifcw::ProjectInformation
This struct enables the user to define global properties regarding the project, construction site and...
Definition: IFCWriter.h:51
Ifcw::IfcStairFlight
@ IfcStairFlight
Definition: IFCWriter.h:238
Ifcw::IfcElement::SetBuildingElementType
void SetBuildingElementType(IfcBuildingElement inTypeEnum)
Setter for IfcElement building element type.
Ifcw::IfcColumn
@ IfcColumn
Definition: IFCWriter.h:225
Ifcw::IfcType::GetID
Dtk_ID GetID() const
Getter for type ID.
Ifcw::IfcWall
@ IfcWall
Definition: IFCWriter.h:239
Ifcw::ProjectInformation::projectName
Dtk_string projectName
Definition: IFCWriter.h:53
Ifcw::IfcCurtainWall
@ IfcCurtainWall
Definition: IFCWriter.h:227
Ifcw::ProjectInformation::ProjectInformation
ProjectInformation()
Definition: IFCWriter.h:63
Ifcw
Exported APIs for Ifc (.ifc) Write Library.
Definition: IFCWriter.h:6
Ifcw::IfcRampFlight
@ IfcRampFlight
Definition: IFCWriter.h:234
Ifcw::IfcElement::SetInstanceTrf
void SetInstanceTrf(const Dtk_transfo &inTrf)
Setter for IfcElement instance transformation matrice.
Ifcw::classification::IfcClassification
A class that represents a classification system, like UniFormat, Omniclass, SfB...
Definition: IFCWriter.h:117
Dtk_RGB
Definition: dtk_rgb.hpp:7
Ifcw::IfcDoor
@ IfcDoor
Definition: IFCWriter.h:228
Ifcw::IfcElement::GetPropertySet
const Dtk_tab< Dtk_MetaDataPtr > & GetPropertySet() const
Getter for IfcElement propertySet.
Ifcw::ProjectInformation::projectDetailedName
Dtk_string projectDetailedName
Definition: IFCWriter.h:54
Ifcw::classification::IfcClassification::GetEdition
const Dtk_string & GetEdition() const
Getter for the classification edition.
Ifcw::IfcType::SetName
void SetName(const Dtk_string &inName)
Setter for IfcType name.
Ifcw::classification::IfcClassification::IfcClassification
IfcClassification()
Default constructor.
Ifcw::IfcElement::GetClassificationReference
const classification::IfcClassificationReference & GetClassificationReference() const
Getter for classification reference.
Ifcw::IfcBeam
@ IfcBeam
Definition: IFCWriter.h:223
Ifcw::classification::IfcClassification::SetEdition
void SetEdition(Dtk_string inEdition)
Setter for the classification edition.
Ifcw::IfcBuildingElement
IfcBuildingElement
This enum provides commonly used ifc building elements types, to define entities to be written....
Definition: IFCWriter.h:222
Ifcw::IfcType::IfcType
IfcType()
Ifcw::classification::IfcClassification::GetSource
const Dtk_string & GetSource() const
Getter for the classification source.