DATAKIT SDK  V2026.4
Dtk_Component Class Reference

This is the Component Class.
The Dtk_ComponentPtr object is used as element into an assembly tree.
Is typically used as a Part into an Assembly Tree.
. More...

+ Inheritance diagram for Dtk_Component:

Public Types

enum  ComponentAvailabilityEnum {
  ComponentMissing = 0x1, ComponentFound = 0x2, ComponentInternal = 0x4, ComponentPhantom = 0x8,
  ComponentAdditionnalReference = 0x10, ComponentAssemblyGeometry = 0x20, ComponentWithUnavailableReader = 0x40, ComponentNotRequired = 0x80
}
 
enum  ComponentTypeEnum { InstanceComponentType = 0, PrototypeComponentType, CatalogComponentType, VirtualComponentType }
 

Public Member Functions

void AddChild (const Dtk_ComponentPtr &inChild)
 Adds a child Dtk_Component to main Component. More...
 
Dtk_ErrorStatus AddComponentAvailability (ComponentAvailabilityEnum inComponentAvailability)
 
void AddMetaData (const Dtk_MetaDataPtr &inMetaData)
 Adds a Dtk_MetaDataPtr to the Dtk_DocElement. More...
 
void AddMetaDataGroup (const Dtk_MetaDataGroupPtr &inMetaDataGroup, Dtk_bool inAddMetadata=DTK_FALSE)
 Adds a Dtk_MetaDataGroupPtr to the Dtk_DocElement. More...
 
DtkErrorStatus AddOverrideSet (const Dtk_OverrideSetPtr &inOverrideSet)
 Adds Override set to a prototype component
More...
 
void AddProperty (const Dtk_PropertiesPtr &inProperty)
 Adds a Dtk_PropertiesPtr to the Dtk_DocElement. More...
 
const ComponentTypeEnum & ComponentType () const
 Retrieves the Dtk_Component Type - read only -. More...
 
Dtk_NodePtr CreateAxisSystemNode (Dtk_string inName, const Dtk_ID &inAxisSystemID, const type_detk inSubType=DTK_TYPE_AXIS_SYSTEM)
 Creates a AxisSystem Dtk_NodePtr from a AxisSystemPtr. More...
 
Dtk_NodePtr CreateBodyNode (Dtk_string inName, const Dtk_ID &inBodyID, const Dtk_Int32 inBodyFlag, const type_detk inSubType=DTK_TYPE_BODY)
 Creates a Body Dtk_NodePtr from a body ID. More...
 
Dtk_NodePtr CreateCameraNode (Dtk_string inName, const Dtk_ID &inCameraID)
 Creates a Camera Dtk_NodePtr from a Camera. More...
 
Dtk_NodePtr CreateColorInfosSetNode (Dtk_string inName, const Dtk_ID &inColorInfosSetID)
 Creates a ColorInfosSet Dtk_NodePtr from a ColorInfosSetPtr. More...
 
Dtk_NodePtr CreateConstraintNode (Dtk_string inName, const Dtk_ID &inConstraintID, const type_detk inSubType=DTK_TYPE_CONSTRAINT)
 Creates a Constraint Dtk_NodePtr from a Dtk_ConstraintPtr. More...
 
Dtk_NodePtr CreateDrawingNode (Dtk_string inName, const Dtk_ID &inDrawingID)
 Creates a Drawing Dtk_NodePtr from a Dtk_DrawingPtr. More...
 
Dtk_NodePtr CreateFdtNode (Dtk_string inName, const Dtk_ID &inFdtID, const type_detk inSubType=DTK_TYPE_FDT)
 Creates a Fdt Dtk_NodePtr from a Dtk_FdtPtr ID. More...
 
Dtk_NodePtr CreateKinematicsNode (Dtk_string inName, const Dtk_ID &inKinematicID)
 Creates a Kinematic Dtk_NodePtr from a Dtk_KinematicPtr. More...
 
Dtk_NodePtr CreateLayerInfosSetNode (Dtk_string inName, const Dtk_ID &inLayerInfosSetID)
 Creates a LayerInfosSet Dtk_NodePtr from a LayerInfosSetPtr. More...
 
Dtk_NodePtr CreateMeshNode (Dtk_string inName, const Dtk_ID &inMeshID, const Dtk_Int32 inMeshFlag, const type_detk inSubType=DTK_TYPE_MESH)
 Creates a Mesh Dtk_NodePtr from a Mesh ID. More...
 
Dtk_NodePtr CreateMetaDataNode (Dtk_string inName, const Dtk_ID &inMetaDataID, const type_detk inSubType=DTK_TYPE_METADATA)
 Creates a MetaData Dtk_NodePtr from a Dtk_MetaDataPtr. More...
 
Dtk_NodePtr CreateModelDisplayNode (Dtk_string inName, const Dtk_ID &inDisplayModelID, const type_detk inSubType=DTK_TYPE_NO_SUBTYPE)
 Creates a ModelDisplay Dtk_NodePtr from a DisplayModel. More...
 
Dtk_NodePtr CreateVirtualNode (Dtk_string inName, const type_detk inSubType=DTK_TYPE_NO_SUBTYPE)
 Creates a Virtual Dtk_NodePtr. More...
 
Dtk_ErrorStatus DevalidateNode (const Dtk_NodeID &inNodeID)
 Devalidates Component into MainDoc. More...
 
Dtk_Int32 DtkDynamicType (const int &inId)
 Retrieves the dynamic entity type. More...
 
virtual void dump (FILE *file=stdout)
 
const Dtk_string & FullPathName () const
 Retrieves the Dtk_Component FullPathName - read only -. More...
 
Dtk_tab< Dtk_Int32 > GetActivatedChildrenInCatalog () const
 Returns Activated Children Index or empty array if Component isn't a catalog. More...
 
const DtkReaderType & GetAssociatedModuleType () const
 Retrieves the Dtk_Component AssociatedModuleType - read only -. More...
 
Dtk_ErrorStatus GetBoundingBox (Dtk_pnt &outMin, Dtk_pnt &outMax) const
 Gets BoundingBox on Prototype Component if it can be read in original file. More...
 
const Dtk_ComponentPtr GetChild (const Dtk_Size_t &inPos) const
 Retrieves the ith Dtk_ComponentPtr - read only -. More...
 
Dtk_ErrorStatus GetConceptionUnitScale (Dtk_Double64 &outUnitScale) const
 Get the Original Units for documents - geometrical data are given in MM (Scale to MM) More...
 
Dtk_ErrorStatus GetConnectorsPointingToThisComponent (Dtk_tab< Dtk_NodeConnectorPtr > &outConnectedEntities)
 Retrieves the connectors pointing on this component. More...
 
Dtk_Int32 GetDefaultChildInCatalog () const
 Returns Default Child Index or -1 if Component isn't a catalog. More...
 
Dtk_ID GetFatherID (Dtk_Size_t inIndex) const
 Retrieves Dtk_DocElement ith FatherID - read only -. More...
 
Dtk_NodePtr GetFatherNode (const Dtk_NodePtr &inNode) const
 Retrieves the father Dtk_NodePtr of the given Dtk_NodePtr. More...
 
const Dtk_string & GetFileVersion () const
 Gets File Version. More...
 
const Dtk_GlobalDataSetPtr GetGlobalDataSet () const
 Retrieves the Dtk_GlobalDataSetPtr attached to the Dtk_Component - get only -. More...
 
Dtk_ID GetID () const
 Retrieves the Dtk_DocElement ID - read only -. More...
 
Dtk_InfoPtr GetInfos () const
 Retrieves the Dtk_DocElement Dtk_InfoPtr - read only -. More...
 
Dtk_LayerInfosSetPtr GetLayerInfosSet () const
 Retrieves the Dtk_LayerInfosSet of this component. More...
 
Dtk_MetaDataPtr GetMetaData (const Dtk_Size_t &inPos) const
 Retrieves the ith Dtk_MetaDataPtr - read only -. More...
 
Dtk_MetaDataGroupPtr GetMetaDataGroup (const Dtk_Size_t &inPos) const
 Retrieves the ith Dtk_MetaDataGrouplPtr - read only -. More...
 
Dtk_NodePtr GetNodeByID (const Dtk_NodeID &inNodeID) const
 Retrieves a Dtk_NodePtr from the Dtk_Component NodesPool giving his Id. More...
 
Dtk_Size_t GetNumChildren () const
 Retrieves the number of the Dtk_DocElement children - read only -. More...
 
Dtk_Size_t GetNumFathers () const
 GetNumFather. More...
 
Dtk_Size_t GetNumMetaData () const
 Retrieves the number of the Dtk_MetaDataPtr - read only -. More...
 
Dtk_Size_t GetNumMetaDataGroup () const
 Retrieves the number of the Dtk_MetaDataGroupPtr - read only -. More...
 
Dtk_Size_t GetNumNodes () const
 Gives number of Nodes in the Component (useful if you want to handle progress bar). More...
 
Dtk_Size_t GetNumOverrideSets () const
 Gives number of Override sets in a prototype component
More...
 
DtkErrorStatus GetOverrideSets (Dtk_tab< Dtk_OverrideSetPtr > &outOverrideSet) const
 Gives array of Override sets in a prototype component
More...
 
Dtk_PreviewPtr GetPreview () const
 Retrieves the Dtk_DocElement Dtk_PreviewPtr - read only -. More...
 
void GetReadID (Dtk_ID &outReadID) const
 
DtkErrorStatus GetSiblingName (Dtk_string &outSiblingName) const
 SiblingName for Component. More...
 
virtual Dtk_Size_t GetSize () const
 
const Dtk_string & InstanceName () const
 Retrieves the Dtk_Component InstanceName - read only -. More...
 
Dtk_bool IsAdditionnalReference () const
 Returns DTK_TRUE if Dtk_Component is Additionnal Reference. More...
 
Dtk_bool IsAssembly () const
 Returns DTK_TRUE if Dtk_Component is an assembly. More...
 
bool IsAvailabilityFlaggedAs (Dtk_Component::ComponentAvailabilityEnum inStatusToCheck) const
 Check Dtk_Component availability - read only - Each Dtk_Component can have several status (ex : AdditionnalReference and Missing) More...
 
Dtk_string & Name ()
 
const Dtk_string & Name () const
 Retrieves the Dtk_DocElement Name - read only -. More...
 
const Dtk_string & OriginalPathName () const
 Retrieves the Dtk_Component OriginalPathName (read in file) - read only -. More...
 
void ReleasePreview ()
 
Dtk_ErrorStatus ReplaceChildComponent (const Dtk_Size_t &inPos, const Dtk_ComponentPtr &inNewChild)
 Replaces a child Dtk_ComponentPtr by another one. Also updates father lists. More...
 
 SetAsDeprecated ("2026.2", "Use Dtk_LayerInfoSet::GetCurrentLayer instead") Dtk_Int32 GetCurrentLayer() const
 Current layer for Component. More...
 
 SetAsDeprecated ("2026.2", "Use Dtk_LayerInfoSet::SetCurrentLayer instead") void SetCurrentLayer(Dtk_Int32 inCurrentLayer)
 
 SetAsDeprecated ("2026.2", "Use Dtk_LayerInfosSet::AddLayer instead") void SetSelectableLayers(const Dtk_tab< Dtk_Int32 > &inSelectableLayers)
 
 SetAsDeprecated ("2026.2", "Use Dtk_LayerInfosSet::AddLayer instead") void SetVisibleLayers(const Dtk_tab< Dtk_Int32 > &inVisibleLayers)
 
 SetAsDeprecated ("2026.2", "Use GetLayerInfosSet() then Dtk_LayerInfosSet::GetLayersFlaggedAs( Dtk_LayerInfosSet::Layer::Status::Selectable ) instead") void GetSelectableLayers(Dtk_tab< Dtk_Int32 > &outSelectableLayers) const
 Selectable layer for Component. More...
 
 SetAsDeprecated ("2026.2", "Use GetLayerInfosSet() then Dtk_LayerInfosSet::GetLayersFlaggedAs( Dtk_LayerInfosSet::Layer::Status::Visible ) instead") void GetVisibleLayers(Dtk_tab< Dtk_Int32 > &outVisibleLayers) const
 Visible layer for Component. More...
 
 SetAsDeprecated ("2026.3", "Use Dtk_Component::IsAvailabilityFlaggedAs method instead.") const ComponentAvailabilityEnum ComponentAvailability() const
 Gives Dtk_Component availability - read only -. More...
 
 SetAsDeprecated ("2026.3", "use GetInfos()->AddRenderInfos and GetInfos()->AddMaterialInfos methods instead.") void SetMaterial(Dtk_MaterialPtr inMaterial)
 
 SetAsDeprecated ("2026.3", "use GetInfos()->GetRenderInfos and GetInfos()->GetPhysicalMaterialInfos methods instead.") Dtk_MaterialPtr GetMaterial() const
 Retrieves the Dtk_DocElement Dtk_MaterialPtr - read only -. More...
 
Dtk_ErrorStatus SetComponentAvailability (ComponentAvailabilityEnum inComponentAvailability)
 
void SetConceptionUnitScale (Dtk_Double64 inUnitScale)
 
void SetFileVersion (const Dtk_string &inFileVersion)
 
void SetInfos (const Dtk_InfoPtr &inInfos)
 
DtkErrorStatus SetOverrideSets (const Dtk_tab< Dtk_OverrideSetPtr > &inOverrideSets)
 Sets array of Override sets in a prototype component. More...
 
void SetPreview (Dtk_PreviewPtr inPreview)
 
void SetReadID (const Dtk_ID &inNewID)
 
void SetSelectionDataSet (const Dtk_SelectionDataSetPtr &inSelectionDataSet)
 Attaches SelectionDataSet infos to the Dtk_Component - through the Dtk_GlobalDataSetPtr -. More...
 
DtkErrorStatus SetSiblingName (const Dtk_string &inSiblingName)
 
const Dtk_transfo & TransformationMatrix () const
 Retrieves the Dtk_Component TransformationMatrix - read only -. More...
 

Static Public Member Functions

static Dtk_string ComponentAvailabilityEnumToString (const ComponentAvailabilityEnum &inEnum)
 
static Dtk_string ComponentTypeEnumToString (const ComponentTypeEnum &inEnum)
 
static Dtk_Int32 ComponentTypeStringToInt (const Dtk_string &name)
 
static Dtk_Component * DtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_DOC_ELEMENT }
 
enum  { _typeID = DTK_TYPE_COMPONENT }
 

Protected Member Functions

void _AddChild (const Dtk_DocElementPtr &inChild)
 Adds a child Dtk_DocElement to main Element. More...
 
const Dtk_DocElementPtr _GetChild (const Dtk_Size_t &inPos) const
 Retrieves the ith Dtk_DocElement - read only -. More...
 
void _ReleaseNodes ()
 
void _ReleaseVolatileData ()
 
Dtk_ErrorStatus _ReplaceChild (const Dtk_Size_t &inPos, const Dtk_DocElementPtr &inNewChild)
 Replaces a child by another one. Also update father lists. More...
 

Protected Attributes

std::unique_ptr< Dtk_Handle > _Private
 
unsigned long count_
 

Detailed Description

This is the Component Class.
The Dtk_ComponentPtr object is used as element into an assembly tree.
Is typically used as a Part into an Assembly Tree.
.

See also
Use Dtk_ComponentPtr class to handle it.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 

◆ ComponentAvailabilityEnum

Enumerator
ComponentMissing 
ComponentFound 
ComponentInternal 
ComponentPhantom 
ComponentAdditionnalReference 
ComponentAssemblyGeometry 
ComponentWithUnavailableReader 
ComponentNotRequired 
561  {
562  ComponentMissing = 0x1,
563  ComponentFound = 0x2,
564  ComponentInternal = 0x4,
565  ComponentPhantom = 0x8,
569  ComponentNotRequired = 0x80
570  };

◆ ComponentTypeEnum

Enumerator
InstanceComponentType 
PrototypeComponentType 
CatalogComponentType 
VirtualComponentType 
572  {
577 
578  };

Member Function Documentation

◆ _AddChild()

void Dtk_DocElement::_AddChild ( const Dtk_DocElementPtr &  inChild)
protectedinherited

Adds a child Dtk_DocElement to main Element.

Parameters
inChildThe Dtk_DocElement to be added as a child.

◆ _GetChild()

const Dtk_DocElementPtr Dtk_DocElement::_GetChild ( const Dtk_Size_t &  inPos) const
protectedinherited

Retrieves the ith Dtk_DocElement - read only -.

Parameters
inPosChild element index.
Returns
the inPos'th Dtk_DocElement

◆ _ReleaseNodes()

void Dtk_Component::_ReleaseNodes ( )
protected

◆ _ReleaseVolatileData()

void Dtk_Component::_ReleaseVolatileData ( )
protected

◆ _ReplaceChild()

Dtk_ErrorStatus Dtk_DocElement::_ReplaceChild ( const Dtk_Size_t &  inPos,
const Dtk_DocElementPtr &  inNewChild 
)
protectedinherited

Replaces a child by another one. Also update father lists.

Parameters
inPosOld Child element index.
inNewChildThe Dtk_DocElement replacing the old one

Internal use only

Returns
the DtkNoerrror if success.
the dtkErrorOutOfRange if bad inPos parameter.
the dtkErrorNullPointer if inNewChild is NULL.

◆ AddChild()

void Dtk_Component::AddChild ( const Dtk_ComponentPtr &  inChild)

Adds a child Dtk_Component to main Component.

Parameters
inChildThe Dtk_Component to be added as a child.

◆ AddComponentAvailability()

Dtk_ErrorStatus Dtk_Component::AddComponentAvailability ( ComponentAvailabilityEnum  inComponentAvailability)

◆ AddMetaData()

void Dtk_DocElement::AddMetaData ( const Dtk_MetaDataPtr &  inMetaData)
inherited

Adds a Dtk_MetaDataPtr to the Dtk_DocElement.

Parameters
inMetaDataThe Dtk_MetaDataPtr to be added.

◆ AddMetaDataGroup()

void Dtk_DocElement::AddMetaDataGroup ( const Dtk_MetaDataGroupPtr &  inMetaDataGroup,
Dtk_bool  inAddMetadata = DTK_FALSE 
)
inherited

Adds a Dtk_MetaDataGroupPtr to the Dtk_DocElement.

Parameters
inMetaDataGroupThe Dtk_MetaDataGroupPtr to be added.
inAddMetadataIf we also add the metadata of the group to the Dtk_DocElement

◆ AddOverrideSet()

DtkErrorStatus Dtk_Component::AddOverrideSet ( const Dtk_OverrideSetPtr &  inOverrideSet)

Adds Override set to a prototype component

Returns
dtkNoError if ok.

◆ AddProperty()

void Dtk_DocElement::AddProperty ( const Dtk_PropertiesPtr &  inProperty)
inherited

Adds a Dtk_PropertiesPtr to the Dtk_DocElement.

Parameters
inPropertyThe Dtk_PropertiesPtr to be added.

◆ ComponentAvailabilityEnumToString()

static Dtk_string Dtk_Component::ComponentAvailabilityEnumToString ( const ComponentAvailabilityEnum &  inEnum)
static
581  {
582  switch( inEnum )
583  {
584  case ComponentMissing: return L"ComponentMissing";
585  case ComponentFound: return L"ComponentFound";
586  case ComponentInternal: return L"ComponentInternal";
587  case ComponentPhantom: return L"ComponentPhantom";
588  case ComponentAdditionnalReference: return L"ComponentAdditionnalReference";
589  case ComponentAssemblyGeometry: return L"ComponentAssemblyGeometry";
590  case ComponentWithUnavailableReader: return L"ComponentWithUnavailableReader";
591  case ComponentNotRequired: return L"ComponentNotRequired";
592  default: return L"Unknown";
593  }
594  }

◆ ComponentType()

const ComponentTypeEnum& Dtk_Component::ComponentType ( ) const

Retrieves the Dtk_Component Type - read only -.

Returns
The component Type.

◆ ComponentTypeEnumToString()

static Dtk_string Dtk_Component::ComponentTypeEnumToString ( const ComponentTypeEnum &  inEnum)
static
597  {
598  switch( inEnum )
599  {
600  case CatalogComponentType: return L"CatalogComponentType";
601  case VirtualComponentType: return L"VirtualComponentType";
602  case InstanceComponentType: return L"InstanceComponentType";
603  case PrototypeComponentType: return L"PrototypeComponentType";
604 
605  default: return L"Unknown";
606  }
607  }

◆ ComponentTypeStringToInt()

static Dtk_Int32 Dtk_Component::ComponentTypeStringToInt ( const Dtk_string &  name)
static
610  {
611  Dtk_Int32 result = -1;
612 
613  if( name.len() > 0 )
614  {
615  if( name == L"CatalogComponentType" )
616  result = CatalogComponentType;
617  else if( name == L"VirtualComponentType" )
618  result = VirtualComponentType;
619  else if( name == L"InstanceComponentType" )
620  result = InstanceComponentType;
621  else if( name == L"PrototypeComponentType" )
622  result = PrototypeComponentType;
623  }
624 
625  return result;
626  }

◆ CreateAxisSystemNode()

Dtk_NodePtr Dtk_Component::CreateAxisSystemNode ( Dtk_string  inName,
const Dtk_ID &  inAxisSystemID,
const type_detk  inSubType = DTK_TYPE_AXIS_SYSTEM 
)

Creates a AxisSystem Dtk_NodePtr from a AxisSystemPtr.

Parameters
inNameNode name.
inAxisSystemIDAxisPlacementPtr ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateBodyNode()

Dtk_NodePtr Dtk_Component::CreateBodyNode ( Dtk_string  inName,
const Dtk_ID &  inBodyID,
const Dtk_Int32  inBodyFlag,
const type_detk  inSubType = DTK_TYPE_BODY 
)

Creates a Body Dtk_NodePtr from a body ID.

Parameters
inNameNode name.
inBodyIDBody Id.
inBodyFlagBody Info : Wire,Solid, MeshSurface and/or Surface.
Returns
the constructed Dtk_NodePtr.

◆ CreateCameraNode()

Dtk_NodePtr Dtk_Component::CreateCameraNode ( Dtk_string  inName,
const Dtk_ID &  inCameraID 
)

Creates a Camera Dtk_NodePtr from a Camera.

Parameters
inNameNode name.
inCameraIDCamera ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateColorInfosSetNode()

Dtk_NodePtr Dtk_Component::CreateColorInfosSetNode ( Dtk_string  inName,
const Dtk_ID &  inColorInfosSetID 
)

Creates a ColorInfosSet Dtk_NodePtr from a ColorInfosSetPtr.

Parameters
inNameNode name.
inColorInfosSetIDColorInfosSetPtr ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateConstraintNode()

Dtk_NodePtr Dtk_Component::CreateConstraintNode ( Dtk_string  inName,
const Dtk_ID &  inConstraintID,
const type_detk  inSubType = DTK_TYPE_CONSTRAINT 
)

Creates a Constraint Dtk_NodePtr from a Dtk_ConstraintPtr.

Parameters
inNameNode name.
inConstraintIDDtk_ConstraintPtr ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateDrawingNode()

Dtk_NodePtr Dtk_Component::CreateDrawingNode ( Dtk_string  inName,
const Dtk_ID &  inDrawingID 
)

Creates a Drawing Dtk_NodePtr from a Dtk_DrawingPtr.

Parameters
inNameNode name.
inDrawingIDDtk_DrawingPtr ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateFdtNode()

Dtk_NodePtr Dtk_Component::CreateFdtNode ( Dtk_string  inName,
const Dtk_ID &  inFdtID,
const type_detk  inSubType = DTK_TYPE_FDT 
)

Creates a Fdt Dtk_NodePtr from a Dtk_FdtPtr ID.

Parameters
inNameNode name.
inFdtIDDtk_FdtPtr ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateKinematicsNode()

Dtk_NodePtr Dtk_Component::CreateKinematicsNode ( Dtk_string  inName,
const Dtk_ID &  inKinematicID 
)

Creates a Kinematic Dtk_NodePtr from a Dtk_KinematicPtr.

Parameters
inNameNode name.
inKinematicDataDtk_KinematicPtr data.
Returns
the constructed Dtk_NodePtr.

◆ CreateLayerInfosSetNode()

Dtk_NodePtr Dtk_Component::CreateLayerInfosSetNode ( Dtk_string  inName,
const Dtk_ID &  inLayerInfosSetID 
)

Creates a LayerInfosSet Dtk_NodePtr from a LayerInfosSetPtr.

Parameters
inNameNode name.
inLayerInfosSetIDLayerInfosSetPtr ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateMeshNode()

Dtk_NodePtr Dtk_Component::CreateMeshNode ( Dtk_string  inName,
const Dtk_ID &  inMeshID,
const Dtk_Int32  inMeshFlag,
const type_detk  inSubType = DTK_TYPE_MESH 
)

Creates a Mesh Dtk_NodePtr from a Mesh ID.

Parameters
inNameNode name.
inMeshIDMesh Id.
Returns
the constructed Dtk_NodePtr.

◆ CreateMetaDataNode()

Dtk_NodePtr Dtk_Component::CreateMetaDataNode ( Dtk_string  inName,
const Dtk_ID &  inMetaDataID,
const type_detk  inSubType = DTK_TYPE_METADATA 
)

Creates a MetaData Dtk_NodePtr from a Dtk_MetaDataPtr.

Parameters
inNameNode name.
inMetaDataIDDtk_MetaDataPtr ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateModelDisplayNode()

Dtk_NodePtr Dtk_Component::CreateModelDisplayNode ( Dtk_string  inName,
const Dtk_ID &  inDisplayModelID,
const type_detk  inSubType = DTK_TYPE_NO_SUBTYPE 
)

Creates a ModelDisplay Dtk_NodePtr from a DisplayModel.

Parameters
inNameNode name.
inModelDisplayIDDisplayModel ID.
Returns
the constructed Dtk_NodePtr.

◆ CreateVirtualNode()

Dtk_NodePtr Dtk_Component::CreateVirtualNode ( Dtk_string  inName,
const type_detk  inSubType = DTK_TYPE_NO_SUBTYPE 
)

Creates a Virtual Dtk_NodePtr.

Parameters
inNameNode name.
Returns
the constructed Dtk_NodePtr.

◆ DevalidateNode()

Dtk_ErrorStatus Dtk_Component::DevalidateNode ( const Dtk_NodeID &  inNodeID)

Devalidates Component into MainDoc.

Parameters
inNodeIDThe NodeID to devalidate.
Returns
DtkNoError if success.
Remarks
Internal Use only.

◆ DtkDynamicCast()

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

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

◆ DtkDynamicType()

Dtk_Int32 Dtk_Component::DtkDynamicType ( const int &  inId)
virtual

Retrieves the dynamic entity type.

Reimplemented from Dtk_DocElement.

◆ dump()

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

◆ FullPathName()

const Dtk_string& Dtk_Component::FullPathName ( ) const

Retrieves the Dtk_Component FullPathName - read only -.

Returns
The component FullPathName.

◆ GetActivatedChildrenInCatalog()

Dtk_tab<Dtk_Int32> Dtk_Component::GetActivatedChildrenInCatalog ( ) const

Returns Activated Children Index or empty array if Component isn't a catalog.

◆ GetAssociatedModuleType()

const DtkReaderType& Dtk_Component::GetAssociatedModuleType ( ) const

Retrieves the Dtk_Component AssociatedModuleType - read only -.

Returns
The component AssociatedModuleType.

◆ GetBoundingBox()

Dtk_ErrorStatus Dtk_Component::GetBoundingBox ( Dtk_pnt &  outMin,
Dtk_pnt &  outMax 
) const

Gets BoundingBox on Prototype Component if it can be read in original file.

Parameters
[out]outMinResulting minimum coordinates
[out]outMaxResulting maximum coordinates
Returns
DtkNoError if success.

◆ GetChild()

const Dtk_ComponentPtr Dtk_Component::GetChild ( const Dtk_Size_t &  inPos) const

Retrieves the ith Dtk_ComponentPtr - read only -.

Parameters
inPosChild component index.
Returns
the inPos'th Dtk_ComponentPtr
678  { return Dtk_ComponentPtr::DtkDynamicCast( _GetChild(inPos) ); }

◆ GetConceptionUnitScale()

Dtk_ErrorStatus Dtk_Component::GetConceptionUnitScale ( Dtk_Double64 &  outUnitScale) const

Get the Original Units for documents - geometrical data are given in MM (Scale to MM)

Parameters
[out]outUnitScale: Unit Scale (1.0 for MM)
Returns
dtkNoError if unit is correctly read.
dtkWarningDefaultValue if unit was not read and default value is used (1.0).
dtkErrorFileNotExist if the component is flagged as missing (file not found).

◆ GetConnectorsPointingToThisComponent()

Dtk_ErrorStatus Dtk_Component::GetConnectorsPointingToThisComponent ( Dtk_tab< Dtk_NodeConnectorPtr > &  outConnectedEntities)

Retrieves the connectors pointing on this component.

Returns
The pointing connectors.

◆ GetDefaultChildInCatalog()

Dtk_Int32 Dtk_Component::GetDefaultChildInCatalog ( ) const

Returns Default Child Index or -1 if Component isn't a catalog.

◆ GetFatherID()

Dtk_ID Dtk_DocElement::GetFatherID ( Dtk_Size_t  inIndex) const
inherited

Retrieves Dtk_DocElement ith FatherID - read only -.

Returns
The ith FatherID.

◆ GetFatherNode()

Dtk_NodePtr Dtk_Component::GetFatherNode ( const Dtk_NodePtr &  inNode) const

Retrieves the father Dtk_NodePtr of the given Dtk_NodePtr.

Parameters
inNodeThe Dtk_NodePtr from which we want the father.
Returns
The wanted Dtk_NodePtr.

◆ GetFileVersion()

const Dtk_string& Dtk_Component::GetFileVersion ( ) const

Gets File Version.

◆ GetGlobalDataSet()

const Dtk_GlobalDataSetPtr Dtk_Component::GetGlobalDataSet ( ) const

Retrieves the Dtk_GlobalDataSetPtr attached to the Dtk_Component - get only -.

Returns
The attached Dtk_GlobalDataSetPtr - can be null -

◆ GetID()

Dtk_ID Dtk_DocElement::GetID ( ) const
inherited

Retrieves the Dtk_DocElement ID - read only -.

Returns
The element ID.

◆ GetInfos()

Dtk_InfoPtr Dtk_DocElement::GetInfos ( ) const
inherited

Retrieves the Dtk_DocElement Dtk_InfoPtr - read only -.

Returns
The element Dtk_InfoPtr.

◆ GetLayerInfosSet()

Dtk_LayerInfosSetPtr Dtk_Component::GetLayerInfosSet ( ) const

Retrieves the Dtk_LayerInfosSet of this component.

Remarks
Dtk_API::ReadComponent has to be called for the layer set to be available.
Returns
The Dtk_LayerInfosSet of this component.

◆ GetMetaData()

Dtk_MetaDataPtr Dtk_DocElement::GetMetaData ( const Dtk_Size_t &  inPos) const
inherited

Retrieves the ith Dtk_MetaDataPtr - read only -.

Parameters
inPosMetadata index.
Returns
the inPos'th Dtk_MetaDataPtr

◆ GetMetaDataGroup()

Dtk_MetaDataGroupPtr Dtk_DocElement::GetMetaDataGroup ( const Dtk_Size_t &  inPos) const
inherited

Retrieves the ith Dtk_MetaDataGrouplPtr - read only -.

Parameters
inPosGroup index.
Returns
the inPos'th Dtk_MetaDataGrouplPtr

◆ GetNodeByID()

Dtk_NodePtr Dtk_Component::GetNodeByID ( const Dtk_NodeID &  inNodeID) const

Retrieves a Dtk_NodePtr from the Dtk_Component NodesPool giving his Id.

Parameters
inNodeIDWanted Dtk_NodePtr Id.
Returns
The wanted Dtk_NodePtr.

◆ GetNumChildren()

Dtk_Size_t Dtk_DocElement::GetNumChildren ( ) const
inherited

Retrieves the number of the Dtk_DocElement children - read only -.

Returns
The Children number.

◆ GetNumFathers()

Dtk_Size_t Dtk_DocElement::GetNumFathers ( ) const
inherited

GetNumFather.

Returns
Number of fathers

◆ GetNumMetaData()

Dtk_Size_t Dtk_DocElement::GetNumMetaData ( ) const
inherited

Retrieves the number of the Dtk_MetaDataPtr - read only -.

Returns
The Metadata number.

◆ GetNumMetaDataGroup()

Dtk_Size_t Dtk_DocElement::GetNumMetaDataGroup ( ) const
inherited

Retrieves the number of the Dtk_MetaDataGroupPtr - read only -.

Returns
The Group number.

◆ GetNumNodes()

Dtk_Size_t Dtk_Component::GetNumNodes ( ) const

Gives number of Nodes in the Component (useful if you want to handle progress bar).

Returns
number of Nodes.

◆ GetNumOverrideSets()

Dtk_Size_t Dtk_Component::GetNumOverrideSets ( ) const

Gives number of Override sets in a prototype component

Returns
Override sets.

◆ GetOverrideSets()

DtkErrorStatus Dtk_Component::GetOverrideSets ( Dtk_tab< Dtk_OverrideSetPtr > &  outOverrideSet) const

Gives array of Override sets in a prototype component

Returns
dtkNoError if ok.

◆ GetPreview()

Dtk_PreviewPtr Dtk_DocElement::GetPreview ( ) const
inherited

Retrieves the Dtk_DocElement Dtk_PreviewPtr - read only -.

Returns
The element Dtk_PreviewPtr if exists.

◆ GetReadID()

void Dtk_DocElement::GetReadID ( Dtk_ID &  outReadID) const
inherited

◆ GetSiblingName()

DtkErrorStatus Dtk_Component::GetSiblingName ( Dtk_string &  outSiblingName) const

SiblingName for Component.

◆ GetSize()

◆ InstanceName()

const Dtk_string& Dtk_Component::InstanceName ( ) const

Retrieves the Dtk_Component InstanceName - read only -.

Returns
The component InstanceName.

◆ IsAdditionnalReference()

Dtk_bool Dtk_Component::IsAdditionnalReference ( ) const

Returns DTK_TRUE if Dtk_Component is Additionnal Reference.

◆ IsAssembly()

Dtk_bool Dtk_Component::IsAssembly ( ) const

Returns DTK_TRUE if Dtk_Component is an assembly.

◆ IsAvailabilityFlaggedAs()

bool Dtk_Component::IsAvailabilityFlaggedAs ( Dtk_Component::ComponentAvailabilityEnum  inStatusToCheck) const

Check Dtk_Component availability - read only - Each Dtk_Component can have several status (ex : AdditionnalReference and Missing)

Returns
DTK_TRUE if inStatusToCheck is activated on this component.

◆ Name() [1/2]

Dtk_string& Dtk_DocElement::Name ( )
inherited

◆ Name() [2/2]

const Dtk_string& Dtk_DocElement::Name ( ) const
inherited

Retrieves the Dtk_DocElement Name - read only -.

Returns
The Element Name.

◆ OriginalPathName()

const Dtk_string& Dtk_Component::OriginalPathName ( ) const

Retrieves the Dtk_Component OriginalPathName (read in file) - read only -.

Returns
The component OriginalPathName.

◆ ReleasePreview()

void Dtk_DocElement::ReleasePreview ( )
inherited

◆ ReplaceChildComponent()

Dtk_ErrorStatus Dtk_Component::ReplaceChildComponent ( const Dtk_Size_t &  inPos,
const Dtk_ComponentPtr &  inNewChild 
)

Replaces a child Dtk_ComponentPtr by another one. Also updates father lists.

Parameters
inPosOld Child Dtk_ComponentPtr element index.
inNewChildThe Dtk_ComponentPtr replacing the old one

Internal use only

Returns
the DtkNoerrror if success.
the dtkErrorOutOfRange if bad inPos parameter.
the dtkErrorNullPointer if inNewChild is NULL.
688  { return _ReplaceChild( inPos, Dtk_DocElementPtr::DtkDynamicCast(inNewChild) ); }

◆ SetAsDeprecated() [1/9]

Dtk_Component::SetAsDeprecated ( "2026.2"  ,
"Use Dtk_LayerInfoSet::GetCurrentLayer instead"   
) const

Current layer for Component.

◆ SetAsDeprecated() [2/9]

Dtk_Component::SetAsDeprecated ( "2026.2"  ,
"Use Dtk_LayerInfoSet::SetCurrentLayer instead"   
)

◆ SetAsDeprecated() [3/9]

Dtk_Component::SetAsDeprecated ( "2026.2"  ,
"Use Dtk_LayerInfosSet::AddLayer instead"   
) const &

◆ SetAsDeprecated() [4/9]

Dtk_Component::SetAsDeprecated ( "2026.2"  ,
"Use Dtk_LayerInfosSet::AddLayer instead"   
) const &

◆ SetAsDeprecated() [5/9]

Dtk_Component::SetAsDeprecated ( "2026.2"  ,
"Use GetLayerInfosSet() then Dtk_LayerInfosSet::GetLayersFlaggedAs( Dtk_LayerInfosSet::Layer::Status::Selectable ) instead"   
) const &

Selectable layer for Component.

◆ SetAsDeprecated() [6/9]

Dtk_Component::SetAsDeprecated ( "2026.2"  ,
"Use GetLayerInfosSet() then Dtk_LayerInfosSet::GetLayersFlaggedAs( Dtk_LayerInfosSet::Layer::Status::Visible ) instead"   
) const &

Visible layer for Component.

◆ SetAsDeprecated() [7/9]

Dtk_Component::SetAsDeprecated ( "2026.3"  ,
"Use Dtk_Component::IsAvailabilityFlaggedAs method instead."   
) const

Gives Dtk_Component availability - read only -.

Deprecated:
"Use Use Dtk_Component::IsAvailabilityFlaggedAs method instead.")
Returns
The component availability.

◆ SetAsDeprecated() [8/9]

Dtk_DocElement::SetAsDeprecated ( "2026.3"  ,
"use GetInfos()->AddRenderInfos and GetInfos()->AddMaterialInfos methods instead."   
)
inherited
Deprecated:
use GetInfos()->AddRenderInfos and GetInfos()->AddMaterialInfos methods instead

◆ SetAsDeprecated() [9/9]

Dtk_DocElement::SetAsDeprecated ( "2026.3"  ,
"use GetInfos()->GetRenderInfos and GetInfos()->GetPhysicalMaterialInfos methods instead."   
) const
inherited

Retrieves the Dtk_DocElement Dtk_MaterialPtr - read only -.

Returns
The element Dtk_MaterialPtrif if exists
Deprecated:
use GetInfos()->GetRenderInfos and GetInfos()->GetPhysicalMaterialInfos methods instead

◆ SetComponentAvailability()

Dtk_ErrorStatus Dtk_Component::SetComponentAvailability ( ComponentAvailabilityEnum  inComponentAvailability)

◆ SetConceptionUnitScale()

void Dtk_Component::SetConceptionUnitScale ( Dtk_Double64  inUnitScale)

◆ SetFileVersion()

void Dtk_Component::SetFileVersion ( const Dtk_string &  inFileVersion)

◆ SetInfos()

void Dtk_DocElement::SetInfos ( const Dtk_InfoPtr &  inInfos)
inherited

◆ SetOverrideSets()

DtkErrorStatus Dtk_Component::SetOverrideSets ( const Dtk_tab< Dtk_OverrideSetPtr > &  inOverrideSets)

Sets array of Override sets in a prototype component.

Returns
dtkNoError if ok.

◆ SetPreview()

void Dtk_DocElement::SetPreview ( Dtk_PreviewPtr  inPreview)
inherited

◆ SetReadID()

void Dtk_DocElement::SetReadID ( const Dtk_ID &  inNewID)
inherited

◆ SetSelectionDataSet()

void Dtk_Component::SetSelectionDataSet ( const Dtk_SelectionDataSetPtr &  inSelectionDataSet)

Attaches SelectionDataSet infos to the Dtk_Component - through the Dtk_GlobalDataSetPtr -.

◆ SetSiblingName()

DtkErrorStatus Dtk_Component::SetSiblingName ( const Dtk_string &  inSiblingName)

◆ TransformationMatrix()

const Dtk_transfo& Dtk_Component::TransformationMatrix ( ) const

Retrieves the Dtk_Component TransformationMatrix - read only -.

Returns
The component TransformationMatrix.

Field Documentation

◆ _Private

std::unique_ptr<Dtk_Handle> Dtk_Component::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_Component::CatalogComponentType
@ CatalogComponentType
Definition: dtk_maindoc.hpp:575
DTK_TYPE_DOC_ELEMENT
@ DTK_TYPE_DOC_ELEMENT
Definition: define.h:501
Dtk_Component::_typeID
@ _typeID
Definition: dtk_maindoc.hpp:629
Dtk_DocElement::_typeID
@ _typeID
Definition: dtk_maindoc.hpp:106
Dtk_DocElement::_GetChild
const Dtk_DocElementPtr _GetChild(const Dtk_Size_t &inPos) const
Retrieves the ith Dtk_DocElement - read only -.
Dtk_DocElement::_ReplaceChild
Dtk_ErrorStatus _ReplaceChild(const Dtk_Size_t &inPos, const Dtk_DocElementPtr &inNewChild)
Replaces a child by another one. Also update father lists.
Dtk_Component::VirtualComponentType
@ VirtualComponentType
Definition: dtk_maindoc.hpp:576
Dtk_Component::InstanceComponentType
@ InstanceComponentType
Definition: dtk_maindoc.hpp:573
Dtk_Component::ComponentFound
@ ComponentFound
Definition: dtk_maindoc.hpp:563
Dtk_Component::ComponentAssemblyGeometry
@ ComponentAssemblyGeometry
Definition: dtk_maindoc.hpp:567
Dtk_Component::ComponentAdditionnalReference
@ ComponentAdditionnalReference
Definition: dtk_maindoc.hpp:566
Dtk_Component::ComponentWithUnavailableReader
@ ComponentWithUnavailableReader
Definition: dtk_maindoc.hpp:568
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:686
Dtk_SmartPtr::DtkDynamicCast
static Dtk_SmartPtr< T > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_Component::ComponentInternal
@ ComponentInternal
Definition: dtk_maindoc.hpp:564
Dtk_Component::ComponentPhantom
@ ComponentPhantom
Definition: dtk_maindoc.hpp:565
DTK_TYPE_COMPONENT
@ DTK_TYPE_COMPONENT
Definition: define.h:503
Dtk_Component::PrototypeComponentType
@ PrototypeComponentType
Definition: dtk_maindoc.hpp:574
Dtk_Component::ComponentMissing
@ ComponentMissing
Definition: dtk_maindoc.hpp:562
Dtk_string::len
int len() const
Retrieve the length of the Dtk_string.
Dtk_DocElement::_AddChild
void _AddChild(const Dtk_DocElementPtr &inChild)
Adds a child Dtk_DocElement to main Element.
Dtk_Component::ComponentNotRequired
@ ComponentNotRequired
Definition: dtk_maindoc.hpp:569