DATAKIT SDK  V2026.3
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 
13 /////////////////////////////////////////////////////////////////////////////
14 //! \ingroup DtkAPIGroup
15 //! \class Dtk_OverrideInfo
16 //! \brief This is the Override Information Class.\n
17 //! The Dtk_OverridePtr object is used as override information into an assembly tree.\n
18 //! \SmartPtr{Dtk_OverrideInfo}
20 {
21  friend class Dtk_SmartPtr<Dtk_OverrideInfo>;
22 protected:
24  struct Dtk_Handle; // Not defined here
25  Dtk_Handle *_Private; // Handle
26 private:
27  void _Init();
28  void _Reset();
29  void _Copy(const Dtk_OverrideInfo& s);
30 private:
31  Dtk_OverrideInfo(Dtk_string inName, Dtk_InfoPtr inNewAttributes, Dtk_transfoPtr inNewTransformationMatrix, Dtk_FeaturePtr inAssemblyFeature);
32  //! \BaseDestructor
34 public:
35  Dtk_OverrideInfo(const Dtk_OverrideInfo& inToBeCopied);
36 public:
37  //! \DtkDynamicCast
39  static Dtk_OverrideInfoPtr Create( Dtk_string inName, Dtk_InfoPtr inNewAttributes, Dtk_transfoPtr inNewTransformationMatrix, Dtk_FeaturePtr inAssemblyFeature);
40 public:
41  //! \DtkDynamicType
42  Dtk_Int32 DtkDynamicType(const int& inId);
43  //! \brief Set the connectors to the component or entities affected by override.
44  //! \return dtkNoError if ok.
46  //! \brief Retrieves the connectors to the component or entities affected by override.
47  //! \return the connectors.
49  //! \brief Retrieves the name.
50  //! \return the name if succeeds, empty string otherwise.
51  const Dtk_string& GetName() const;
52  //! \brief Retrieves the position.
53  //! \return the position if succeeds, nullptr otherwise.
54  const Dtk_transfoPtr& GetPosition() const;
55  //! \brief Retrieves the Dtk_InfoPtr.
56  //! \return the Dtk_InfoPtr if succeeds, nullptr otherwise.
57  const Dtk_InfoPtr& GetInfos() const;
58  //! \brief Retrieves the Dtk_FeaturePtr.
59  //! \return the Dtk_FeaturePtr if succeeds, nullptr otherwise.
61 };
62 /////////////////////////////////////////////////////////////////////////////
63 
64 /////////////////////////////////////////////////////////////////////////////
65 //! \ingroup DtkAPIGroup
66 //! \class Dtk_OverrideSet
67 //! \brief This is the Override Set Class.\n
68 //! The Dtk_OverrideSetPtr object is used as override set into an assembly tree.\n
69 //! \SmartPtr{Dtk_OverrideSet}
71 {
72 public:
74  {
75  //InitialState
77  // [Catia V5]
79  // [Catia V6]
81  // [Creo]
84  // [Inventor]
86  // [NX]
89  // [Solid Edge]
92  // [SOLIDWORKS]
95  // [ZW3D]
97  };
99  {
100  switch (inEnum)
101  {
102  case DefaultType: return L"Default";
103  case CatiaV5_Scene: return L"CatiaV5_Scene";
104  case CatiaV6_Scene: return L"CatiaV6_Scene";
105  case CREO_Explosion: return L"CREO_Explosion";
106  case CREO_SimplifiedRepresentation: return L"CREO_SimplifiedRepresentation";
107  case INV_ModelState: return L"INV_ModelState";
108  case NX_Arrangement: return L"NX_Arrangement";
109  case NX_Explosion: return L"NX_Explosion";
110  case SE_DisplayConfiguration: return L"SE_DisplayConfiguration";
111  case SE_ExplodedView: return L"SE_ExplodedView";
112  case SW_Configuration: return L"SW_Configuration";
113  case SW_Explosion: return L"SW_Explosion";
114  case ZW3D_Configuration: return "ZW3D_Configuration";
115  default: return L"Unknown";
116  }
117  }
118 
119  friend class Dtk_SmartPtr<Dtk_OverrideSet>;
120 protected:
122  struct Dtk_Handle; // Not defined here
123  Dtk_Handle *_Private; // Handle
124 private:
125  void _Init();
126  void _Reset();
127  void _Copy(const Dtk_OverrideSet& s);
128 private:
129  Dtk_OverrideSet( );
130  Dtk_OverrideSet( Dtk_string inName, SemanticType inType, Dtk_string inTargetName, Dtk_string inDisplayName );
131  //! \BaseDestructor
132  ~Dtk_OverrideSet();
133 public:
134  Dtk_OverrideSet(const Dtk_OverrideSet& inToBeCopied);
135 
136 
137  //! \DtkDynamicCast
139  static Dtk_OverrideSetPtr Create( Dtk_string inName, SemanticType inType, Dtk_string inTargetName = Dtk_string(), Dtk_string inDisplayName = Dtk_string() );
140 public:
141  //! \brief Set the connectors to the component or entities affected by override.
142  //! \return dtkNoError if ok.
147 
148 
149 public:
150  //! \DtkDynamicType
151  Dtk_Int32 DtkDynamicType(const int& inId);
152  //! \brief Retrieves the overrides.
153  //! \return the overrides.
156 
157  //! \brief Retrieves the name .
158  //! \return the name if succeeds, empty string otherwise.
159  const Dtk_string& GetName() const;
160  //! \brief Retrieves the target name
161  //! indicates child node used in node catalog.
162  //! \return the target name if succeeds, empty string otherwise.
163  const Dtk_string& GetTargetName() const;
164  //! \brief Retrieves the display name
165  //! indicates display used
166  //! \return the display name if succeeds, empty string otherwise.
167  const Dtk_string& GetDisplayName() const;
168 
169  //! \brief Retrieves Semantic Type in the original software.
170  //! \return type of information stored in the original software.
172 
173  //! \brief Get activation flag.
174  //! \return DTK_TRUE if this override set is activated, DTK_FALSE otherwise.
176  void SetActivated(Dtk_bool inActivationFlag);
177  //! \brief Set the connectors to the component or entities affected by override.
178  //! \return dtkNoError if ok.
180  //! \brief Retrieves the connectors to the component or entities affected by override.
181  //! \return the connectors.
183  //! \brief Clear Volatile Override Infos.
184  //! \return dtkNoError if ok.
186 
187 
188 };
189 /////////////////////////////////////////////////////////////////////////////
190 
191 
192 #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:20
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:82
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_OverrideSet::SE_ExplodedView
@ SE_ExplodedView
Definition: dtk_override.hpp:91
Dtk_OverrideInfo::GetAssemblyFeature
const Dtk_FeaturePtr & GetAssemblyFeature() const
Retrieves the Dtk_FeaturePtr.
Dtk_OverrideSet::SemanticType
SemanticType
Definition: dtk_override.hpp:74
Dtk_OverrideSet::DefaultType
@ DefaultType
Definition: dtk_override.hpp:76
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:96
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:88
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:78
Dtk_OverrideSet::GetSemanticType
SemanticType GetSemanticType() const
Retrieves Semantic Type in the original software.
Dtk_OverrideInfo::_typeID
@ _typeID
Definition: dtk_override.hpp:23
Dtk_OverrideSet::Dtk_OverrideSetEnumToString
static Dtk_string Dtk_OverrideSetEnumToString(const SemanticType &inEnum)
Definition: dtk_override.hpp:98
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:87
dtk_override_ptr.hpp
Dtk_OverrideSet::CatiaV6_Scene
@ CatiaV6_Scene
Definition: dtk_override.hpp:80
Dtk_OverrideSet::SW_Configuration
@ SW_Configuration
Definition: dtk_override.hpp:93
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_OverrideSet::_Private
Dtk_Handle * _Private
Definition: dtk_override.hpp:122
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:71
Dtk_OverrideSet::Dtk_OverrideSet
Dtk_OverrideSet(const Dtk_OverrideSet &inToBeCopied)
Dtk_OverrideSet::_typeID
@ _typeID
Definition: dtk_override.hpp:121
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_OverrideSet::INV_ModelState
@ INV_ModelState
Definition: dtk_override.hpp:85
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:83
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_OverrideInfo::_Private
Dtk_Handle * _Private
Definition: dtk_override.hpp:24
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:90
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::SW_Explosion
@ SW_Explosion
Definition: dtk_override.hpp:94