DATAKIT API  V2025.4
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 
23 {
24 protected:
25 
26  struct Dtk_Handle; // Not defined here
27  Dtk_Handle *_Private; // Handle
28 
29  enum {
31  };
32 
35 
38  Dtk_SelectionSet(const Dtk_SelectionSet& selectionSet);
39 
42 
43  inline virtual Dtk_Object* Clone() { return new Dtk_SelectionSet(*this); }
44 
45  friend class Dtk_SmartPtr<Dtk_SelectionSet>;
46 private:
47  void _Init();
48  void _Copy(const Dtk_SelectionSet &SelectionSet);
49  void _Reset();
50 
51 public:
54  {
55  if (inId == _typeID)
56  {
57  return 1;
58  }
59  return Dtk_Object::DtkDynamicType(inId);
60  }
61 
64  {
65  if(s->DtkDynamicType(_typeID))
66  return static_cast<Dtk_SelectionSet*>(s);
67  return NULL;
68  }
69 
72 
74 
77 
80 
93  Dtk_ErrorStatus Dump(FILE * inFile);
94 
97 
100  void SetName(const Dtk_string& inName);
101 
104 
107 
110 
113 
116 
119 
122 
125 };
126 
127 #endif
128 
129 
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:566
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:622
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:714
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:26
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:43
Dtk_SelectionSet
Dtk_SelectionSet represents a Selection Set entity which enables selecting a group of entities in a C...
Definition: util_selection_set.hpp:23
util_ent_dtk.hpp
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:689
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:63
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:53
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()
Calls default constructor to allocate a new object.
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:71
Dtk_SelectionSet::_typeID
@ _typeID
Definition: util_selection_set.hpp:30
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:349