DATAKIT API  V2025.3
dtk_IfcReader.hpp
Go to the documentation of this file.
1 #ifndef _DTK_IFC_READER_H_
2 #define _DTK_IFC_READER_H_
3 
4 class IfcReader: public Dtk_Reader
5 {
6 public:
9 
10  static Dtk_bool Enable();
11  Dtk_ErrorStatus CreateDocument(const Dtk_string& inInputFile, Dtk_MainDocPtr& outDocument);
12  Dtk_ErrorStatus GetFileVersion(const Dtk_string& inInputFile, Dtk_string& outVersion);
13  Dtk_ErrorStatus PopulateComponentsTree(const Dtk_string& inInputFile, Dtk_MainDocPtr& inoutDocument, Dtk_ComponentPtr& outRootComponent);
14  Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr >& inArrayStream, Dtk_MainDocPtr& inoutDocument, Dtk_ComponentPtr& outRootComponent );
16  Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr& inComponent, Dtk_NodePtr& outRootNode);
22  Dtk_ErrorStatus InitReader(const Dtk_string& inInputFile);
24 
28 
31  void SetCfgIfcReadComputeLayer( Dtk_bool inActivate );
32 
35  void SetCfgIfcReadComputeGroup( Dtk_bool inActivate );
36 
39  void SetCfgIfcReadKeepIfcSpace( Dtk_bool inActivate );
40 
43  void SetCfgIfcDefineNameComponent( int inValue );
44 
47  void SetCfgIfcApplySiteTransfo( Dtk_bool inActivate );
48 
49 
50 private:
51  void _Init() ;
52  void _Reset();
53 
54  struct Dtk_Handle;
55  Dtk_Handle * _Private;
56 };
57 
58 SetAsDeprecated( "2025.3", "Use IfcReader::SetCfgIfcReadComputeOpening." )
59 void ifcr_SetCfgIfcReadComputeOpening(Dtk_bool inActivate);
60 SetAsDeprecated( "2025.3", "Use IfcReader::SetCfgIfcReadComputeLayer." )
61 void ifcr_SetCfgIfcReadComputeLayer(Dtk_bool inActivate);
62 SetAsDeprecated( "2025.3", "Use IfcReader::SetCfgIfcReadComputeGroup." )
63 void ifcr_SetCfgIfcReadComputeGroup(Dtk_bool inActivate);
64 SetAsDeprecated( "2025.3", "Use IfcReader::SetCfgIfcReadKeepIfcSpace." )
65 void ifcr_SetCfgIfcReadKeepIfcSpace(Dtk_bool inActivate);
66 SetAsDeprecated( "2025.3", "Use IfcReader::SetCfgIfcDefineNameComponent." )
67 void ifcr_SetCfgIfcDefineNameComponent(int inValue);
68 SetAsDeprecated( "2025.3", "Use IfcReader::SetCfgIfcApplySiteTransfo." )
69 void ifcr_SetCfgIfcApplySiteTransfo(Dtk_bool inActivate);
70 SetAsDeprecated( "2025.3", "Please contact us if you're using it." )
71 void ifcr_SetCfgIfcKeepOldInstanceName( Dtk_bool inActivate );
72 SetAsDeprecated( "2025.3", "Please contact us if you're using it." )
73 void ifcr_SetCfgIfcEnableStructuralItemPort( Dtk_bool inActivate );
74 
75 #endif
76 
IfcReader::SetCfgIfcReadKeepIfcSpace
void SetCfgIfcReadKeepIfcSpace(Dtk_bool inActivate)
Set Preference on keeping IfcSpace components.
IfcReader::GetFileVersion
Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string &outVersion)
IfcReader::EndComponent
Dtk_ErrorStatus EndComponent(Dtk_ComponentPtr &inComponent)
IfcReader::~IfcReader
~IfcReader()
Dtk_Reader
Definition: dtk_reader.hpp:15
IfcReader::ReadEntity
Dtk_ErrorStatus ReadEntity(Dtk_Node &inNode, Dtk_EntityPtr &outEntity)
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
IfcReader::ReadComponent
Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)
IfcReader::SetCfgIfcReadComputeOpening
void SetCfgIfcReadComputeOpening(Dtk_bool inActivate)
Set Preference on keeping Opening solids that have been removed from others.
IfcReader::SetCfgIfcDefineNameComponent
void SetCfgIfcDefineNameComponent(int inValue)
Set Preference on setting the name of components.
Dtk_bool
char Dtk_bool
Definition: define.h:725
IfcReader
Definition: dtk_IfcReader.hpp:5
SetAsDeprecated
SetAsDeprecated("2025.3", "Use IfcReader::SetCfgIfcReadComputeOpening.") void ifcr_SetCfgIfcReadComputeOpening(Dtk_bool inActivate)
IfcReader::ReadAdditionalInfos
Dtk_ErrorStatus ReadAdditionalInfos(Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
IfcReader::IfcReader
IfcReader()
IfcReader::GetVersion
Dtk_Int32 GetVersion()
IfcReader::SetCfgIfcApplySiteTransfo
void SetCfgIfcApplySiteTransfo(Dtk_bool inActivate)
Set Preference on applying the IfcSite Transfo that is only stored as a metadata otherwise.
Dtk_Node
This is the Node Class The Dtk_Node object is used to retrieve informations in a Dtk_ComponentPtr obj...
Definition: dtk_maindoc.hpp:230
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:687
IfcReader::Enable
static Dtk_bool Enable()
IfcReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
IfcReader::SetCfgIfcReadComputeLayer
void SetCfgIfcReadComputeLayer(Dtk_bool inActivate)
Set Preference on creating a catalog for IfcLayers.
IfcReader::InitReader
Dtk_ErrorStatus InitReader(const Dtk_string &inInputFile)
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
IfcReader::SetCfgIfcReadComputeGroup
void SetCfgIfcReadComputeGroup(Dtk_bool inActivate)
Set Preference on creating a catalog for IfcGroups.
IfcReader::CreateDocument
Dtk_ErrorStatus CreateDocument(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
IfcReader::DesactivateReader
Dtk_ErrorStatus DesactivateReader()
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
IfcReader::EndPopulateComponentsTree
Dtk_ErrorStatus EndPopulateComponentsTree()
IfcReader::ActivateReader
Dtk_ErrorStatus ActivateReader()
IfcReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr > &inArrayStream, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)