DATAKIT SDK  V2026.2
dtk_proerReader.hpp
Go to the documentation of this file.
1 #ifndef _UTIL_PROER_READER_HPP_
2 #define _UTIL_PROER_READER_HPP_
3 
4 
5 //! \deprecated Use static ProeReader::SetFileSwap
6 SetAsDeprecated("2022.2", "Use ProeReader::SetFileSwap method instead.")
7 void proer_allowFileSwap_Deprecated222();
8 //! \deprecated Use static ProeReader::GetFileSwap
9 SetAsDeprecated("2022.2", "Use ProeReader::GetFileSwap method instead.")
10 Dtk_bool proer_GetFileSwapStatus_Deprecated222();
11 //! \deprecated Use static ProeReader::SetCreateConicEdges
12 SetAsDeprecated("2022.2", "Use ProeReader::SetCreateConicEdges method instead.")
13 void proer_SetCreateConicEdges_Deprecated222( const Dtk_bool inCreateConicEdges );
14 //! \deprecated Use static ProeReader::SetSurfaciqueMode
15 SetAsDeprecated("2022.2", "Use ProeReader::SetSurfaciqueMode method instead.")
16 void proer_SetSurfaciqueMode_Deprecated222( const Dtk_bool inSurfaciqueMode );
17 
18 class ProeReader : public Dtk_Reader
19 {
20  //
21  class proerReader_Handle;
22  proerReader_Handle * _Private;
23 
24  static ProeReader * _ReaderInstance;
25 
26 
27  virtual ~ProeReader();
28  ProeReader();
29 
30 public:
31 
32  static ProeReader * GetInstance();
33  void Release();
34 
35  static Dtk_bool Enable();
36  proerReader_Handle* GetHandle() { return _Private; };
37  Dtk_ErrorStatus CreateDocument(const Dtk_string& inInputFile, Dtk_MainDocPtr& outDocument);
39 
40  Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string& outVersion);
42  const Dtk_string& inInputFile,
43  Dtk_MainDocPtr& inoutDocument,
44  Dtk_ComponentPtr& outRootComponent);
45  Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr >& inArrayStream, Dtk_MainDocPtr& inoutDocument, Dtk_ComponentPtr& outRootComponent );
47 
49  const Dtk_ComponentPtr& inComponent,
50  Dtk_NodePtr& outRootNode);
51 
53 
57 
58  Dtk_ErrorStatus GetFilePreview( const Dtk_string & inInputFile, Dtk_PreviewPtr & outPreview );
59 
60 
66 
67 
68 
69  /*-----------------------------------------------------------------------------------------*/
70  //! [Options]
71  //! \brief Set the config to create or not conic on edge curves if possible
72  //! \param [in] inCreateConicEdge : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_FALSE
73  static void SetCreateConicEdges(const Dtk_bool inCreateConicEdges);
74  //! \brief Set the config to read only surfacic geometry (no solid)
75  //! \param [in] inSurfaciqueMode : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_FALSE
76  static void SetSurfaciqueMode(const Dtk_bool inSurfaciqueMode);
77  //! \brief Set the config to Use file swap instead memory (usefull for large files)
78  //! \param [in] inFileSwap : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_FALSE
79  static void SetFileSwapStatus(const Dtk_bool inFileSwap);
80  //! \brief Get the config to Use file swap
82  //! \brief Set the config to retreive detailled metadata (Designated, Access, Sources, etc..)
83  //! \param [in] inStatus : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_TRUE
84  static void GetDetailledMetadata( Dtk_bool inStatus );
85  //! \brief Set the config to retreive all metadata (including Unit or Mass Properties)
86  //! \param [in] inStatus : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_TRUE
87  static void GetAllMetadata( Dtk_bool inStatus );
88  //! \brief Set the config to retreive the final geometry of the component with assembly level feature (but only mesh or preview body)
89  //! \param [in] inStatus : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_FALSE
90  static void SetAssemblyLvlGeomConfig(const Dtk_bool inStatus);
91  //! \brief Set the config to disable projection on shaded 2D view (allowing you to shade body by yourself)
92  //! \param [in] inDisableProjection : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_FALSE
93  static void SetDisable2dProjectionForShadedView( const Dtk_bool inDisableProjection );
94  //! \brief Set the config to disable compute the hatching
95  //! \param [in] inDisableComputeHatching : DTK_TRUE [yes] , DTK_FALSE[no] default value DTK_FALSE
96  static void SetDisable2dComputeHatching( const Dtk_bool inDisableComputeHatching );
97  //! [Options]
98 
99 };
100 
101 
102 #endif
ProeReader::ActivateReader
Dtk_ErrorStatus ActivateReader()
ProeReader::EndPopulateComponentsTree
Dtk_ErrorStatus EndPopulateComponentsTree()
ProeReader::ReadComponentGraphic
Dtk_ErrorStatus ReadComponentGraphic(const Dtk_ComponentPtr &inComponent, Dtk_GraphicalDataPtr &outGraphicalData)
ProeReader::GetDetailledMetadata
static void GetDetailledMetadata(Dtk_bool inStatus)
Set the config to retreive detailled metadata (Designated, Access, Sources, etc..)
ProeReader::ReadComponent
Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)
Dtk_Reader
Definition: dtk_reader.hpp:15
ProeReader::GetConnectorsPointingToThisComponent
Dtk_ErrorStatus GetConnectorsPointingToThisComponent(Dtk_Component &inCompo, Dtk_tab< Dtk_NodeConnectorPtr > &outConnectedEntities)
ProeReader::GetAssociatedEntities
Dtk_ErrorStatus GetAssociatedEntities(Dtk_Node &inNode, Dtk_tab< Dtk_NodeConnectorPtr > &outAssociatedEntities)
ProeReader::Release
void Release()
ProeReader::GetHandle
proerReader_Handle * GetHandle()
Definition: dtk_proerReader.hpp:36
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
ProeReader::SetCreateConicEdges
static void SetCreateConicEdges(const Dtk_bool inCreateConicEdges)
Set the config to create or not conic on edge curves if possible.
ProeReader::GetFileSwapStatus
static Dtk_bool GetFileSwapStatus()
Get the config to Use file swap.
ProeReader::SetAssemblyLvlGeomConfig
static void SetAssemblyLvlGeomConfig(const Dtk_bool inStatus)
Set the config to retreive the final geometry of the component with assembly level feature (but only ...
Dtk_bool
char Dtk_bool
Definition: define.h:717
ProeReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_tab< Dtk_StreamPtr > &inArrayStream, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
ProeReader::Enable
static Dtk_bool Enable()
ProeReader
Definition: dtk_proerReader.hpp:19
ProeReader::EndComponent
Dtk_ErrorStatus EndComponent(Dtk_ComponentPtr &inComponent)
SetAsDeprecated
SetAsDeprecated("2022.2", "Use ProeReader::SetFileSwap method instead.") void proer_allowFileSwap_Deprecated222()
ProeReader::GetVersion
Dtk_Int32 GetVersion()
ProeReader::GetAllMetadata
static void GetAllMetadata(Dtk_bool inStatus)
Set the config to retreive all metadata (including Unit or Mass Properties)
Dtk_Node
This is the Node Class.
Definition: dtk_maindoc.hpp:231
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:679
ProeReader::DesactivateReader
Dtk_ErrorStatus DesactivateReader()
ProeReader::SetDisable2dProjectionForShadedView
static void SetDisable2dProjectionForShadedView(const Dtk_bool inDisableProjection)
Set the config to disable projection on shaded 2D view (allowing you to shade body by yourself)
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
ProeReader::SetFileSwapStatus
static void SetFileSwapStatus(const Dtk_bool inFileSwap)
Set the config to Use file swap instead memory (usefull for large files)
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
ProeReader::ReadAdditionalInfos
Dtk_ErrorStatus ReadAdditionalInfos(Dtk_Node &inNode, Dtk_ObjectPtr &outEntity)
ProeReader::SetDisable2dComputeHatching
static void SetDisable2dComputeHatching(const Dtk_bool inDisableComputeHatching)
Set the config to disable compute the hatching.
ProeReader::GetFileVersion
Dtk_ErrorStatus GetFileVersion(const Dtk_string &inInputFile, Dtk_string &outVersion)
ProeReader::ReadEntity
Dtk_ErrorStatus ReadEntity(Dtk_Node &inNode, Dtk_EntityPtr &outEntity)
ProeReader::PopulateComponentsTree
Dtk_ErrorStatus PopulateComponentsTree(const Dtk_string &inInputFile, Dtk_MainDocPtr &inoutDocument, Dtk_ComponentPtr &outRootComponent)
ProeReader::GetInstance
static ProeReader * GetInstance()
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
ProeReader::GetFilePreview
Dtk_ErrorStatus GetFilePreview(const Dtk_string &inInputFile, Dtk_PreviewPtr &outPreview)
ProeReader::SetSurfaciqueMode
static void SetSurfaciqueMode(const Dtk_bool inSurfaciqueMode)
Set the config to read only surfacic geometry (no solid)
Dtk_Component
This is the Component Class. The Dtk_ComponentPtr object is used as element into an assembly tree....
Definition: dtk_maindoc.hpp:555
ProeReader::CreateDocument
Dtk_ErrorStatus CreateDocument(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
ProeReader::CreateDocumentGraphical
Dtk_ErrorStatus CreateDocumentGraphical(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)