Guts Class Reference

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

#include <SystemGuts.h>

List of all members.

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 getNSubsystems () 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 GutsRep & getRep () const
GutsRep & updRep () const
bool systemTopologyHasBeenRealized () 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
Real calcTimescale (const State &) const
void calcYUnitWeights (const State &, Vector &weights) const
void project (State &, Real consAccuracy, const Vector &yweights, const Vector &ootols, Vector &yerrest, System::ProjectOptions) const
void calcYErrUnitTolerances (const State &, Vector &tolerances) const
void handleEvents (State &, Event::Cause, const std::vector< EventId > &eventIds, Real accuracy, const Vector &yWeights, const Vector &ooConstraintTols, Stage &lowestModified, bool &shouldTerminate) const
void reportEvents (const State &, Event::Cause, const std::vector< EventId > &eventIds) const
void calcEventTriggerInfo (const State &, std::vector< EventTriggerInfo > &) const
void calcTimeOfNextScheduledEvent (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) const
void calcTimeOfNextScheduledReport (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) const
void calcDecorativeGeometryAndAppend (const State &, Stage, std::vector< DecorativeGeometry > &) const

Protected Member Functions

 Guts (const Guts &)
virtual System::GutscloneImpl () const =0
virtual int realizeTopologyImpl (State &) const
virtual int realizeModelImpl (State &) const
virtual int realizeInstanceImpl (const State &) const
virtual int realizeTimeImpl (const State &) const
virtual int realizePositionImpl (const State &) const
virtual int realizeVelocityImpl (const State &) const
virtual int realizeDynamicsImpl (const State &) const
virtual int realizeAccelerationImpl (const State &) const
virtual int realizeReportImpl (const State &) const
virtual Real calcTimescaleImpl (const State &) const
virtual int calcYUnitWeightsImpl (const State &, Vector &weights) const
virtual int projectImpl (State &, Real consAccuracy, const Vector &yweights, const Vector &ootols, Vector &yerrest, System::ProjectOptions) const
virtual int calcYErrUnitTolerancesImpl (const State &, Vector &tolerances) const
virtual int handleEventsImpl (State &, Event::Cause, const std::vector< EventId > &eventIds, Real accuracy, const Vector &yWeights, const Vector &ooConstraintTols, Stage &lowestModified, bool &shouldTerminate) const
virtual int reportEventsImpl (const State &, Event::Cause, const std::vector< EventId > &eventIds) const
virtual int calcEventTriggerInfoImpl (const State &, std::vector< EventTriggerInfo > &) const
virtual int calcTimeOfNextScheduledEventImpl (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) const
virtual int calcTimeOfNextScheduledReportImpl (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) 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 compatiblity, 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 the SimTK Core, then the System author should expose only the data-free handle class derived from System.


Constructor & Destructor Documentation

Guts ( const String name = "<NONAME>",
const String version = "0.0.0" 
) [explicit]
virtual ~Guts (  )  [virtual]
Guts ( class GutsRep *  r  )  [inline, explicit]
Guts ( const Guts  )  [protected]

Member Function Documentation

SubsystemIndex adoptSubsystem ( Subsystem child  ) 
void calcDecorativeGeometryAndAppend ( const State ,
Stage  ,
std::vector< DecorativeGeometry > &   
) const
void calcEventTriggerInfo ( const State ,
std::vector< EventTriggerInfo > &   
) const
virtual int calcEventTriggerInfoImpl ( const State ,
std::vector< EventTriggerInfo > &   
) const [protected, virtual]
void calcTimeOfNextScheduledEvent ( const State ,
Real &  tNextEvent,
std::vector< EventId > &  eventIds,
bool  includeCurrentTime 
) const
virtual int calcTimeOfNextScheduledEventImpl ( const State ,
Real &  tNextEvent,
std::vector< EventId > &  eventIds,
bool  includeCurrentTime 
) const [protected, virtual]
void calcTimeOfNextScheduledReport ( const State ,
Real &  tNextEvent,
std::vector< EventId > &  eventIds,
bool  includeCurrentTime 
) const
virtual int calcTimeOfNextScheduledReportImpl ( const State ,
Real &  tNextEvent,
std::vector< EventId > &  eventIds,
bool  includeCurrentTime 
) const [protected, virtual]
Real calcTimescale ( const State  )  const
virtual Real calcTimescaleImpl ( const State  )  const [protected, virtual]
void calcYErrUnitTolerances ( const State ,
Vector tolerances 
) const
virtual int calcYErrUnitTolerancesImpl ( const State ,
Vector tolerances 
) const [protected, virtual]
void calcYUnitWeights ( const State ,
Vector weights 
) const
virtual int calcYUnitWeightsImpl ( const State ,
Vector weights 
) const [protected, virtual]
System::Guts* clone (  )  const
virtual System::Guts* cloneImpl (  )  const [protected, pure virtual]
const State& getDefaultState (  )  const
const String& getName (  )  const
int getNSubsystems (  )  const
const GutsRep& getRep (  )  const [inline]
const Subsystem& getSubsystem ( SubsystemIndex   )  const
const System& getSystem (  )  const
const String& getVersion (  )  const
void handleEvents ( State ,
Event::Cause  ,
const std::vector< EventId > &  eventIds,
Real  accuracy,
const Vector yWeights,
const Vector ooConstraintTols,
Stage lowestModified,
bool &  shouldTerminate 
) const
virtual int handleEventsImpl ( State ,
Event::Cause  ,
const std::vector< EventId > &  eventIds,
Real  accuracy,
const Vector yWeights,
const Vector ooConstraintTols,
Stage lowestModified,
bool &  shouldTerminate 
) const [protected, virtual]
bool hasOwnerHandle (  )  const
bool hasRep (  )  const [inline]
bool hasTimeAdvancedEvents (  )  const
void invalidateSystemTopologyCache (  )  const
void project ( State ,
Real  consAccuracy,
const Vector yweights,
const Vector ootols,
Vector yerrest,
System::ProjectOptions   
) const
virtual int projectImpl ( State ,
Real  consAccuracy,
const Vector yweights,
const Vector ootols,
Vector yerrest,
System::ProjectOptions   
) const [protected, virtual]
void realize ( const State s,
Stage  g = Stage::HighestRuntime 
) const
void realizeAcceleration ( const State s  )  const
virtual int realizeAccelerationImpl ( const State  )  const [protected, virtual]
void realizeDynamics ( const State s  )  const
virtual int realizeDynamicsImpl ( const State  )  const [protected, virtual]
void realizeInstance ( const State s  )  const
virtual int realizeInstanceImpl ( const State  )  const [protected, virtual]
void realizeModel ( State  )  const
virtual int realizeModelImpl ( State  )  const [protected, virtual]
void realizePosition ( const State s  )  const
virtual int realizePositionImpl ( const State  )  const [protected, virtual]
void realizeReport ( const State s  )  const
virtual int realizeReportImpl ( const State  )  const [protected, virtual]
void realizeTime ( const State s  )  const
virtual int realizeTimeImpl ( const State  )  const [protected, virtual]
const State& realizeTopology (  )  const
virtual int realizeTopologyImpl ( State  )  const [protected, virtual]
void realizeVelocity ( const State s  )  const
virtual int realizeVelocityImpl ( const State  )  const [protected, virtual]
void reportEvents ( const State ,
Event::Cause  ,
const std::vector< EventId > &  eventIds 
) const
virtual int reportEventsImpl ( const State ,
Event::Cause  ,
const std::vector< EventId > &  eventIds 
) const [protected, virtual]
void setHasTimeAdvancedEvents ( bool  hasEm  ) 
void setOwnerHandle ( System  ) 
bool systemTopologyHasBeenRealized (  )  const
State& updDefaultState (  ) 
GutsRep& updRep (  )  const [inline]
Subsystem& updSubsystem ( SubsystemIndex   ) 
System& updSystem (  ) 

Friends And Related Function Documentation

friend class GutsRep [friend]

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

Generated on Wed Dec 30 11:05:29 2009 for SimTKcore by  doxygen 1.6.1