|
MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHobject.h>


Public Member Functions | |
| void | Copy (ChObj *source) |
| int | GetIdentifier () |
| void | SetIdentifier (int id) |
| ChObj * | GetAddrFromID (ChObj **CHlist, int myID) |
| double | GetChTime () |
| void | SetChTime (double m_time) |
| char * | GetName () |
| void | SetName (char myname[]) |
| std::string | GetNameString () |
| void | SetNameString (std::string &myname) |
| ChObj * | Search (ChObj **CHlist, char *m_name) |
| ChObj * | GetNext () |
| ChObj * | GetPrev () |
| void | SetNext (ChObj *newnext) |
| void | SetPrev (ChObj *newprev) |
| void | AddToList (ChObj **CHlist) |
| void | RemoveFromList (ChObj **CHlist) |
| ChExternalObject * | GetExternalObject () |
| void | SetExternalObject (ChExternalObject *m_obj) |
| void | SetNoExternalObject () |
| void | MFlagsSetAllOFF (int &mflag) |
| void | MFlagsSetAllON (int &mflag) |
| void | MFlagSetON (int &mflag, int mask) |
| void | MFlagSetOFF (int &mflag, int mask) |
| int | MFlagGet (int &mflag, int mask) |
| virtual void | StreamOUT (ChStreamOutBinary &mstream) |
| virtual void | StreamIN (ChStreamInBinary &mstream) |
| virtual void | StreamOUT (ChStreamOutAscii &mstream) |
| virtual int | Translate (char *string, char *string_end, ChTag &ret_tag) |
| virtual int | ParseTag (ChTag mtag, ChVar *retv, ChNode< ChVar > *param, int set) |
Static Public Member Functions | |
| static int | ListCount (ChObj **CHlist) |
| static void | KillList (ChObj **CHlist) |
Protected Attributes | |
| double | ChTime |
This class also embeds a simple linked-list mechanism for fast management of linked lists of items, instead of using STL lists or ChList. ***OBSOLETE***
This class inherits the features of the reference-countable ChShared class, so that ChObj instances can be managed easily with the 'intrusive smart pointers' ChSharedPtr (with minimal overhead in performance, yet providing the safe and comfortable automatic deallocation mechanism of shared/smart pointers).
Each ChObject also has a pointer to user data (for example, the user data can be the encapsulating object in case of implementation as a plugin for 3D modeling software.
Also, each ChObj object has a 32 bit identifier, in case unique identifiers are used (hash algorithms, etc.)
| int chrono::ChObj::GetIdentifier | ( | ) |
Gets the numerical identifier of the object.
| void chrono::ChObj::SetIdentifier | ( | int | id | ) |
Sets the numerical identifier of the object.
Given a fast list of ChObj, returns the address of the first matching the ID.
| double chrono::ChObj::GetChTime | ( | ) |
Gets the simulation time of this object.
| void chrono::ChObj::SetChTime | ( | double | m_time | ) |
Sets the simulation time of this object.
| char * chrono::ChObj::GetName | ( | ) |
Gets the name of the object as C Ascii null-terminated string -for reading only!
| void chrono::ChObj::SetName | ( | char | myname[] | ) |
Sets the name of this object, as ascii string.
| std::string chrono::ChObj::GetNameString | ( | ) |
Gets the name of the object as C Ascii null-terminated string.
| void chrono::ChObj::SetNameString | ( | std::string & | myname | ) |
Sets the name of this object, as std::string.
Given a fast list of ChObj, returns the address of the first matching the name.
| ChObj* chrono::ChObj::GetNext | ( | ) |
Get next element in list, if this object is a part of a 'fast list'.
| ChObj* chrono::ChObj::GetPrev | ( | ) |
Get previous element in list, if this object is a part of a 'fast list'.
| void chrono::ChObj::SetNext | ( | ChObj * | newnext | ) |
Set next element in list, if this object is a part of a 'fast list'.
| void chrono::ChObj::SetPrev | ( | ChObj * | newprev | ) |
Set previous element in list, if this object is a part of a 'fast list'.
| void chrono::ChObj::AddToList | ( | ChObj ** | CHlist | ) |
Add this object to a preexisting 'fast list', at the end.
| void chrono::ChObj::RemoveFromList | ( | ChObj ** | CHlist | ) |
Removes this object to a preexisting 'fast list', at the end (do not delete it).
| int chrono::ChObj::ListCount | ( | ChObj ** | CHlist | ) | [static] |
Count objects in a 'fast list', given pointer to pointer to list.
| void chrono::ChObj::KillList | ( | ChObj ** | CHlist | ) | [static] |
Deletes all objects building a 'fast list', given pointer to pointer to list..
| ChExternalObject* chrono::ChObj::GetExternalObject | ( | ) |
Returns a reference to the ChExternalObject object associated to this item. The external object can be used to handle external objects when encapsulating other 3d engines or apps. Return value may be null.
| void chrono::ChObj::SetExternalObject | ( | ChExternalObject * | m_obj | ) |
Sets the ChExternalObject of this object (the m_obj will be cloned).
| void chrono::ChObj::SetNoExternalObject | ( | ) |
Sets no external object.
| void chrono::ChObj::StreamOUT | ( | ChStreamOutBinary & | mstream | ) | [virtual] |
Method to allow serializing transient data into a persistent binary archive (ex: a file).
Reimplemented in chrono::ChBody, chrono::ChControls, chrono::ChForce, chrono::ChLink, chrono::ChLinkBrake, chrono::ChLinkClearance, chrono::ChLinkEngine, chrono::ChLinkGear, chrono::ChLinkLinActuator, chrono::ChLinkLock, chrono::ChLinkMarkers, chrono::ChLinkMasked, chrono::ChLinkNumdiff, chrono::ChLinkPneumaticActuator, chrono::ChLinkPointSpline, chrono::ChLinkPulley, chrono::ChLinkScrew, chrono::ChLinkSpring, chrono::ChLinkTrajectory, chrono::ChLinkWheel, chrono::ChMarker, chrono::CHoptVar, chrono::ChParticles, chrono::ChPhysicsItem, and chrono::ChSystem.
| void chrono::ChObj::StreamIN | ( | ChStreamInBinary & | mstream | ) | [virtual] |
Method to allow deserializing a persistent binary archive (ex: a file) into transient data.
Reimplemented in chrono::ChBody, chrono::ChControls, chrono::ChForce, chrono::ChLink, chrono::ChLinkBrake, chrono::ChLinkClearance, chrono::ChLinkEngine, chrono::ChLinkGear, chrono::ChLinkLinActuator, chrono::ChLinkLock, chrono::ChLinkMarkers, chrono::ChLinkMasked, chrono::ChLinkNumdiff, chrono::ChLinkPneumaticActuator, chrono::ChLinkPointSpline, chrono::ChLinkPulley, chrono::ChLinkScrew, chrono::ChLinkSpring, chrono::ChLinkTrajectory, chrono::ChLinkWheel, chrono::ChMarker, chrono::CHoptVar, chrono::ChParticles, chrono::ChPhysicsItem, and chrono::ChSystem.
| void chrono::ChObj::StreamOUT | ( | ChStreamOutAscii & | mstream | ) | [virtual] |
Method to allow serialization of transient data in ascii, as a readable item, for example "chrono::GetLog() << myobject;"
Reimplemented in chrono::ChBody, chrono::ChControls, chrono::ChForce, chrono::ChLink, chrono::ChLinkMarkers, chrono::ChLinkMasked, chrono::ChLinkNumdiff, chrono::ChMarker, chrono::CHoptVar, and chrono::ChSystem.
| int chrono::ChObj::Translate | ( | char * | string, | |
| char * | string_end, | |||
| ChTag & | ret_tag | |||
| ) | [virtual] |
Translate is used to set a Ch_Tag structure, given a string with the name of a variable. (All sub classes should implement this one, and call the up-class Translate() only if fail to parse the token. The function TranslateWithThesaurus, can be called to help you in parsing..)
| int chrono::ChObj::ParseTag | ( | ChTag | mtag, | |
| ChVar * | retv, | |||
| ChNode< ChVar > * | param, | |||
| int | set | |||
| ) | [virtual] |
The ParseTag function executes a function of the type retv= fx(param, param->next, etc...) depending on the tag identifier of mtag, with optional params. If "set" = true, the retv is stored into tag (if possible) instead of "get"ting ret = tag. (All sub classes should implement this, redirecting to the correct up-class if needed)
CHRONO::ENGINE