VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | 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. More...

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

Public Types

typedef std::vector< DtSimState * > SimStateVector
 A vector of DtSimState's.
typedef std::multimap
< DtSimEntryUpdater::UpdateRate,
DtBaseStateView * > 
UpdateRateMap
 A multimap of the update rates and DtEventView's to be updated at that rate.

Public Member Functions

 DtSimEntry (DtDe &de, DtUniqueID id)
 CTOR.
virtual ~DtSimEntry ()
 DTOR.
const SimStateVectorsimStates () const
 SimStateVector accessor.
bool addState (DtSimState *state)
 Return's true if state was added to the SimStateVector.
bool removeState (DtSimState *state)
 Return's true if state was removed from the SimStateVector.
void forceUpdate (DtBaseStateView *stateView)
 Force a state view which is currently being updated periodically to update in the next frame.
void setUpdateRate (DtSimEntryUpdater::UpdateRate rate, DtBaseStateView *stateView)
 Set the update rate for the state view.
DtSimEntryUpdater::UpdateRate rateForView (DtBaseStateView *stateView) const
 Returns the update rate for the state view.
void stateUpdated ()
 Called by the DtSimStateObject when a state has been updated.
DtUniqueID id () const
 Return the unique Id of this entry.

Protected Member Functions

void reset ()
void addStateViewToUpdateRateMap (DtSimEntryUpdater::UpdateRate rate, DtBaseStateView *stateView)
 Add stateView to myUpdateRateMap.
void removeStateViewFromUpdateRateMap (DtBaseStateView *stateView)
 Remove the DtEventView from myUpdateRateMap.
DtSimEntryUpdater::UpdateRate maxUpdateRate ()
 Return the max update rate of myUpdateRateMap.
DtSimEntryUpdater::UpdateRate minUpdateRate ()
 Return the min update rate of myUpdateRateMap.

Protected Attributes

DtDemyDe
DtUniqueID myId
SimStateVector mySimStateVector
UpdateRateMap myUpdateRateMap
unsigned long long myUpdateCounter
bool myForceUpdatePending

Friends

class DtSimData
 The sim data is the friend of the entry.

Detailed Description

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

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 which is currently being updated periodically 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
UpdateRateMap makVrv::DtSimEntry::myUpdateRateMap
protected
unsigned long long makVrv::DtSimEntry::myUpdateCounter
protected
bool makVrv::DtSimEntry::myForceUpdatePending
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)