DATAKIT SDK  V2026.4
dtk_override.hpp
Go to the documentation of this file.
1 #ifndef __UTIL_DTK_OVERRIDE_HPP__
2 #define __UTIL_DTK_OVERRIDE_HPP__
5 #include "def/define.h"
8 #include "util/error_dtk.hpp"
10 #include "util/util_ptr_dtk.hpp"
11 #include "util/util_stl_dtk.hpp"
12 #include <memory>
13 
14 /////////////////////////////////////////////////////////////////////////////
15 //! \ingroup DtkAPIGroup
16 //! \class Dtk_OverrideInfo
17 //! \brief This is the Override Information Class.\n
18 //! The Dtk_OverridePtr object is used as override information into an assembly tree.\n
19 //! \SmartPtr{Dtk_OverrideInfo}
21 {
22  friend class Dtk_SmartPtr<Dtk_OverrideInfo>;
23 protected:
25  struct Dtk_Handle; // Not defined here
26  std::unique_ptr<Dtk_Handle> _Private; // Handle
27 private:
28  Dtk_OverrideInfo(Dtk_string inName, Dtk_InfoPtr inNewAttributes, Dtk_transfoPtr inNewTransformationMatrix, Dtk_FeaturePtr inAssemblyFeature);
29  //! \BaseDestructor
31 public:
32  Dtk_OverrideInfo(const Dtk_OverrideInfo& inToBeCopied);
33 public:
34  //! \DtkDynamicCast
36  static Dtk_OverrideInfoPtr Create( Dtk_string inName, Dtk_InfoPtr inNewAttributes, Dtk_transfoPtr inNewTransformationMatrix, Dtk_FeaturePtr inAssemblyFeature);
37 public:
38  //! \DtkDynamicType
39  Dtk_Int32 DtkDynamicType(const int& inId);
40  //! \brief Set the connectors to the component or entities affected by override.
41  //! \return dtkNoError if ok.
43  //! \brief Retrieves the connectors to the component or entities affected by override.
44  //! \return the connectors.
46  //! \brief Retrieves the name.
47  //! \return the name if succeeds, empty string otherwise.
48  const Dtk_string& GetName() const;
49  //! \brief Retrieves the position.
50  //! \return the position if succeeds, nullptr otherwise.
51  const Dtk_transfoPtr& GetPosition() const;
52  //! \brief Retrieves the Dtk_InfoPtr.
53  //! \return the Dtk_InfoPtr if succeeds, nullptr otherwise.
54  const Dtk_InfoPtr& GetInfos() const;
55  //! \brief Retrieves the Dtk_FeaturePtr.
56  //! \return the Dtk_FeaturePtr if succeeds, nullptr otherwise.
58 };
59 /////////////////////////////////////////////////////////////////////////////
60 
61 /////////////////////////////////////////////////////////////////////////////
62 //! \ingroup DtkAPIGroup
63 //! \class Dtk_OverrideSet
64 //! \brief This is the Override Set Class.\n
65 //! The Dtk_OverrideSetPtr object is used as override set into an assembly tree.\n
66 //! \SmartPtr{Dtk_OverrideSet}
68 {
69 public:
71  {
72  //InitialState
74  // [Catia V5]
76  // [Catia V6]
78  // [Creo]
81  // [Inventor]
83  // [NX]
86  // [Solid Edge]
89  // [SOLIDWORKS]
92  // [ZW3D]
94  };
96  {
97  switch (inEnum)
98  {
99  case DefaultType: return L"DefaultState";
100  case CatiaV5_Scene: return L"CatiaV5_Scene";
101  case CatiaV6_Scene: return L"CatiaV6_Scene";
102  case CREO_Explosion: return L"CREO_Explosion";
103  case CREO_SimplifiedRepresentation: return L"CREO_SimplifiedRepresentation";
104  case INV_ModelState: return L"INV_ModelState";
105  case NX_Arrangement: return L"NX_Arrangement";
106  case NX_Explosion: return L"NX_Explosion";
107  case SE_DisplayConfiguration: return L"SE_DisplayConfiguration";
108  case SE_ExplodedView: return L"SE_ExplodedView";
109  case SW_Configuration: return L"SW_Configuration";
110  case SW_Explosion: return L"SW_Explosion";
111  case ZW3D_Configuration: return "ZW3D_Configuration";
112  default: return L"Unknown";
113  }
114  }
115 
116  friend class Dtk_SmartPtr<Dtk_OverrideSet>;
117 protected:
119  struct Dtk_Handle; // Not defined here
120  std::unique_ptr<Dtk_Handle> _Private; // Handle
121 private:
122  Dtk_OverrideSet( );
123  Dtk_OverrideSet( Dtk_string inName, SemanticType inType, Dtk_string inTargetName, Dtk_string inDisplayName );
124  //! \BaseDestructor
125  ~Dtk_OverrideSet();
126 public:
127  Dtk_OverrideSet(const Dtk_OverrideSet& inToBeCopied);
128 
129 
130  //! \DtkDynamicCast
132  static Dtk_OverrideSetPtr Create( Dtk_string inName, SemanticType inType, Dtk_string inTargetName = Dtk_string(), Dtk_string inDisplayName = Dtk_string() );
133 public:
134  //! \brief Set the connectors to the component or entities affected by override.
135  //! \return dtkNoError if ok.
140 
141 
142 public:
143  //! \DtkDynamicType
144  Dtk_Int32 DtkDynamicType(const int& inId);
145  //! \brief Retrieves the overrides.
146  //! \return the overrides.
149 
150  //! \brief Retrieves the name .
151  //! \return the name if succeeds, empty string otherwise.
152  const Dtk_string& GetName() const;
153  //! \brief Retrieves the target name
154  //! indicates child node used in node catalog.
155  //! \return the target name if succeeds, empty string otherwise.
156  const Dtk_string& GetTargetName() const;
157  //! \brief Retrieves the display name
158  //! indicates display used
159  //! \return the display name if succeeds, empty string otherwise.
160  const Dtk_string& GetDisplayName() const;
161 
162  //! \brief Retrieves Semantic Type in the original software.
163  //! \return type of information stored in the original software.
165 
166  //! \brief Get activation flag.
167  //! \return DTK_TRUE if this override set is activated, DTK_FALSE otherwise.
169  void SetActivated(Dtk_bool inActivationFlag);
170  //! \brief Set the connectors to the component or entities affected by override.
171  //! \return dtkNoError if ok.
173  //! \brief Retrieves the connectors to the component or entities affected by override.
174  //! \return the connectors.
176  //! \brief Clear Volatile Override Infos.
177  //! \return dtkNoError if ok.
179 
180 
181 };
182 /////////////////////////////////////////////////////////////////////////////
183 
184 
185 #endif
Dtk_OverrideSet::SetOverrideInfoListOnNode
Dtk_ErrorStatus SetOverrideInfoListOnNode(Dtk_tab< Dtk_OverrideInfoPtr > inOverrideInfoList)
Dtk_OverrideSet::DtkDynamicCast
static Dtk_OverrideSet * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Dtk_OverrideSet::GetOverrideInfoListOnNode
Dtk_tab< Dtk_OverrideInfoPtr > const & GetOverrideInfoListOnNode() const
Dtk_OverrideInfo::GetName
const Dtk_string & GetName() const
Retrieves the name.
str_feat_dtk.hpp
Dtk_OverrideSet::GetDisplayName
const Dtk_string & GetDisplayName() const
Retrieves the display name indicates display used.
Dtk_OverrideInfo
This is the Override Information Class. The Dtk_OverridePtr object is used as override information in...
Definition: dtk_override.hpp:21
Dtk_OverrideInfo::GetInfos
const Dtk_InfoPtr & GetInfos() const
Retrieves the Dtk_InfoPtr.
Dtk_OverrideSet::GetConnectors
Dtk_tab< Dtk_NodeConnectorPtr > const & GetConnectors() const
Retrieves the connectors to the component or entities affected by override.
Dtk_OverrideSet::GetOverrideInfoListOnComponent
Dtk_tab< Dtk_OverrideInfoPtr > const & GetOverrideInfoListOnComponent() const
Retrieves the overrides.
Dtk_OverrideSet::SetOverrideInfoListOnComponent
Dtk_ErrorStatus SetOverrideInfoListOnComponent(Dtk_tab< Dtk_OverrideInfoPtr > inOverrideInfoList)
Set the connectors to the component or entities affected by override.
Dtk_OverrideSet::CREO_Explosion
@ CREO_Explosion
Definition: dtk_override.hpp:79
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_OverrideSet::SE_ExplodedView
@ SE_ExplodedView
Definition: dtk_override.hpp:88
Dtk_OverrideInfo::GetAssemblyFeature
const Dtk_FeaturePtr & GetAssemblyFeature() const
Retrieves the Dtk_FeaturePtr.
Dtk_OverrideSet::SemanticType
SemanticType
Definition: dtk_override.hpp:71
Dtk_OverrideSet::DefaultType
@ DefaultType
Definition: dtk_override.hpp:73
Dtk_bool
char Dtk_bool
Definition: define.h:724
Dtk_OverrideInfo::GetPosition
const Dtk_transfoPtr & GetPosition() const
Retrieves the position.
Dtk_OverrideSet::ClearVolatileInfos
Dtk_ErrorStatus ClearVolatileInfos()
Clear Volatile Override Infos.
Dtk_OverrideSet::ZW3D_Configuration
@ ZW3D_Configuration
Definition: dtk_override.hpp:93
Dtk_OverrideInfo::DtkDynamicType
Dtk_Int32 DtkDynamicType(const int &inId)
Retrieves the dynamic entity type.
Dtk_OverrideInfo::DtkDynamicCast
static Dtk_OverrideInfo * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Dtk_OverrideSet::NX_Explosion
@ NX_Explosion
Definition: dtk_override.hpp:85
Dtk_OverrideInfo::Create
static Dtk_OverrideInfoPtr Create(Dtk_string inName, Dtk_InfoPtr inNewAttributes, Dtk_transfoPtr inNewTransformationMatrix, Dtk_FeaturePtr inAssemblyFeature)
Dtk_OverrideSet::CatiaV5_Scene
@ CatiaV5_Scene
Definition: dtk_override.hpp:75
Dtk_OverrideSet::GetSemanticType
SemanticType GetSemanticType() const
Retrieves Semantic Type in the original software.
Dtk_OverrideInfo::_typeID
@ _typeID
Definition: dtk_override.hpp:24
Dtk_OverrideSet::Dtk_OverrideSetEnumToString
static Dtk_string Dtk_OverrideSetEnumToString(const SemanticType &inEnum)
Definition: dtk_override.hpp:95
Dtk_OverrideInfo::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_override.hpp:25
Dtk_OverrideSet::SetActivated
void SetActivated(Dtk_bool inActivationFlag)
Dtk_OverrideInfo::SetConnectors
Dtk_ErrorStatus SetConnectors(Dtk_tab< Dtk_NodeConnectorPtr > inConnectedEntities)
Set the connectors to the component or entities affected by override.
Dtk_OverrideSet::NX_Arrangement
@ NX_Arrangement
Definition: dtk_override.hpp:84
dtk_override_ptr.hpp
Dtk_OverrideSet::CatiaV6_Scene
@ CatiaV6_Scene
Definition: dtk_override.hpp:77
Dtk_OverrideSet::SW_Configuration
@ SW_Configuration
Definition: dtk_override.hpp:90
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:686
dtk_maindoc_ptr.hpp
Dtk_OverrideSet::SetConnectors
Dtk_ErrorStatus SetConnectors(Dtk_tab< Dtk_NodeConnectorPtr > inConnectedEntities)
Set the connectors to the component or entities affected by override.
error_dtk.hpp
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
DTK_TYPE_OVERRIDE_SET
@ DTK_TYPE_OVERRIDE_SET
Definition: define.h:513
DTK_TYPE_OVERRIDE
@ DTK_TYPE_OVERRIDE
Definition: define.h:512
Dtk_OverrideSet
This is the Override Set Class. The Dtk_OverrideSetPtr object is used as override set into an assembl...
Definition: dtk_override.hpp:68
Dtk_OverrideSet::Dtk_OverrideSet
Dtk_OverrideSet(const Dtk_OverrideSet &inToBeCopied)
Dtk_OverrideSet::_typeID
@ _typeID
Definition: dtk_override.hpp:118
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_OverrideSet::INV_ModelState
@ INV_ModelState
Definition: dtk_override.hpp:82
Dtk_OverrideInfo::GetConnectors
Dtk_tab< Dtk_NodeConnectorPtr > const & GetConnectors() const
Retrieves the connectors to the component or entities affected by override.
Dtk_OverrideSet::IsActivated
Dtk_bool IsActivated()
Get activation flag.
Dtk_OverrideSet::AddOverrideInfoOnComponent
Dtk_ErrorStatus AddOverrideInfoOnComponent(Dtk_OverrideInfoPtr inOverrideInfo)
Dtk_OverrideSet::CREO_SimplifiedRepresentation
@ CREO_SimplifiedRepresentation
Definition: dtk_override.hpp:80
util_stl_dtk.hpp
util_ptr_dtk.hpp
define.h
Dtk_OverrideSet::GetTargetName
const Dtk_string & GetTargetName() const
Retrieves the target name indicates child node used in node catalog.
Dtk_tab< Dtk_NodeConnectorPtr >
Dtk_Object
Definition: dtk_object.hpp:8
Dtk_OverrideSet::GetName
const Dtk_string & GetName() const
Retrieves the name .
Dtk_OverrideSet::AddOverrideInfoOnNode
Dtk_ErrorStatus AddOverrideInfoOnNode(Dtk_OverrideInfoPtr inOverrideInfo)
dtk_string.hpp
Dtk_OverrideSet::SE_DisplayConfiguration
@ SE_DisplayConfiguration
Definition: dtk_override.hpp:87
Dtk_OverrideInfo::Dtk_OverrideInfo
Dtk_OverrideInfo(const Dtk_OverrideInfo &inToBeCopied)
Dtk_OverrideSet::DtkDynamicType
Dtk_Int32 DtkDynamicType(const int &inId)
Retrieves the dynamic entity type.
Dtk_OverrideSet::Create
static Dtk_OverrideSetPtr Create(Dtk_string inName, SemanticType inType, Dtk_string inTargetName=Dtk_string(), Dtk_string inDisplayName=Dtk_string())
dtk_object.hpp
Dtk_OverrideSet::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: dtk_override.hpp:119
Dtk_OverrideSet::SW_Explosion
@ SW_Explosion
Definition: dtk_override.hpp:91