Project Chrono: chrono::ChObj Class Reference

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
chrono::ChObj Class Referenceabstract
Chrono::Engine » Physics objects

## Description

Base class for all Chrono objects.

Each object receives a unique identifier and can be named and/or tagged.

`#include <ChObject.h>`

Inheritance diagram for chrono::ChObj:
[legend]

## Public Member Functions
| ChObj (const ChObj &other)
virtual ChObj * | Clone () const =0
| "Virtual" copy constructor.
int | GetIdentifier () const
| Get the unique integer identifier of this object.
void | SetTag (int tag)
| Set an object integer tag (default: -1).
int | GetTag () const
| Get the tag of this object.
void | SetName (const std::string &myname)
| Set the name of this object.
const std::string & | GetName () const
| Get the name of this object.
double | GetChTime () const
| Gets the simulation time of this object.
void | SetChTime (double m_time)
| Sets the simulation time of this object.
virtual void | ArchiveOut (ChArchiveOut &archive_out)
| Method to allow serialization of transient data to archives.
virtual void | ArchiveIn (ChArchiveIn &archive_in)
| Method to allow de-serialization of transient data from archives.
virtual std::string & | ArchiveContainerName ()

## Protected Member Functions
int | GenerateUniqueIdentifier ()

## Protected Attributes
double | ChTime
| object simulation time
std::string | m_name
| object name
int | m_identifier
| object unique identifier
int | m_tag
| user-supplied tag

## Member Function Documentation

## ◆ ArchiveIn()

void chrono::ChObj::ArchiveIn | ( | ChArchiveIn & | archive_in | ) |
| virtual

Method to allow de-serialization of transient data from archives.

Reimplemented in chrono::ChAssembly, chrono::ChBody, chrono::ChBodyAuxRef, chrono::ChContactContainer, chrono::ChContactContainerNSC, chrono::ChContactContainerSMC, chrono::ChConveyor, chrono::ChFeeder, chrono::ChForce, chrono::ChIndexedNodes, chrono::ChIndexedParticles, chrono::ChLink, chrono::ChLinkBase, chrono::ChLinkBushing, chrono::ChLinkDistance, chrono::ChLinkLock, chrono::ChLinkLockBrake, chrono::ChLinkLockClearance, chrono::ChLinkLockGear, chrono::ChLinkLockLinActuator, chrono::ChLinkLockLock, chrono::ChLinkLockPointSpline, chrono::ChLinkLockPulley, chrono::ChLinkLockScrew, chrono::ChLinkLockTrajectory, chrono::ChLinkMarkers, chrono::ChLinkMate, chrono::ChLinkMateCylindrical, chrono::ChLinkMateDistanceZ, chrono::ChLinkMateGeneric, chrono::ChLinkMateOrthogonal, chrono::ChLinkMateParallel, chrono::ChLinkMatePlanar, chrono::ChLinkMatePrismatic, chrono::ChLinkMateRackPinion, chrono::ChLinkMateRevolute, chrono::ChLinkMotionImposed, chrono::ChLinkMotor, chrono::ChLinkMotorLinear, chrono::ChLinkMotorLinearDriveline, chrono::ChLinkMotorLinearForce, chrono::ChLinkMotorLinearPosition, chrono::ChLinkMotorLinearSpeed, chrono::ChLinkMotorRotation, chrono::ChLinkMotorRotationAngle, chrono::ChLinkMotorRotationDriveline, chrono::ChLinkMotorRotationSpeed, chrono::ChLinkMotorRotationTorque, chrono::ChLinkRevolute, chrono::ChLinkRevoluteSpherical, chrono::ChLinkRevoluteTranslational, chrono::ChLinkRSDA, chrono::ChLinkTSDA, chrono::ChLinkUniversal, chrono::ChLoadContainer, chrono::ChMarker, chrono::ChParticleCloud, chrono::ChPhysicsItem, chrono::ChProximityContainer, chrono::ChShaft, chrono::ChShaftBodyRotation, chrono::ChShaftBodyTranslation, chrono::ChShaftsAppliedTorque, chrono::ChShaftsClutch, chrono::ChShaftsCouple, chrono::ChShaftsFreewheel, chrono::ChShaftsGear, chrono::ChShaftsGearbox, chrono::ChShaftsGearboxAngled, chrono::ChShaftsMotor, chrono::ChShaftsMotorLoad, chrono::ChShaftsMotorPosition, chrono::ChShaftsMotorSpeed, chrono::ChShaftsPlanetary, chrono::ChShaftsThermalEngine, chrono::ChShaftsTorque, chrono::ChShaftsTorqueConverter, chrono::ChShaftsTorsionSpring, chrono::fea::ChLinkBeamIGAFrame, chrono::fea::ChLinkNodeFace, chrono::fea::ChLinkNodeFaceRot, chrono::fea::ChLinkNodeFrame, chrono::fea::ChLinkNodeFrameGeneric, chrono::fea::ChLinkNodeNode, chrono::fea::ChLinkNodeSlopeFrame, and chrono::modal::ChModalAssembly.

## ◆ ArchiveOut()

void chrono::ChObj::ArchiveOut | ( | ChArchiveOut & | archive_out | ) |
| virtual

Method to allow serialization of transient data to archives.

Reimplemented in chrono::ChAssembly, chrono::ChBody, chrono::ChBodyAuxRef, chrono::ChContactContainer, chrono::ChContactContainerNSC, chrono::ChContactContainerSMC, chrono::ChConveyor, chrono::ChFeeder, chrono::ChForce, chrono::ChIndexedNodes, chrono::ChIndexedParticles, chrono::ChLink, chrono::ChLinkBase, chrono::ChLinkBushing, chrono::ChLinkDistance, chrono::ChLinkLock, chrono::ChLinkLockBrake, chrono::ChLinkLockClearance, chrono::ChLinkLockGear, chrono::ChLinkLockLinActuator, chrono::ChLinkLockLock, chrono::ChLinkLockPointSpline, chrono::ChLinkLockPulley, chrono::ChLinkLockScrew, chrono::ChLinkLockTrajectory, chrono::ChLinkMarkers, chrono::ChLinkMate, chrono::ChLinkMateCylindrical, chrono::ChLinkMateDistanceZ, chrono::ChLinkMateGeneric, chrono::ChLinkMateOrthogonal, chrono::ChLinkMateParallel, chrono::ChLinkMatePlanar, chrono::ChLinkMatePrismatic, chrono::ChLinkMateRackPinion, chrono::ChLinkMateRevolute, chrono::ChLinkMotionImposed, chrono::ChLinkMotor, chrono::ChLinkMotorLinear, chrono::ChLinkMotorLinearDriveline, chrono::ChLinkMotorLinearForce, chrono::ChLinkMotorLinearPosition, chrono::ChLinkMotorLinearSpeed, chrono::ChLinkMotorRotation, chrono::ChLinkMotorRotationAngle, chrono::ChLinkMotorRotationDriveline, chrono::ChLinkMotorRotationSpeed, chrono::ChLinkMotorRotationTorque, chrono::ChLinkRevolute, chrono::ChLinkRevoluteSpherical, chrono::ChLinkRevoluteTranslational, chrono::ChLinkRSDA, chrono::ChLinkTSDA, chrono::ChLinkUniversal, chrono::ChLoadContainer, chrono::ChMarker, chrono::ChParticleCloud, chrono::ChPhysicsItem, chrono::ChProximityContainer, chrono::ChShaft, chrono::ChShaftBodyRotation, chrono::ChShaftBodyTranslation, chrono::ChShaftsAppliedTorque, chrono::ChShaftsClutch, chrono::ChShaftsCouple, chrono::ChShaftsFreewheel, chrono::ChShaftsGear, chrono::ChShaftsGearbox, chrono::ChShaftsGearboxAngled, chrono::ChShaftsMotor, chrono::ChShaftsMotorLoad, chrono::ChShaftsMotorPosition, chrono::ChShaftsMotorSpeed, chrono::ChShaftsPlanetary, chrono::ChShaftsThermalEngine, chrono::ChShaftsTorque, chrono::ChShaftsTorqueConverter, chrono::ChShaftsTorsionSpring, chrono::fea::ChLinkBeamIGAFrame, chrono::fea::ChLinkNodeFace, chrono::fea::ChLinkNodeFaceRot, chrono::fea::ChLinkNodeFrame, chrono::fea::ChLinkNodeFrameGeneric, chrono::fea::ChLinkNodeNode, chrono::fea::ChLinkNodeSlopeFrame, and chrono::modal::ChModalAssembly.

## ◆ Clone()

virtual ChObj * chrono::ChObj::Clone | ( |  | ) | const
| pure virtual

"Virtual" copy constructor.

Implemented in chrono::ChAssembly, chrono::ChBody, chrono::ChBodyAuxRef, chrono::ChContactContainerMulticoreNSC, chrono::ChContactContainerMulticoreSMC, chrono::ChContactContainerNSC, chrono::ChContactContainerSMC, chrono::ChConveyor, chrono::ChExternalDynamics, chrono::ChFeeder, chrono::ChForce, chrono::ChLinkBushing, chrono::ChLinkDistance, chrono::ChLinkLock, chrono::ChLinkLockAlign, chrono::ChLinkLockBrake, chrono::ChLinkLockClearance, chrono::ChLinkLockCylindrical, chrono::ChLinkLockFree, chrono::ChLinkLockGear, chrono::ChLinkLockLinActuator, chrono::ChLinkLockLock, chrono::ChLinkLockOldham, chrono::ChLinkLockParallel, chrono::ChLinkLockPerpend, chrono::ChLinkLockPlanar, chrono::ChLinkLockPointLine, chrono::ChLinkLockPointPlane, chrono::ChLinkLockPointSpline, chrono::ChLinkLockPrismatic, chrono::ChLinkLockPulley, chrono::ChLinkLockRevolute, chrono::ChLinkLockRevolutePrismatic, chrono::ChLinkLockScrew, chrono::ChLinkLockSpherical, chrono::ChLinkLockTrajectory, chrono::ChLinkMarkers, chrono::ChLinkMateCylindrical, chrono::ChLinkMateDistanceZ, chrono::ChLinkMateFix, chrono::ChLinkMateGeneric, chrono::ChLinkMateOrthogonal, chrono::ChLinkMateParallel, chrono::ChLinkMatePlanar, chrono::ChLinkMatePrismatic, chrono::ChLinkMateRackPinion, chrono::ChLinkMateRevolute, chrono::ChLinkMateSpherical, chrono::ChLinkMotionImposed, chrono::ChLinkMotor, chrono::ChLinkMotorLinearDriveline, chrono::ChLinkMotorLinearForce, chrono::ChLinkMotorLinearPosition, chrono::ChLinkMotorLinearSpeed, chrono::ChLinkMotorRotationAngle, chrono::ChLinkMotorRotationDriveline, chrono::ChLinkMotorRotationSpeed, chrono::ChLinkMotorRotationTorque, chrono::ChLinkRevolute, chrono::ChLinkRevoluteSpherical, chrono::ChLinkRevoluteTranslational, chrono::ChLinkRSDA, chrono::ChLinkTSDA, chrono::ChLinkUniversal, chrono::ChLoad, chrono::ChLoadBodyBodyBushingGeneric, chrono::ChLoadBodyBodyBushingSpherical, chrono::ChLoadBodyBodyTorque, chrono::ChLoadBodyForce, chrono::ChLoadBodyInertia, chrono::ChLoadBodyMesh, chrono::ChLoadBodyTorque, chrono::ChLoadContainer, chrono::ChLoadNodeXYZ, chrono::ChLoadNodeXYZBodyBushing, chrono::ChLoadNodeXYZBodySpring, chrono::ChLoadNodeXYZForceAbs, chrono::ChLoadNodeXYZNodeXYZBushing, chrono::ChLoadNodeXYZNodeXYZSpring, chrono::ChMarker, chrono::ChParticleCloud, chrono::ChPhysicsItem, chrono::ChShaft, chrono::ChShaftBodyRotation, chrono::ChShaftBodyTranslation, chrono::ChShaftsAppliedTorque, chrono::ChShaftsClutch, chrono::ChShaftsCouple, chrono::ChShaftsElasticGear, chrono::ChShaftsFreewheel, chrono::ChShaftsGear, chrono::ChShaftsGearbox, chrono::ChShaftsGearboxAngled, chrono::ChShaftsMotorLoad, chrono::ChShaftsMotorPosition, chrono::ChShaftsMotorSpeed, chrono::ChShaftsPlanetary, chrono::ChShaftsThermalEngine, chrono::ChShaftsTorqueConverter, chrono::ChShaftsTorsionSpring, chrono::ChShaftsTorsionSpringDamper, chrono::fea::ChLinkBeamIGAFrame, chrono::fea::ChLinkNodeFace, chrono::fea::ChLinkNodeFaceRot, chrono::fea::ChLinkNodeFrame, chrono::fea::ChLinkNodeFrameGeneric, chrono::fea::ChLinkNodeNode, chrono::fea::ChLinkNodeSlopeFrame, chrono::fea::ChLoadBeamWrench, chrono::fea::ChLoadBeamWrenchDistributed, chrono::fea::ChLoadContactSurfaceMesh, chrono::fea::ChLoadNodeXYZRotBodyBushingGeneric, chrono::fea::ChLoadNodeXYZRotBodyBushingSpherical, chrono::fea::ChLoadNodeXYZRotForceAbs, chrono::fea::ChLoadNodeXYZRotNodeXYZRotBushingGeneric, chrono::fea::ChLoadNodeXYZRotNodeXYZRotBushingSpherical, chrono::fea::ChMesh, chrono::modal::ChModalAssembly, and chrono::utils::ChControllerPID.

## ◆ GetIdentifier()

int chrono::ChObj::GetIdentifier | ( |  | ) | const
| inline

Get the unique integer identifier of this object.

Object identifiers are generated automatically in incremental order based on the order in which objects are created. These identifiers are transient and as such are not serialized. However, user code can cache the identifier of any Chrono object and use it later (e.g., to search the item in a ChAssembly).

## ◆ SetTag()

void chrono::ChObj::SetTag | ( | int | tag | ) |
| inline

Set an object integer tag (default: -1).

Unlike the object identifier, this tag is completely under user control and not used anywhere else in Chrono. Tags are serialized and de-serialized.

The documentation for this class was generated from the following files:

- D:/W/B/src/chrono-9.0.1/src/chrono/physics/ChObject.h
- D:/W/B/src/chrono-9.0.1/src/chrono/physics/ChObject.cpp