VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
makVrv::DtSimEntry Class Reference

A DtSimEntry is a container of DtSimState's and represents the total state of an simulation object.

Inheritance diagram for makVrv::DtSimEntry:
Inheritance graph
[legend]

Public Types

typedef std::vector< DtSimState * > SimStateVector
 
typedef std::multimap
< DtSimEntryUpdater::UpdateRate,
DtBaseStateView * > 
UpdateRateMap
 

Public Member Functions

 DtSimEntry (DtDe &de, DtUniqueID id)
 
virtual ~DtSimEntry ()
 
const SimStateVectorsimStates () const
 
bool addState (DtSimState *state)
 
bool removeState (DtSimState *state)
 
void forceUpdate (DtBaseStateView *stateView)
 
void setUpdateRate (DtSimEntryUpdater::UpdateRate rate, DtBaseStateView *stateView)
 
DtSimEntryUpdater::UpdateRate rateForView (DtBaseStateView *stateView) const
 
void stateUpdated ()
 
DtUniqueID id () const
 

Protected Types

typedef std::vector
< DtBaseStateView * > 
ForcedUpdateVector
 

Protected Member Functions

void reset ()
 
void addStateViewToUpdateRateMap (DtSimEntryUpdater::UpdateRate rate, DtBaseStateView *stateView)
 
void removeStateViewFromUpdateRateMap (DtBaseStateView *stateView)
 
DtSimEntryUpdater::UpdateRate maxUpdateRate ()
 
DtSimEntryUpdater::UpdateRate minUpdateRate ()
 

Protected Attributes

DtDemyDe
 
DtUniqueID myId
 
SimStateVector mySimStateVector
 
ForcedUpdateVector myForcedUpdateVector
 
UpdateRateMap myUpdateRateMap
 
unsigned long long myUpdateCounter
 

Friends

class DtSimData
 

Member Typedef Documentation

A vector of DtSimState's.

A multimap of the update rates and DtEventView's to be updated at that rate.

Constructor & Destructor Documentation

makVrv::DtSimEntry::DtSimEntry ( DtDe de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtSimEntry::~DtSimEntry ( )
virtual

DTOR.

Member Function Documentation

const SimStateVector& makVrv::DtSimEntry::simStates ( ) const

SimStateVector accessor.

Referenced by makVrv::DtStateView< StateType >::findState(), and makVrf::findStateFor().

bool makVrv::DtSimEntry::addState ( DtSimState state)

Return's true if state was added to the SimStateVector.

bool makVrv::DtSimEntry::removeState ( DtSimState state)

Return's true if state was removed from the SimStateVector.

void makVrv::DtSimEntry::forceUpdate ( DtBaseStateView stateView)

Force a state view to update in the next frame.

void makVrv::DtSimEntry::setUpdateRate ( DtSimEntryUpdater::UpdateRate  rate,
DtBaseStateView stateView 
)

Set the update rate for the state view. The method must be called to receive any updates (and with a rate other than DtSimEntryUpdater::NoUpdates). Send DtSimEntryUpdater::NoUpdates to stop updating.

DtSimEntryUpdater::UpdateRate makVrv::DtSimEntry::rateForView ( DtBaseStateView stateView) const

Returns the update rate for the state view.

void makVrv::DtSimEntry::stateUpdated ( )

Called by the DtSimStateObject when a state has been updated. This will alert DtEventView's that state has been updated.

DtUniqueID makVrv::DtSimEntry::id ( ) const
void makVrv::DtSimEntry::reset ( )
protected
void makVrv::DtSimEntry::addStateViewToUpdateRateMap ( DtSimEntryUpdater::UpdateRate  rate,
DtBaseStateView stateView 
)
protected

Add stateView to myUpdateRateMap. Use setUpdateRate() to actually set the update rate.

void makVrv::DtSimEntry::removeStateViewFromUpdateRateMap ( DtBaseStateView stateView)
protected

Remove the DtEventView from myUpdateRateMap. Use setUpdateRate(Dt0Hz) to stop the updates for a state view.

DtSimEntryUpdater::UpdateRate makVrv::DtSimEntry::maxUpdateRate ( )
protected

Return the max update rate of myUpdateRateMap.

DtSimEntryUpdater::UpdateRate makVrv::DtSimEntry::minUpdateRate ( )
protected

Return the min update rate of myUpdateRateMap.

Friends And Related Function Documentation

friend class DtSimData
friend

The sim data is the friend of the entry.

Member Data Documentation

DtDe& makVrv::DtSimEntry::myDe
protected
DtUniqueID makVrv::DtSimEntry::myId
protected
SimStateVector makVrv::DtSimEntry::mySimStateVector
protected
ForcedUpdateVector makVrv::DtSimEntry::myForcedUpdateVector
protected
UpdateRateMap makVrv::DtSimEntry::myUpdateRateMap
protected
unsigned long long makVrv::DtSimEntry::myUpdateCounter
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)