DATAKIT API  V2025.1
Dtk_KinCurve Class Referenceabstract

Dtk_KinCurve represents a curve associated at a law. More...

+ Inheritance diagram for Dtk_KinCurve:

Public Member Functions

void addEntity (void *inEntity, enum type_detk inType)
 Add an entity and this type at the entity table. More...
 
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 mechanism speed/acceleration. More...
 
type_detk get_type_detk () const
 
void getEntity (Dtk_Size_t inPos, void **outEntity, enum type_detk *outType)
 Returns the entity and this type at position inPos. More...
 
Dtk_Size_t getEntitySize ()
 Return the size of the entity tab. More...
 
Dtk_string getFileName ()
 Returns the file name associated at the curve. More...
 
int getIdBlock ()
 Returns the block id. More...
 
virtual Dtk_Size_t GetSize () const
 
void setFileName (const Dtk_string &inFileName)
 Sets the file name associated at the curve. More...
 
void setIdBlock (int inId)
 Sets the block id. More...
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 

Static Public Member Functions

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

Protected Types

enum  { _typeID = DTK_TYPE_OBJECT }
 
enum  { _typeID = DTK_TYPE_KIN_CURVE }
 

Protected Member Functions

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

Protected Attributes

Dtk_tab< void * > _entity
 
Dtk_string _fileName
 
int _idBlock
 
Dtk_tab< type_detk_typeEntity
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_KinCurve >
 

Detailed Description

Dtk_KinCurve represents a curve associated at a law.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
2225  {
2227  };

Constructor & Destructor Documentation

◆ Dtk_KinCurve() [1/2]

Dtk_KinCurve::Dtk_KinCurve ( )
protected

Default constructor.

◆ Dtk_KinCurve() [2/2]

Dtk_KinCurve::Dtk_KinCurve ( const Dtk_KinCurve inSketch)
protected

Copy constructor.

Parameters
partthe Dtk_KinSpeedAcceleration to be copied

◆ ~Dtk_KinCurve()

Dtk_KinCurve::~Dtk_KinCurve ( )
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

◆ addEntity()

void Dtk_KinCurve::addEntity ( void *  inEntity,
enum type_detk  inType 
)

Add an entity and this type at the entity table.

Parameters
inEntityEntity to be added
inTypeEntity type

◆ Create()

static Dtk_KinCurvePtr Dtk_KinCurve::Create ( )
static

Base constructor.

◆ DtkDynamicCast()

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

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

2259  {
2260  if(s->DtkDynamicType(_typeID))
2261  return static_cast<Dtk_KinCurve*>(s);
2262  return NULL;
2263  }

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_KinCurve::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

2249  {
2250  if (inId == _typeID)
2251  {
2252  return 1;
2253  }
2254  return Dtk_Object::DtkDynamicType(inId);
2255  }

◆ DtkDynamicType() [2/2]

◆ dump()

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

◆ Dump()

Dtk_status Dtk_KinCurve::Dump ( FILE *  inFile)

Write Dump file for mechanism speed/acceleration.

Parameters
inFilethe output file

Sample

Dtk_string fileName = ...;
File * file = fileName.ouvrir_fichier(DTK_W);
speedAcc.setName(Dtk_string("sample speed/acceleration"));
speedAcc.setId(1);
speedAcc.setIdFile(5);
speedAcc.Dump(file, true);

Result

◆ get_type_detk()

type_detk Dtk_KinCurve::get_type_detk ( ) const
Returns
The type of the entity type - DTK_TYPE_KIN_CURVE -
2266 { return DTK_TYPE_KIN_CURVE; }

◆ getEntity()

void Dtk_KinCurve::getEntity ( Dtk_Size_t  inPos,
void **  outEntity,
enum type_detk outType 
)

Returns the entity and this type at position inPos.

Parameters
inPosposition of element
outEntityAn out parameter
outTypeAn out parameter

If position is out bounds returns NULL

◆ getEntitySize()

Dtk_Size_t Dtk_KinCurve::getEntitySize ( )

Return the size of the entity tab.

◆ getFileName()

Dtk_string Dtk_KinCurve::getFileName ( )

Returns the file name associated at the curve.

◆ getIdBlock()

int Dtk_KinCurve::getIdBlock ( )

Returns the block id.

◆ GetSize()

◆ release()

static Dtk_KinCurvePtr Dtk_KinCurve::release ( Dtk_KinCurvePtr  inCurve)
static

Delete object.

◆ setFileName()

void Dtk_KinCurve::setFileName ( const Dtk_string inFileName)

Sets the file name associated at the curve.

◆ setIdBlock()

void Dtk_KinCurve::setIdBlock ( int  inId)

Sets the block id.

◆ Transform()

Dtk_ErrorStatus Dtk_KinCurve::Transform ( const Dtk_transfo inTransfo)

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_KinCurve >

friend class Dtk_SmartPtr< Dtk_KinCurve >
friend

Field Documentation

◆ _entity

Dtk_tab<void *> Dtk_KinCurve::_entity
protected

◆ _fileName

Dtk_string Dtk_KinCurve::_fileName
protected

◆ _idBlock

int Dtk_KinCurve::_idBlock
protected

◆ _typeEntity

Dtk_tab<type_detk> Dtk_KinCurve::_typeEntity
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_KinSpeedAcceleration::setId
void setId(int inId)
Sets the id of speed/acceleration.
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_KinSpeedAcceleration
Dtk_KinSpeedAcceleration represents a mechanism speed/acceleration.
Definition: util_kinematics_dtk.hpp:2503
Dtk_KinSpeedAcceleration::setName
void setName(Dtk_string inName)
Sets the name of speed/acceleration.
Dtk_KinSpeedAcceleration::Dump
Dtk_status Dump(FILE *inFile)
Write Dump file for mechanism speed/acceleration.
Dtk_KinCurve::_typeID
@ _typeID
Definition: util_kinematics_dtk.hpp:2226
DTK_TYPE_KIN_CURVE
@ DTK_TYPE_KIN_CURVE
Definition: define.h:554
Dtk_Object::_typeID
@ _typeID
Definition: dtk_object.hpp:13
Dtk_Object::DtkDynamicType
virtual int DtkDynamicType(const int &inId)=0
Dtk_KinCurve
Dtk_KinCurve represents a curve associated at a law.
Definition: util_kinematics_dtk.hpp:2221