DATAKIT API  V2025.1
Selection Set sample

An array of "Selection Set" may be associated to each Dtk_Component. You can retrieve it via the Dtk_GlobalDataSet ...

/* Get Dtk_GlobalDataSetPtr class */
Dtk_GlobalDataSetPtr ptrGlobalDataSet = inComponent->GetGlobalDataSet(); // inComponent is the current object of the Dtk_ComponentPtr class
if (ptrGlobalDataSet.IsNotNULL())
{
/* Get the Set of "Selection Set" entities */
Dtk_SelectionDataSetPtr ptrSelectionDataSet = ptrGlobalDataSet->GetSelectionDataSet();
// Get the number of "Selection Set" entities
Dtk_Size_t ptrSelectionDataSetNb = ptrSelectionDataSet->GetNumSelectionSets();
// For each element of the "Selection Set" array
for (i = 0; i < ptrSelectionDataSetNb; i++ )
{
// Retrieve and dump the current Selection Set
Dtk_SelectionSetPtr curSelectionSet = ptrSelectionDataSet->GetSelectionSetByPos(i);
if (curSelectionSet.IsNotNULL())
}
}
Dtk_SmartPtr::IsNotNULL
Dtk_bool IsNotNULL() const
Definition: util_ptr_dtk.hpp:119
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:712
Dtk_DumpXml_Dtk_SelectionSet
Dtk_ErrorStatus Dtk_DumpXml_Dtk_SelectionSet(FILE *F, const Dtk_SelectionSetPtr &inSelectionSet)
Definition: util_xml_dtk.cpp:6725
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37