DATAKIT API  V2025.1
Dtk_SelectionSet Class Reference

Dtk_SelectionSet represents a Selection Set entity which enables selecting a group of entities in a CAD Model. More...

+ Inheritance diagram for Dtk_SelectionSet:

Public Member Functions

virtual Dtk_ErrorStatus _Store (void *)
 
Dtk_ErrorStatus AddNodeConnector (const Dtk_NodeConnectorPtr &inNodeConnector)
 Adds a new Node Connector to the pool of connectors related to the Selection Set object. More...
 
Dtk_ErrorStatus AddSelectionSet (const Dtk_SelectionSetPtr &inSelectionSet)
 Adds a sub SelectionSet related to the Selection Set object. More...
 
Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
int DtkDynamicType (const int &inId)
 
virtual void dump (FILE *file=stdout)
 
Dtk_ErrorStatus Dump (FILE *inFile)
 Dump the Selection Set entities. More...
 
Dtk_InfoPtr get_info () const
 
type_detk get_type_detk () const
 
const Dtk_IDGetID () const
 Get Internal UniqueID. More...
 
Dtk_string GetName () const
 Returns the name of the Selection Set entity. More...
 
Dtk_NodeConnectorPtr GetNodeConnectorByPos (const Dtk_Size_t &inPos) const
 Returns the connector of Selection Set defined by its position. More...
 
Dtk_tab< Dtk_NodeConnectorPtrGetNodeConnectors () const
 Returns the array of connectors specifying the group of entities defined in the Selection Set object. More...
 
Dtk_Size_t GetNodeConnectorsNb () const
 Returns the Number of connectors specifying the group of entities defined in the Selection Set object. More...
 
Dtk_tab< Dtk_SelectionSetPtrGetSelectionSet () const
 Returns the array of sub SelectionSet specifying the group of entities defined in the Selection Set object. More...
 
Dtk_SelectionSetPtr GetSelectionSetByPos (const Dtk_Size_t &inPos) const
 Returns the SelectionSet of Selection Set defined by its position. More...
 
Dtk_Size_t GetSelectionSetsNb () const
 Returns the Number of SelectionSet specifying the group of entities defined in the Selection Set object. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_InfoPtrinfo ()
 
virtual void PrepareTransfo ()
 
void SetName (const Dtk_string &inName)
 Sets the name of the Selection Set entity. More...
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 

Static Public Member Functions

static Dtk_SelectionSetPtr Create ()
 Base constructor. More...
 
static Dtk_SelectionSetDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 
static Dtk_SelectionSetPtr Release (Dtk_SelectionSetPtr inSelectionSet)
 Delete object. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_SELECTION_SET }
 
enum  { _typeID = DTK_TYPE_ENTITY }
 

Protected Member Functions

void _copy (const Dtk_Entity &s)
 
void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 
virtual Dtk_ObjectClone ()
 
 Dtk_SelectionSet ()
 Default constructor. More...
 
 Dtk_SelectionSet (const Dtk_SelectionSet &selectionSet)
 Copy constructor. More...
 
 ~Dtk_SelectionSet ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_SelectionSet >
 

Detailed Description

Dtk_SelectionSet represents a Selection Set entity which enables selecting a group of entities in a CAD Model.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
30  {
32  };

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

Constructor & Destructor Documentation

◆ Dtk_SelectionSet() [1/2]

Dtk_SelectionSet::Dtk_SelectionSet ( )
protected

Default constructor.

◆ Dtk_SelectionSet() [2/2]

Dtk_SelectionSet::Dtk_SelectionSet ( const Dtk_SelectionSet selectionSet)
protected

Copy constructor.

Parameters
selectionSetthe Dtk_SelectionSet to be copied

◆ ~Dtk_SelectionSet()

Dtk_SelectionSet::~Dtk_SelectionSet ( )
protected

Destructor.

Member Function Documentation

◆ _copy() [1/2]

void Dtk_Entity::_copy ( const Dtk_Entity s)
protectedinherited

◆ _copy() [2/2]

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Entity::_init ( )
protectedinherited

◆ _reset()

void Dtk_Entity::_reset ( )
protectedinherited

◆ _Store()

◆ AddNodeConnector()

Dtk_ErrorStatus Dtk_SelectionSet::AddNodeConnector ( const Dtk_NodeConnectorPtr inNodeConnector)

Adds a new Node Connector to the pool of connectors related to the Selection Set object.

◆ AddSelectionSet()

Dtk_ErrorStatus Dtk_SelectionSet::AddSelectionSet ( const Dtk_SelectionSetPtr inSelectionSet)

Adds a sub SelectionSet related to the Selection Set object.

◆ Clone()

virtual Dtk_Object* Dtk_SelectionSet::Clone ( )
protectedvirtual

Implements Dtk_Entity.

44 { return new Dtk_SelectionSet(*this); }

◆ Create()

static Dtk_SelectionSetPtr Dtk_SelectionSet::Create ( )
static

Base constructor.

◆ DtkDynamicCast()

static Dtk_SelectionSet* Dtk_SelectionSet::DtkDynamicCast ( Dtk_Object s)
static

Performs a dynamic cast - doesn't need RTTI -.

65  {
66  if(s->DtkDynamicType(_typeID))
67  return static_cast<Dtk_SelectionSet*>(s);
68  return NULL;
69  }

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_SelectionSet::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

55  {
56  if (inId == _typeID)
57  {
58  return 1;
59  }
60  return Dtk_Object::DtkDynamicType(inId);
61  }

◆ DtkDynamicType() [2/2]

◆ dump()

virtual void Dtk_Object::dump ( FILE *  file = stdout)
virtualinherited

◆ Dump()

Dtk_ErrorStatus Dtk_SelectionSet::Dump ( FILE *  inFile)

Dump the Selection Set entities.

Parameters
inFilethe output file

Sample

Dtk_string fileName = ...;
File * file = fileName.ouvrir_fichier(DTK_W);
Dtk_SelectionSetPtr selectionSet;
// Read the Selection Set
selectionSet.Dump(file);

◆ get_info()

Dtk_InfoPtr Dtk_Entity::get_info ( ) const
inherited

◆ get_type_detk()

type_detk Dtk_SelectionSet::get_type_detk ( ) const
virtual
Returns
The type of the entity type - DTK_TYPE_SELECTION_SET -

Implements Dtk_Entity.

72 { return DTK_TYPE_SELECTION_SET; }

◆ GetID()

const Dtk_ID& Dtk_Entity::GetID ( ) const
inherited

Get Internal UniqueID.

Returns
InternalID

◆ GetName()

Dtk_string Dtk_SelectionSet::GetName ( ) const

Returns the name of the Selection Set entity.

◆ GetNodeConnectorByPos()

Dtk_NodeConnectorPtr Dtk_SelectionSet::GetNodeConnectorByPos ( const Dtk_Size_t inPos) const

Returns the connector of Selection Set defined by its position.

◆ GetNodeConnectors()

Dtk_tab<Dtk_NodeConnectorPtr> Dtk_SelectionSet::GetNodeConnectors ( ) const

Returns the array of connectors specifying the group of entities defined in the Selection Set object.

◆ GetNodeConnectorsNb()

Dtk_Size_t Dtk_SelectionSet::GetNodeConnectorsNb ( ) const

Returns the Number of connectors specifying the group of entities defined in the Selection Set object.

◆ GetSelectionSet()

Dtk_tab<Dtk_SelectionSetPtr> Dtk_SelectionSet::GetSelectionSet ( ) const

Returns the array of sub SelectionSet specifying the group of entities defined in the Selection Set object.

◆ GetSelectionSetByPos()

Dtk_SelectionSetPtr Dtk_SelectionSet::GetSelectionSetByPos ( const Dtk_Size_t inPos) const

Returns the SelectionSet of Selection Set defined by its position.

◆ GetSelectionSetsNb()

Dtk_Size_t Dtk_SelectionSet::GetSelectionSetsNb ( ) const

Returns the Number of SelectionSet specifying the group of entities defined in the Selection Set object.

◆ GetSize()

◆ info()

Dtk_InfoPtr& Dtk_Entity::info ( )
inherited

◆ PrepareTransfo()

virtual void Dtk_Entity::PrepareTransfo ( )
virtualinherited

Reimplemented in Dtk_OffsetSurface.

◆ Release()

static Dtk_SelectionSetPtr Dtk_SelectionSet::Release ( Dtk_SelectionSetPtr  inSelectionSet)
static

Delete object.

◆ SetName()

void Dtk_SelectionSet::SetName ( const Dtk_string inName)

Sets the name of the Selection Set entity.

Parameters
inNamename

◆ Transform()

Dtk_ErrorStatus Dtk_SelectionSet::Transform ( const Dtk_transfo inTransfo)
virtual

Implements Dtk_Entity.

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_SelectionSet >

friend class Dtk_SmartPtr< Dtk_SelectionSet >
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_SelectionSet::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_SelectionSet::Dtk_SelectionSet
Dtk_SelectionSet()
Default constructor.
Dtk_string::ouvrir_fichier
FILE * ouvrir_fichier(const Dtk_string &droits) const
File Utility : Open a file with the given rights.
DTK_TYPE_SELECTION_SET
@ DTK_TYPE_SELECTION_SET
Definition: define.h:564
DTK_TYPE_ENTITY
@ DTK_TYPE_ENTITY
Definition: define.h:466
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
DTK_W
#define DTK_W
Definition: dtk_string.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:24
Dtk_Entity::_typeID
@ _typeID
Definition: util_ent_dtk.hpp:333
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_SelectionSet::_typeID
@ _typeID
Definition: util_selection_set.hpp:31