DATAKIT API  V2025.1
Dtk_DocElement Class Reference

This is the Main Doc Element Class The Dtk_DocElement object is common parent class of the Dtk_Node and the Dtk_Component classes It typically used as geometry into a Part. More...

+ Inheritance diagram for Dtk_DocElement:

Public Member Functions

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...
 
void AddProperty (const Dtk_PropertiesPtr &inProperty)
 Adds a Dtk_PropertiesPtr to the Dtk_DocElement. More...
 
Dtk_Int32 DtkDynamicType (const int &inId)
 Retrieves the dynamic entity type. More...
 
virtual void dump (FILE *file=stdout)
 
Dtk_ID GetFatherID (Dtk_Size_t inIndex) const
 Retrieves Dtk_DocElement ith FatherID - read 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_MaterialPtr GetMaterial () const
 Retrieves the Dtk_DocElement Dtk_MaterialPtr - read only -. 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_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_PreviewPtr GetPreview () const
 Retrieves the Dtk_DocElement Dtk_PreviewPtr - read only -. More...
 
void GetReadID (Dtk_ID &outReadID) const
 
virtual Dtk_Size_t GetSize () const
 
Dtk_stringName ()
 
const Dtk_stringName () const
 Retrieves the Dtk_DocElement Name - read only -. More...
 
void ReleasePreview ()
 
void SetInfos (const Dtk_InfoPtr &inInfos)
 
void SetMaterial (Dtk_MaterialPtr inMaterial)
 
void SetPreview (Dtk_PreviewPtr inPreview)
 
void SetReadID (const Dtk_ID &inNewID)
 

Static Public Member Functions

static Dtk_DocElementDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_DOC_ELEMENT }
 

Protected Member Functions

void _AddChild (const Dtk_DocElementPtr &inChild)
 Adds a child Dtk_DocElement to main Element. More...
 
void _Copy (const Dtk_Node &s)
 
void _copy (const Dtk_Object &s)
 
const Dtk_DocElementPtr _GetChild (const Dtk_Size_t &inPos) const
 Retrieves the ith Dtk_DocElement - read only -. More...
 
void _init ()
 
void _Init ()
 
Dtk_ErrorStatus _ReplaceChild (const Dtk_Size_t &inPos, const Dtk_DocElementPtr &inNewChild)
 Replaces a child by another one. Also update father lists. More...
 
void _reset ()
 
void _Reset ()
 
 Dtk_DocElement (const Dtk_ID &inID, Dtk_string inName)
 
virtual ~Dtk_DocElement ()
 Destructor. More...
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_MainDoc
 
class Dtk_SmartPtr< Dtk_DocElement >
 

Detailed Description

This is the Main Doc Element Class The Dtk_DocElement object is common parent class of the Dtk_Node and the Dtk_Component classes It typically used as geometry into a Part.

See also
Please use the Dtk_DocElement class to handle it.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 

Constructor & Destructor Documentation

◆ Dtk_DocElement()

Dtk_DocElement::Dtk_DocElement ( const Dtk_ID inID,
Dtk_string  inName 
)
protected

◆ ~Dtk_DocElement()

virtual Dtk_DocElement::~Dtk_DocElement ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ _AddChild()

void Dtk_DocElement::_AddChild ( const Dtk_DocElementPtr inChild)
protected

Adds a child Dtk_DocElement to main Element.

Parameters
inChildThe Dtk_DocElement to be added as a child.

◆ _Copy()

void Dtk_DocElement::_Copy ( const Dtk_Node s)
protected

◆ _copy()

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _GetChild()

const Dtk_DocElementPtr Dtk_DocElement::_GetChild ( const Dtk_Size_t inPos) const
protected

Retrieves the ith Dtk_DocElement - read only -.

Parameters
inPosChild element index.
Returns
the inPos'th Dtk_DocElement

◆ _init()

void Dtk_Object::_init ( )
protectedinherited

◆ _Init()

void Dtk_DocElement::_Init ( )
protected

◆ _ReplaceChild()

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

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.

◆ _reset()

void Dtk_Object::_reset ( )
protectedinherited

◆ _Reset()

void Dtk_DocElement::_Reset ( )
protected

◆ AddMetaData()

void Dtk_DocElement::AddMetaData ( const Dtk_MetaDataPtr inMetaData)

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 
)

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

◆ AddProperty()

void Dtk_DocElement::AddProperty ( const Dtk_PropertiesPtr inProperty)

Adds a Dtk_PropertiesPtr to the Dtk_DocElement.

Parameters
inPropertyThe Dtk_PropertiesPtr to be added.

◆ DtkDynamicCast()

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

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

◆ DtkDynamicType()

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

Retrieves the dynamic entity type.

Implements Dtk_Object.

Reimplemented in Dtk_Component, and Dtk_Node.

◆ dump()

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

◆ GetFatherID()

Dtk_ID Dtk_DocElement::GetFatherID ( Dtk_Size_t  inIndex) const

Retrieves Dtk_DocElement ith FatherID - read only -.

Returns
The ith FatherID.

◆ GetID()

Dtk_ID Dtk_DocElement::GetID ( ) const

Retrieves the Dtk_DocElement ID - read only -.

Returns
The element ID.

◆ GetInfos()

Dtk_InfoPtr Dtk_DocElement::GetInfos ( ) const

Retrieves the Dtk_DocElement Dtk_InfoPtr - read only -.

Returns
The element Dtk_InfoPtr.

◆ GetMaterial()

Dtk_MaterialPtr Dtk_DocElement::GetMaterial ( ) const

Retrieves the Dtk_DocElement Dtk_MaterialPtr - read only -.

Returns
The element Dtk_MaterialPtrif if exists .

◆ GetMetaData()

Dtk_MetaDataPtr Dtk_DocElement::GetMetaData ( const Dtk_Size_t inPos) const

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

Retrieves the ith Dtk_MetaDataGrouplPtr - read only -.

Parameters
inPosGroup index.
Returns
the inPos'th Dtk_MetaDataGrouplPtr

◆ GetNumChildren()

Dtk_Size_t Dtk_DocElement::GetNumChildren ( ) const

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

Returns
The Children number.

◆ GetNumFathers()

Dtk_Size_t Dtk_DocElement::GetNumFathers ( ) const

GetNumFather.

Returns
Number of fathers

◆ GetNumMetaData()

Dtk_Size_t Dtk_DocElement::GetNumMetaData ( ) const

Retrieves the number of the Dtk_MetaDataPtr - read only -.

Returns
The Metadata number.

◆ GetNumMetaDataGroup()

Dtk_Size_t Dtk_DocElement::GetNumMetaDataGroup ( ) const

Retrieves the number of the Dtk_MetaDataGroupPtr - read only -.

Returns
The Group number.

◆ GetPreview()

Dtk_PreviewPtr Dtk_DocElement::GetPreview ( ) const

Retrieves the Dtk_DocElement Dtk_PreviewPtr - read only -.

Returns
The element Dtk_PreviewPtr if exists.

◆ GetReadID()

void Dtk_DocElement::GetReadID ( Dtk_ID outReadID) const

◆ GetSize()

◆ Name() [1/2]

Dtk_string& Dtk_DocElement::Name ( )

◆ Name() [2/2]

const Dtk_string& Dtk_DocElement::Name ( ) const

Retrieves the Dtk_DocElement Name - read only -.

Returns
The Element Name.

◆ ReleasePreview()

void Dtk_DocElement::ReleasePreview ( )

◆ SetInfos()

void Dtk_DocElement::SetInfos ( const Dtk_InfoPtr inInfos)

◆ SetMaterial()

void Dtk_DocElement::SetMaterial ( Dtk_MaterialPtr  inMaterial)

◆ SetPreview()

void Dtk_DocElement::SetPreview ( Dtk_PreviewPtr  inPreview)

◆ SetReadID()

void Dtk_DocElement::SetReadID ( const Dtk_ID inNewID)

Friends And Related Function Documentation

◆ Dtk_MainDoc

friend class Dtk_MainDoc
friend

◆ Dtk_SmartPtr< Dtk_DocElement >

friend class Dtk_SmartPtr< Dtk_DocElement >
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_DocElement::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
DTK_TYPE_DOC_ELEMENT
@ DTK_TYPE_DOC_ELEMENT
Definition: define.h:510
Dtk_DocElement::_typeID
@ _typeID
Definition: dtk_maindoc.hpp:104