DATAKIT API  V2025.1
util_selection_set.hpp
Go to the documentation of this file.
1 #ifndef _UTIL_SELECTION_SET_HPP_
2 #define _UTIL_SELECTION_SET_HPP_
3 #include "def/define.h"
8 #include "util/error_dtk.hpp"
9 #include "util/util_ent_dtk.hpp"
10 #include "util/util_stl_dtk.hpp"
11 #include <cstdio>
12 
13 
14 class Dtk_SelectionSet;
17 
22 
24 {
25 protected:
26 
27  struct Dtk_Handle; // Not defined here
28  Dtk_Handle *_Private; // Handle
29 
30  enum {
32  };
33 
36 
39  Dtk_SelectionSet(const Dtk_SelectionSet& selectionSet);
40 
43 
44  inline virtual Dtk_Object* Clone() { return new Dtk_SelectionSet(*this); }
45 
46  friend class Dtk_SmartPtr<Dtk_SelectionSet>;
47 private:
48  void _Init();
49  void _Copy(const Dtk_SelectionSet &SelectionSet);
50  void _Reset();
51 
52 public:
55  {
56  if (inId == _typeID)
57  {
58  return 1;
59  }
60  return Dtk_Object::DtkDynamicType(inId);
61  }
62 
65  {
66  if(s->DtkDynamicType(_typeID))
67  return static_cast<Dtk_SelectionSet*>(s);
68  return NULL;
69  }
70 
73 
75 
76 
79 
82 
95  Dtk_ErrorStatus Dump(FILE * inFile);
96 
99 
102  void SetName(const Dtk_string& inName);
103 
106 
109 
112 
115 
118 
121 
124 
127 };
128 
129 #endif
130 
131 
Dtk_SelectionSet::Dtk_SelectionSet
Dtk_SelectionSet()
Default constructor.
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Dtk_SelectionSet::Dump
Dtk_ErrorStatus Dump(FILE *inFile)
Dump the Selection Set entities.
Dtk_SelectionSetPtr
Dtk_SmartPtr< Dtk_SelectionSet > Dtk_SelectionSetPtr
Definition: util_selection_set.hpp:14
Dtk_SelectionSet::~Dtk_SelectionSet
~Dtk_SelectionSet()
Destructor.
DTK_TYPE_SELECTION_SET
@ DTK_TYPE_SELECTION_SET
Definition: define.h:564
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:619
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:712
Dtk_SelectionSet::GetName
Dtk_string GetName() const
Returns the name of the Selection Set entity.
Dtk_SelectionSet::Transform
Dtk_ErrorStatus Transform(const Dtk_transfo &inTransfo)
Dtk_SelectionSet::GetNodeConnectorByPos
Dtk_NodeConnectorPtr GetNodeConnectorByPos(const Dtk_Size_t &inPos) const
Returns the connector of Selection Set defined by its position.
Dtk_SelectionSet::_Private
Dtk_Handle * _Private
Definition: util_selection_set.hpp:27
Dtk_SelectionSet::AddNodeConnector
Dtk_ErrorStatus AddNodeConnector(const Dtk_NodeConnectorPtr &inNodeConnector)
Adds a new Node Connector to the pool of connectors related to the Selection Set object.
Dtk_SelectionSet::Clone
virtual Dtk_Object * Clone()
Definition: util_selection_set.hpp:44
Dtk_SelectionSet
Dtk_SelectionSet represents a Selection Set entity which enables selecting a group of entities in a C...
Definition: util_selection_set.hpp:24
util_ent_dtk.hpp
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:687
dtk_maindoc_ptr.hpp
Dtk_SelectionSet::GetSelectionSetsNb
Dtk_Size_t GetSelectionSetsNb() const
Returns the Number of SelectionSet specifying the group of entities defined in the Selection Set obje...
Dtk_SelectionSet::DtkDynamicCast
static Dtk_SelectionSet * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Definition: util_selection_set.hpp:64
error_dtk.hpp
Dtk_SelectionSet::Dtk_SelectionSet
Dtk_SelectionSet(const Dtk_SelectionSet &selectionSet)
Copy constructor.
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SelectionSet::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Definition: util_selection_set.hpp:54
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
dtk_transfo.hpp
type_detk
type_detk
Definition: define.h:32
util_stl_dtk.hpp
define.h
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
Dtk_SelectionSetTab
Dtk_tab< Dtk_SelectionSetPtr > Dtk_SelectionSetTab
Definition: util_selection_set.hpp:16
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_SelectionSet::AddSelectionSet
Dtk_ErrorStatus AddSelectionSet(const Dtk_SelectionSetPtr &inSelectionSet)
Adds a sub SelectionSet related to the Selection Set object.
Dtk_SelectionSet::GetSelectionSet
Dtk_tab< Dtk_SelectionSetPtr > GetSelectionSet() const
Returns the array of sub SelectionSet specifying the group of entities defined in the Selection Set o...
Dtk_SelectionSet::Create
static Dtk_SelectionSetPtr Create()
Base constructor.
Dtk_Object
Definition: dtk_object.hpp:8
Dtk_SelectionSet::Release
static Dtk_SelectionSetPtr Release(Dtk_SelectionSetPtr inSelectionSet)
Delete object.
dtk_string.hpp
Dtk_SelectionSet::get_type_detk
type_detk get_type_detk() const
Definition: util_selection_set.hpp:72
Dtk_SelectionSet::_typeID
@ _typeID
Definition: util_selection_set.hpp:31
Dtk_SelectionSet::SetName
void SetName(const Dtk_string &inName)
Sets the name of the Selection Set entity.
Dtk_SelectionSet::GetSelectionSetByPos
Dtk_SelectionSetPtr GetSelectionSetByPos(const Dtk_Size_t &inPos) const
Returns the SelectionSet of Selection Set defined by its position.
dtk_object.hpp
Dtk_SelectionSet::GetNodeConnectorsNb
Dtk_Size_t GetNodeConnectorsNb() const
Returns the Number of connectors specifying the group of entities defined in the Selection Set object...
Dtk_SelectionSet::GetNodeConnectors
Dtk_tab< Dtk_NodeConnectorPtr > GetNodeConnectors() const
Returns the array of connectors specifying the group of entities defined in the Selection Set object.
Dtk_Entity
Definition: util_ent_dtk.hpp:329