DATAKIT SDK  V2026.2
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  {
76  // [SOLIDWORKS]
79  // [NX]
82  // [Catia V5]
84  // [Catia V6]
86  // [Solid Edge]
89  // [Creo]
91  // [Inventor]
93  // [ZW3D]
95  };
97  {
98  switch (inEnum)
99  {
100  case DefaultType: return L"DefaultType";
101  case SW_Configuration: return L"SW_Configuration";
102  case SW_Explosion: return L"SW_Explosion";
103  case NX_Arrangement: return L"NX_Arrangement";
104  case NX_Explosion: return L"NX_Explosion";
105  case CatiaV5_Scene: return L"CatiaV5_Scene";
106  case CatiaV6_Scene: return L"CatiaV6_Scene";
107  case SE_DisplayConfiguration: return L"SE_DisplayConfiguration";
108  case SE_ExplodedView: return L"SE_ExplodedView";
109  case CREO_Explosion: return L"CREO_Explosion";
110  case INV_ModelState: return L"INV_ModelState";
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  Dtk_Handle *_Private; // Handle
121 private:
122  void _Init();
123  void _Reset();
124  void _Copy(const Dtk_OverrideSet& s);
125 private:
126  Dtk_OverrideSet( );
127  Dtk_OverrideSet( Dtk_string inName, SemanticType inType, Dtk_string inTargetName );
128  //! \BaseDestructor
129  ~Dtk_OverrideSet();
130 public:
131  Dtk_OverrideSet(const Dtk_OverrideSet& inToBeCopied);
132 
133 
134  //! \DtkDynamicCast
136  static Dtk_OverrideSetPtr Create( Dtk_string inName, SemanticType inType= DefaultType, Dtk_string inTargetName = Dtk_string() );
137 public:
138  //! \brief Set the connectors to the component or entities affected by override.
139  //! \return dtkNoError if ok.
144 
145 
146 public:
147  //! \DtkDynamicType
148  Dtk_Int32 DtkDynamicType(const int& inId);
149  //! \brief Retrieves the overrides.
150  //! \return the overrides.
153 
154  //! \brief Retrieves the name .
155  //! \return the name if succeeds, empty string otherwise.
156  const Dtk_string& GetName() const;
157  //! \brief Retrieves the target name.
158  //! \return the target name if succeeds, empty string otherwise.
159  const Dtk_string& GetTargetName() const;
160  //! \brief Retrieves Semantic Type in the original software.
161  //! \return type of information stored in the original software.
163 
164  //! \brief Ge.
165  //! \return DTK_TRUE if this override set is activated, DTK_FALSE otherwise.
167  void SetActivated(Dtk_bool inActivationFlag);
168  //! \brief Set the connectors to the component or entities affected by override.
169  //! \return dtkNoError if ok.
171  //! \brief Retrieves the connectors to the component or entities affected by override.
172  //! \return the connectors.
174  //! \brief Clear Volatile Override Infos.
175  //! \return dtkNoError if ok.
177 
178 
179 };
180 /////////////////////////////////////////////////////////////////////////////
181 
182 
183 #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_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:90
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:74
Dtk_OverrideSet::DefaultType
@ DefaultType
Definition: dtk_override.hpp:75
Dtk_bool
char Dtk_bool
Definition: define.h:717
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:94
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:81
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:83
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:96
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:80
dtk_override_ptr.hpp
Dtk_OverrideSet::CatiaV6_Scene
@ CatiaV6_Scene
Definition: dtk_override.hpp:85
Dtk_OverrideSet::SW_Configuration
@ SW_Configuration
Definition: dtk_override.hpp:77
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:679
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:119
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
DTK_TYPE_OVERRIDE_SET
@ DTK_TYPE_OVERRIDE_SET
Definition: define.h:513
Dtk_OverrideSet::Create
static Dtk_OverrideSetPtr Create(Dtk_string inName, SemanticType inType=DefaultType, Dtk_string inTargetName=Dtk_string())
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:118
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_OverrideSet::INV_ModelState
@ INV_ModelState
Definition: dtk_override.hpp:92
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()
Ge.
Dtk_OverrideSet::AddOverrideInfoOnComponent
Dtk_ErrorStatus AddOverrideInfoOnComponent(Dtk_OverrideInfoPtr inOverrideInfo)
util_stl_dtk.hpp
util_ptr_dtk.hpp
define.h
Dtk_OverrideSet::GetTargetName
const Dtk_string & GetTargetName() const
Retrieves the target name.
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: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_object.hpp
Dtk_OverrideSet::SW_Explosion
@ SW_Explosion
Definition: dtk_override.hpp:78