Simbody  3.7
SimTK::System::Guts Class Referenceabstract

This is the declaration for the System::Guts class, the abstract object to which a System handle points. More...

+ Inheritance diagram for SimTK::System::Guts:

Public Member Functions

 Guts (const String &name="<NONAME>", const String &version="0.0.0")
 
virtual ~Guts ()
 
const StringgetName () const
 
const StringgetVersion () const
 
void setHasTimeAdvancedEvents (bool hasEm)
 
bool hasTimeAdvancedEvents () const
 
const StategetDefaultState () const
 
StateupdDefaultState ()
 
void realize (const State &s, Stage g=Stage::HighestRuntime) const
 
SubsystemIndex adoptSubsystem (Subsystem &child)
 
int getNumSubsystems () const
 
const SubsystemgetSubsystem (SubsystemIndex) const
 
SubsystemupdSubsystem (SubsystemIndex)
 
const SystemgetSystem () const
 
SystemupdSystem ()
 
void setOwnerHandle (System &)
 
bool hasOwnerHandle () const
 
 Guts (class GutsRep *r)
 
bool hasRep () const
 
const GutsRepgetRep () const
 
GutsRepupdRep () const
 
bool systemTopologyHasBeenRealized () const
 
StageVersion getSystemTopologyCacheVersion () const
 
void setSystemTopologyCacheVersion (StageVersion topoVersion) const
 
void invalidateSystemTopologyCache () const
 
System::Gutsclone () const
 
const StaterealizeTopology () const
 
void realizeModel (State &) const
 
void realizeInstance (const State &s) const
 
void realizeTime (const State &s) const
 
void realizePosition (const State &s) const
 
void realizeVelocity (const State &s) const
 
void realizeDynamics (const State &s) const
 
void realizeAcceleration (const State &s) const
 
void realizeReport (const State &s) const
 
void multiplyByN (const State &state, const Vector &u, Vector &dq) const
 
void multiplyByNTranspose (const State &state, const Vector &fq, Vector &fu) const
 
void multiplyByNPInv (const State &state, const Vector &dq, Vector &u) const
 
void multiplyByNPInvTranspose (const State &state, const Vector &fu, Vector &fq) const
 
bool prescribeQ (State &) const
 
bool prescribeU (State &) const
 
void getFreeQIndex (const State &, Array_< SystemQIndex > &freeQs) const
 
void getFreeUIndex (const State &, Array_< SystemUIndex > &freeUs) const
 
void projectQ (State &, Vector &qErrEst, const ProjectOptions &options, ProjectResults &results) const
 
void projectU (State &, Vector &uErrEst, const ProjectOptions &options, ProjectResults &results) const
 
void handleEvents (State &, Event::Cause, const Array_< EventId > &eventIds, const HandleEventsOptions &options, HandleEventsResults &results) const
 
void reportEvents (const State &, Event::Cause, const Array_< EventId > &eventIds) const
 
void calcEventTriggerInfo (const State &, Array_< EventTriggerInfo > &) const
 
void calcTimeOfNextScheduledEvent (const State &, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
void calcTimeOfNextScheduledReport (const State &, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
void calcDecorativeGeometryAndAppend (const State &, Stage, Array_< DecorativeGeometry > &) const
 

Protected Member Functions

 Guts (const Guts &)
 
virtual System::GutscloneImpl () const =0
 
virtual int realizeTopologyImpl (State &state) const
 
virtual int realizeModelImpl (State &state) const
 
virtual int realizeInstanceImpl (const State &state) const
 
virtual int realizeTimeImpl (const State &state) const
 
virtual int realizePositionImpl (const State &state) const
 
virtual int realizeVelocityImpl (const State &state) const
 
virtual int realizeDynamicsImpl (const State &state) const
 
virtual int realizeAccelerationImpl (const State &state) const
 
virtual int realizeReportImpl (const State &state) const
 
virtual void multiplyByNImpl (const State &state, const Vector &u, Vector &dq) const
 
virtual void multiplyByNTransposeImpl (const State &state, const Vector &fq, Vector &fu) const
 
virtual void multiplyByNPInvImpl (const State &state, const Vector &dq, Vector &u) const
 
virtual void multiplyByNPInvTransposeImpl (const State &state, const Vector &fu, Vector &fq) const
 
virtual bool prescribeQImpl (State &) const
 
virtual bool prescribeUImpl (State &) const
 
virtual void projectQImpl (State &state, Vector &qErrEst, const ProjectOptions &options, ProjectResults &results) const
 
virtual void projectUImpl (State &state, Vector &uErrEst, const ProjectOptions &options, ProjectResults &results) const
 
virtual void handleEventsImpl (State &state, Event::Cause cause, const Array_< EventId > &eventIds, const HandleEventsOptions &options, HandleEventsResults &results) const
 
virtual int reportEventsImpl (const State &state, Event::Cause cause, const Array_< EventId > &eventIds) const
 
virtual int calcEventTriggerInfoImpl (const State &state, Array_< EventTriggerInfo > &info) const
 
virtual int calcTimeOfNextScheduledEventImpl (const State &state, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
virtual int calcTimeOfNextScheduledReportImpl (const State &state, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
virtual void getFreeQIndexImpl (const State &s, Array_< SystemQIndex > &freeQs) const
 
virtual void getFreeUIndexImpl (const State &s, Array_< SystemUIndex > &freeUs) const
 

Friends

class GutsRep
 

Detailed Description

This is the declaration for the System::Guts class, the abstract object to which a System handle points.

This is in a separate header file from System because only people who are extending the System class to make their own Systems need to be aware of the details. End users access only methods from the System class and classes derived from System, never anything from System::Guts or its derived classes.

Below is the physical layout of memory for a System, and which portions are allocated by the client program and which by the binary library code. For binary compatibility, only the side which allocated a piece of memory can access it. Exception: both the client and library side must agree on the virtual function table (VFT) ordering of the client's virtual functions.

              CLIENT SIDE                    |  LIBRARY SIDE
                                             |
      System              System::Guts       | System::Guts::GutsRep
  ---------------       ------------------   |   -------------
 | System::Guts* | --> | System::GutsRep* | --> |   GutsRep   |
  ---------------       ------------------   |  |             |
         ^             | Concrete Guts    |  |  |  Opaque     |
         |             | class data and   |  |  |  stuff      |
  ===============      | virt func table  |  |  |             |
  Concrete System       ------------------   |  |             |
    adds no data                             |   -------------
      members

If the concrete System::Guts class also has an opaque implementation, as it will for concrete Systems provided by Simbody, then the System author should expose only the data-free handle class derived from System.

Constructor & Destructor Documentation

◆ Guts() [1/3]

SimTK::System::Guts::Guts ( const String name = "<NONAME>",
const String version = "0.0.0" 
)
explicit

◆ ~Guts()

virtual SimTK::System::Guts::~Guts ( )
virtual

◆ Guts() [2/3]

SimTK::System::Guts::Guts ( class GutsRep r)
inlineexplicit

◆ Guts() [3/3]

SimTK::System::Guts::Guts ( const Guts )
protected

Member Function Documentation

◆ getName()

const String& SimTK::System::Guts::getName ( ) const

◆ getVersion()

const String& SimTK::System::Guts::getVersion ( ) const

◆ setHasTimeAdvancedEvents()

void SimTK::System::Guts::setHasTimeAdvancedEvents ( bool  hasEm)

◆ hasTimeAdvancedEvents()

bool SimTK::System::Guts::hasTimeAdvancedEvents ( ) const

◆ getDefaultState()

const State& SimTK::System::Guts::getDefaultState ( ) const

◆ updDefaultState()

State& SimTK::System::Guts::updDefaultState ( )

◆ realize()

void SimTK::System::Guts::realize ( const State s,
Stage  g = Stage::HighestRuntime 
) const

◆ adoptSubsystem()

SubsystemIndex SimTK::System::Guts::adoptSubsystem ( Subsystem child)

◆ getNumSubsystems()

int SimTK::System::Guts::getNumSubsystems ( ) const

◆ getSubsystem()

const Subsystem& SimTK::System::Guts::getSubsystem ( SubsystemIndex  ) const

◆ updSubsystem()

Subsystem& SimTK::System::Guts::updSubsystem ( SubsystemIndex  )

◆ getSystem()

const System& SimTK::System::Guts::getSystem ( ) const

◆ updSystem()

System& SimTK::System::Guts::updSystem ( )

◆ setOwnerHandle()

void SimTK::System::Guts::setOwnerHandle ( System )

◆ hasOwnerHandle()

bool SimTK::System::Guts::hasOwnerHandle ( ) const

◆ hasRep()

bool SimTK::System::Guts::hasRep ( ) const
inline

◆ getRep()

const GutsRep& SimTK::System::Guts::getRep ( ) const
inline

◆ updRep()

GutsRep& SimTK::System::Guts::updRep ( ) const
inline

◆ systemTopologyHasBeenRealized()

bool SimTK::System::Guts::systemTopologyHasBeenRealized ( ) const

◆ getSystemTopologyCacheVersion()

StageVersion SimTK::System::Guts::getSystemTopologyCacheVersion ( ) const

◆ setSystemTopologyCacheVersion()

void SimTK::System::Guts::setSystemTopologyCacheVersion ( StageVersion  topoVersion) const

◆ invalidateSystemTopologyCache()

void SimTK::System::Guts::invalidateSystemTopologyCache ( ) const

◆ clone()

System::Guts* SimTK::System::Guts::clone ( ) const

◆ realizeTopology()

const State& SimTK::System::Guts::realizeTopology ( ) const

◆ realizeModel()

void SimTK::System::Guts::realizeModel ( State ) const

◆ realizeInstance()

void SimTK::System::Guts::realizeInstance ( const State s) const

◆ realizeTime()

void SimTK::System::Guts::realizeTime ( const State s) const

◆ realizePosition()

void SimTK::System::Guts::realizePosition ( const State s) const

◆ realizeVelocity()

void SimTK::System::Guts::realizeVelocity ( const State s) const

◆ realizeDynamics()

void SimTK::System::Guts::realizeDynamics ( const State s) const

◆ realizeAcceleration()

void SimTK::System::Guts::realizeAcceleration ( const State s) const

◆ realizeReport()

void SimTK::System::Guts::realizeReport ( const State s) const

◆ multiplyByN()

void SimTK::System::Guts::multiplyByN ( const State state,
const Vector u,
Vector dq 
) const

◆ multiplyByNTranspose()

void SimTK::System::Guts::multiplyByNTranspose ( const State state,
const Vector fq,
Vector fu 
) const

◆ multiplyByNPInv()

void SimTK::System::Guts::multiplyByNPInv ( const State state,
const Vector dq,
Vector u 
) const

◆ multiplyByNPInvTranspose()

void SimTK::System::Guts::multiplyByNPInvTranspose ( const State state,
const Vector fu,
Vector fq 
) const

◆ prescribeQ()

bool SimTK::System::Guts::prescribeQ ( State ) const

◆ prescribeU()

bool SimTK::System::Guts::prescribeU ( State ) const

◆ getFreeQIndex()

void SimTK::System::Guts::getFreeQIndex ( const State ,
Array_< SystemQIndex > &  freeQs 
) const

◆ getFreeUIndex()

void SimTK::System::Guts::getFreeUIndex ( const State ,
Array_< SystemUIndex > &  freeUs 
) const

◆ projectQ()

void SimTK::System::Guts::projectQ ( State ,
Vector qErrEst,
const ProjectOptions options,
ProjectResults results 
) const

◆ projectU()

void SimTK::System::Guts::projectU ( State ,
Vector uErrEst,
const ProjectOptions options,
ProjectResults results 
) const

◆ handleEvents()

void SimTK::System::Guts::handleEvents ( State ,
Event::Cause  ,
const Array_< EventId > &  eventIds,
const HandleEventsOptions options,
HandleEventsResults results 
) const

◆ reportEvents()

void SimTK::System::Guts::reportEvents ( const State ,
Event::Cause  ,
const Array_< EventId > &  eventIds 
) const

◆ calcEventTriggerInfo()

void SimTK::System::Guts::calcEventTriggerInfo ( const State ,
Array_< EventTriggerInfo > &   
) const

◆ calcTimeOfNextScheduledEvent()

void SimTK::System::Guts::calcTimeOfNextScheduledEvent ( const State ,
Real tNextEvent,
Array_< EventId > &  eventIds,
bool  includeCurrentTime 
) const

◆ calcTimeOfNextScheduledReport()

void SimTK::System::Guts::calcTimeOfNextScheduledReport ( const State ,
Real tNextEvent,
Array_< EventId > &  eventIds,
bool  includeCurrentTime 
) const

◆ calcDecorativeGeometryAndAppend()

void SimTK::System::Guts::calcDecorativeGeometryAndAppend ( const State ,
Stage  ,
Array_< DecorativeGeometry > &   
) const

◆ cloneImpl()

virtual System::Guts* SimTK::System::Guts::cloneImpl ( ) const
protectedpure virtual

◆ realizeTopologyImpl()

virtual int SimTK::System::Guts::realizeTopologyImpl ( State state) const
inlineprotectedvirtual

◆ realizeModelImpl()

virtual int SimTK::System::Guts::realizeModelImpl ( State state) const
inlineprotectedvirtual

◆ realizeInstanceImpl()

virtual int SimTK::System::Guts::realizeInstanceImpl ( const State state) const
inlineprotectedvirtual

◆ realizeTimeImpl()

virtual int SimTK::System::Guts::realizeTimeImpl ( const State state) const
inlineprotectedvirtual

◆ realizePositionImpl()

virtual int SimTK::System::Guts::realizePositionImpl ( const State state) const
inlineprotectedvirtual

◆ realizeVelocityImpl()

virtual int SimTK::System::Guts::realizeVelocityImpl ( const State state) const
inlineprotectedvirtual

◆ realizeDynamicsImpl()

virtual int SimTK::System::Guts::realizeDynamicsImpl ( const State state) const
inlineprotectedvirtual

◆ realizeAccelerationImpl()

virtual int SimTK::System::Guts::realizeAccelerationImpl ( const State state) const
inlineprotectedvirtual

◆ realizeReportImpl()

virtual int SimTK::System::Guts::realizeReportImpl ( const State state) const
inlineprotectedvirtual

◆ multiplyByNImpl()

virtual void SimTK::System::Guts::multiplyByNImpl ( const State state,
const Vector u,
Vector dq 
) const
protectedvirtual

◆ multiplyByNTransposeImpl()

virtual void SimTK::System::Guts::multiplyByNTransposeImpl ( const State state,
const Vector fq,
Vector fu 
) const
protectedvirtual

◆ multiplyByNPInvImpl()

virtual void SimTK::System::Guts::multiplyByNPInvImpl ( const State state,
const Vector dq,
Vector u 
) const
protectedvirtual

◆ multiplyByNPInvTransposeImpl()

virtual void SimTK::System::Guts::multiplyByNPInvTransposeImpl ( const State state,
const Vector fu,
Vector fq 
) const
protectedvirtual

◆ prescribeQImpl()

virtual bool SimTK::System::Guts::prescribeQImpl ( State ) const
inlineprotectedvirtual

◆ prescribeUImpl()

virtual bool SimTK::System::Guts::prescribeUImpl ( State ) const
inlineprotectedvirtual

◆ projectQImpl()

virtual void SimTK::System::Guts::projectQImpl ( State state,
Vector qErrEst,
const ProjectOptions options,
ProjectResults results 
) const
inlineprotectedvirtual

◆ projectUImpl()

virtual void SimTK::System::Guts::projectUImpl ( State state,
Vector uErrEst,
const ProjectOptions options,
ProjectResults results 
) const
inlineprotectedvirtual

◆ handleEventsImpl()

virtual void SimTK::System::Guts::handleEventsImpl ( State state,
Event::Cause  cause,
const Array_< EventId > &  eventIds,
const HandleEventsOptions options,
HandleEventsResults results 
) const
protectedvirtual

◆ reportEventsImpl()

virtual int SimTK::System::Guts::reportEventsImpl ( const State state,
Event::Cause  cause,
const Array_< EventId > &  eventIds 
) const
protectedvirtual

◆ calcEventTriggerInfoImpl()

virtual int SimTK::System::Guts::calcEventTriggerInfoImpl ( const State state,
Array_< EventTriggerInfo > &  info 
) const
protectedvirtual

◆ calcTimeOfNextScheduledEventImpl()

virtual int SimTK::System::Guts::calcTimeOfNextScheduledEventImpl ( const State state,
Real tNextEvent,
Array_< EventId > &  eventIds,
bool  includeCurrentTime 
) const
protectedvirtual

◆ calcTimeOfNextScheduledReportImpl()

virtual int SimTK::System::Guts::calcTimeOfNextScheduledReportImpl ( const State state,
Real tNextEvent,
Array_< EventId > &  eventIds,
bool  includeCurrentTime 
) const
protectedvirtual

◆ getFreeQIndexImpl()

virtual void SimTK::System::Guts::getFreeQIndexImpl ( const State s,
Array_< SystemQIndex > &  freeQs 
) const
inlineprotectedvirtual

◆ getFreeUIndexImpl()

virtual void SimTK::System::Guts::getFreeUIndexImpl ( const State s,
Array_< SystemUIndex > &  freeUs 
) const
inlineprotectedvirtual

Friends And Related Function Documentation

◆ GutsRep

friend class GutsRep
friend

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