DATAKIT API  V2025.1
Dtk_KinFixPart Class Referenceabstract

Dtk_KinFixPart represents the fixed part to simulate the mechanism. More...

+ Inheritance diagram for Dtk_KinFixPart:

Public Member Functions

Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
virtual int DtkDynamicType (const int &inId)=0
 
virtual void dump (FILE *file=stdout)
 
Dtk_status Dump (FILE *inFile)
 Write Dump file for fix part. More...
 
type_detk get_type_detk () const
 
Dtk_KinConstraintPtr getConstraint ()
 Returns the constraint associated to the fixed part. More...
 
int getId ()
 Retrun the fix part id. More...
 
Dtk_string getName ()
 Returns the fix part name. More...
 
Dtk_KinPartPtr getPart ()
 Returns the part fixed. More...
 
virtual Dtk_Size_t GetSize () const
 
void setConstraint (Dtk_KinConstraintPtr inConstraint)
 Sets the constraint associated to the fixed part. More...
 
void setId (int inId)
 Sets the fix part id. More...
 
void setName (Dtk_string inName)
 Sets the fix part name. More...
 
void setPart (Dtk_KinPartPtr inPart)
 Sets the part fixed. More...
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 

Static Public Member Functions

static Dtk_KinFixPartPtr Create ()
 Base constructor. More...
 
static Dtk_KinFixPartDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 
static Dtk_KinFixPartPtr release (Dtk_KinFixPartPtr inFixPart)
 Delete object. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_OBJECT }
 
enum  { _typeID = DTK_TYPE_KIN_FIXPART }
 

Protected Member Functions

void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 
 Dtk_KinFixPart ()
 Default constructor. More...
 
 Dtk_KinFixPart (const Dtk_KinFixPart &fixPart)
 Copy constructor. More...
 
 ~Dtk_KinFixPart ()
 Destructor. More...
 

Protected Attributes

Dtk_KinConstraintPtr _fixcst
 This constraint is defined into the kinematic constraint table. More...
 
Dtk_KinPartPtr _fixpart
 This part is defined into the kinematic part table. More...
 
int _ID
 
Dtk_string _name
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_KinFixPart >
 

Detailed Description

Dtk_KinFixPart represents the fixed part to simulate the mechanism.

A fixed part is linked at a mechanism object.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
1504  {
1506  };

Constructor & Destructor Documentation

◆ Dtk_KinFixPart() [1/2]

Dtk_KinFixPart::Dtk_KinFixPart ( )
protected

Default constructor.

◆ Dtk_KinFixPart() [2/2]

Dtk_KinFixPart::Dtk_KinFixPart ( const Dtk_KinFixPart fixPart)
protected

Copy constructor.

Parameters
fixPartthe Dtk_KinFixPart to be copied

◆ ~Dtk_KinFixPart()

Dtk_KinFixPart::~Dtk_KinFixPart ( )
protected

Destructor.

Member Function Documentation

◆ _copy()

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Object::_init ( )
protectedinherited

◆ _reset()

void Dtk_Object::_reset ( )
protectedinherited

◆ Create()

static Dtk_KinFixPartPtr Dtk_KinFixPart::Create ( )
static

Base constructor.

◆ DtkDynamicCast()

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

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

1536  {
1537  if(s->DtkDynamicType(_typeID))
1538  return static_cast<Dtk_KinFixPart*>(s);
1539  return NULL;
1540  }

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_KinFixPart::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

1526  {
1527  if (inId == _typeID)
1528  {
1529  return 1;
1530  }
1531  return Dtk_Object::DtkDynamicType(inId);
1532  }

◆ DtkDynamicType() [2/2]

◆ dump()

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

◆ Dump()

Dtk_status Dtk_KinFixPart::Dump ( FILE *  inFile)

Write Dump file for fix part.

Parameters
inFilethe output file

Sample

Dtk_string fileName = ...;
File * file = fileName.ouvrir_fichier(DTK_W);
fixPart.setName(Dtk_string("sample fixPart"));
fixPart.setId(1);
fixPart.Dump(file, true);

Result

<part name="sample fixPart" id="1">
<!-- Constraint associated at the fix part / constraint.Dump(inFile, true) -->
<!-- Part associated at the fix part / part.Dump(inFile, true) -->
</part>

◆ get_type_detk()

type_detk Dtk_KinFixPart::get_type_detk ( ) const
Returns
The type of the entity type - DTK_TYPE_KIN_FIXPART -
1543 { return DTK_TYPE_KIN_FIXPART; }

◆ getConstraint()

Dtk_KinConstraintPtr Dtk_KinFixPart::getConstraint ( )

Returns the constraint associated to the fixed part.

◆ getId()

int Dtk_KinFixPart::getId ( )

Retrun the fix part id.

◆ getName()

Dtk_string Dtk_KinFixPart::getName ( )

Returns the fix part name.

◆ getPart()

Dtk_KinPartPtr Dtk_KinFixPart::getPart ( )

Returns the part fixed.

◆ GetSize()

◆ release()

static Dtk_KinFixPartPtr Dtk_KinFixPart::release ( Dtk_KinFixPartPtr  inFixPart)
static

Delete object.

◆ setConstraint()

void Dtk_KinFixPart::setConstraint ( Dtk_KinConstraintPtr  inConstraint)

Sets the constraint associated to the fixed part.

Parameters
inConstraintfix part constraint

◆ setId()

void Dtk_KinFixPart::setId ( int  inId)

Sets the fix part id.

Parameters
inIdfix part id

◆ setName()

void Dtk_KinFixPart::setName ( Dtk_string  inName)

Sets the fix part name.

Parameters
inNamefix part name

◆ setPart()

void Dtk_KinFixPart::setPart ( Dtk_KinPartPtr  inPart)

Sets the part fixed.

Parameters
inPartPart to be fixed

◆ Transform()

Dtk_ErrorStatus Dtk_KinFixPart::Transform ( const Dtk_transfo inTransfo)

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_KinFixPart >

friend class Dtk_SmartPtr< Dtk_KinFixPart >
friend

Field Documentation

◆ _fixcst

Dtk_KinConstraintPtr Dtk_KinFixPart::_fixcst
protected

This constraint is defined into the kinematic constraint table.

◆ _fixpart

Dtk_KinPartPtr Dtk_KinFixPart::_fixpart
protected

This part is defined into the kinematic part table.

◆ _ID

int Dtk_KinFixPart::_ID
protected

◆ _name

Dtk_string Dtk_KinFixPart::_name
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_string::ouvrir_fichier
FILE * ouvrir_fichier(const Dtk_string &droits) const
File Utility : Open a file with the given rights.
Dtk_KinFixPart::_typeID
@ _typeID
Definition: util_kinematics_dtk.hpp:1505
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
DTK_TYPE_OBJECT
@ DTK_TYPE_OBJECT
Definition: define.h:464
DTK_W
#define DTK_W
Definition: dtk_string.hpp:43
Dtk_KinFixPart::setName
void setName(Dtk_string inName)
Sets the fix part name.
Dtk_Object::_typeID
@ _typeID
Definition: dtk_object.hpp:13
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_KinFixPart::Dump
Dtk_status Dump(FILE *inFile)
Write Dump file for fix part.
Dtk_KinFixPart
Dtk_KinFixPart represents the fixed part to simulate the mechanism.
Definition: util_kinematics_dtk.hpp:1499
Dtk_KinFixPart::setId
void setId(int inId)
Sets the fix part id.
DTK_TYPE_KIN_FIXPART
@ DTK_TYPE_KIN_FIXPART
Definition: define.h:553