DATAKIT API  V2025.1
dtk_cerconReader.hpp
Go to the documentation of this file.
1 #ifndef _UTIL_CERCON_READER_HPP_
2 #define _UTIL_CERCON_READER_HPP_
3 
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <signal.h>
7 #include <string.h>
8 
9 
10 class CerconReader : public Dtk_Reader
11 {
12 protected:
16 
17  void _Init();
18  void _Reset();
19 
20  Dtk_ErrorStatus _ProcessModelComponent(const Dtk_string& inInputFile,Dtk_MainDocPtr & inoutDocument, Dtk_ComponentPtr &DefaultComponent);
21 
22  void _SetAsmInfos(const Dtk_string& inAsmIdCounter,Dtk_ComponentPtr& inoutComponent);
24 
25  void _SetIdModel(const int& inIdModel,Dtk_ComponentPtr& inoutComponent);
26  int _GetIdModel(const Dtk_ComponentPtr& inComponent);
27 
29  const Dtk_ComponentPtr& inComponent,
30  const Dtk_string& inAsmId,
31  Dtk_NodePtr& outRootNode);
32 
33  Dtk_ErrorStatus _StartFile( const Dtk_string& inInputFile);
34  void _EndFile();
35  //Mandatory
36 public:
37  virtual ~CerconReader();
39 
41  static Dtk_bool Enable();
42 
43  Dtk_ErrorStatus CreateDocument(const Dtk_string& inInputFile,Dtk_MainDocPtr& outDocument);
44  Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string& outVersion);
45 
46  Dtk_ErrorStatus PopulateComponentsTree(const Dtk_string& inInputFile,Dtk_MainDocPtr& inoutDocument,Dtk_ComponentPtr& outRootComponent);
47  Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr >& inArrayStream, Dtk_MainDocPtr& inoutDocument, Dtk_ComponentPtr& outRootComponent );
49 
50 
51  Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr& inComponent,Dtk_NodePtr& outRootNode);
52  // Dtk_ErrorStatus ReadEntity(const Dtk_ID& inEntityID,Dtk_EntityPtr& outEntity);
56  //Dtk_ErrorStatus ReadAdditionalInfos(const Dtk_ID &inEntityID,
57  // const Dtk_string &inEntityName,
58  // Dtk_ObjectPtr &outEntity);
59 
63  void Inventory();
64  //Mandatory
65 };
66 #endif
67 
CerconReader::ReadComponent
Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)
CerconReader::_SetAsmInfos
void _SetAsmInfos(const Dtk_string &inAsmIdCounter, Dtk_ComponentPtr &inoutComponent)
CerconReader::GetVersion
Dtk_Int32 GetVersion()
CerconReader::Enable
static Dtk_bool Enable()
Dtk_Reader
Definition: dtk_reader.hpp:15
CerconReader::GetFileVersion
Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string &outVersion)
CerconReader::_InitComponent
Dtk_ErrorStatus _InitComponent(const Dtk_ComponentPtr &inComponent, const Dtk_string &inAsmId, Dtk_NodePtr &outRootNode)
CerconReader::~CerconReader
virtual ~CerconReader()
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
CerconReader::_GetIdModel
int _GetIdModel(const Dtk_ComponentPtr &inComponent)
CerconReader::_EndFile
void _EndFile()
CerconReader::_CurrentUnit
Dtk_Double64 _CurrentUnit
Definition: dtk_cerconReader.hpp:15
Dtk_bool
char Dtk_bool
Definition: define.h:725
CerconReader::CerconReader
CerconReader()
CerconReader::GetCerconReader
static CerconReader * GetCerconReader()
CerconReader::_ProcessModelComponent
Dtk_ErrorStatus _ProcessModelComponent(const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &DefaultComponent)
Dtk_Double64
double Dtk_Double64
Definition: define.h:699
CerconReader::CreateDocument
Dtk_ErrorStatus CreateDocument(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
CerconReader::EndComponent
Dtk_ErrorStatus EndComponent(Dtk_ComponentPtr &inComponent)
CerconReader::_StartFile
Dtk_ErrorStatus _StartFile(const Dtk_string &inInputFile)
CerconReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
CerconReader::_GetAsmInfos
Dtk_string _GetAsmInfos(const Dtk_ComponentPtr &inComponent)
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
CerconReader::EndPopulateComponentsTree
Dtk_ErrorStatus EndPopulateComponentsTree()
CerconReader::_Reset
void _Reset()
CerconReader
Definition: dtk_cerconReader.hpp:11
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
CerconReader::Inventory
void Inventory()
CerconReader::ReadEntity
Dtk_ErrorStatus ReadEntity(Dtk_Node &inNode, Dtk_EntityPtr &outEntity)
CerconReader::_MainFileType
int _MainFileType
Definition: dtk_cerconReader.hpp:13
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
CerconReader::ActivateReader
Dtk_ErrorStatus ActivateReader()
CerconReader::_SetIdModel
void _SetIdModel(const int &inIdModel, Dtk_ComponentPtr &inoutComponent)
CerconReader::_UniqueReader
static CerconReader * _UniqueReader
Definition: dtk_cerconReader.hpp:14
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
CerconReader::ReadAdditionalInfos
Dtk_ErrorStatus ReadAdditionalInfos(Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
CerconReader::_Init
void _Init()
CerconReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr > &inArrayStream, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
CerconReader::DesactivateReader
Dtk_ErrorStatus DesactivateReader()