VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions
makVrv::DtStateView< StateType > Class Template Reference

A DtStateView is a the interface to simulation state information. More...

Inheritance diagram for makVrv::DtStateView< StateType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtStateView (DtSimEntry &entry)
 CTOR.
virtual ~DtStateView ()
 DTOR.
void forceUpdate ()
 Force a single update which will be sent to all views regardless of update rates.
void setUpdateRate (DtSimEntryUpdater::UpdateRate rate)
 Set the rate this view will be updated with state information.
virtual void emitStateViewUpdated ()
 This will get called by the DtSimEntry when the state for this view has been updated.
const StateType & state ()
 Return the state this is a view onto.
const StateType & state () const
 Return the state this is a view onto.
DtUniqueID id () const

Static Public Member Functions

static bool isCompatible (DtSimEntry &entry)
 Returns true if the DtSimEntry contains a state of type T.
static StateType * findState (DtSimEntry &entry)
 Returns a pointer to the state type for an entry, if the state is not found a null pointer is returned.

Public Attributes

boost::signal< void(DtStateView
< StateType > *)> 
signal_stateViewUpdated
 Emitted when a this view's state has been updated.

Protected Attributes

DtSimEntrymySimEntry
StateType * myState

Private Member Functions

 DtStateView ()
 Non-Existant.
 DtStateView (const DtStateView &)
DtStateViewoperator= (const DtStateView &)

Detailed Description

template<class StateType>
class makVrv::DtStateView< StateType >

A DtStateView is a the interface to simulation state information.

Users can create DtStateViews for specific state they care about and it will be updated at the requested rate.


Constructor & Destructor Documentation

template<class StateType >
makVrv::DtStateView< StateType >::DtStateView ( DtSimEntry entry)
template<class StateType >
makVrv::DtStateView< StateType >::~DtStateView ( ) [virtual]
template<class StateType>
makVrv::DtStateView< StateType >::DtStateView ( ) [private]

Non-Existant.

template<class StateType>
makVrv::DtStateView< StateType >::DtStateView ( const DtStateView< StateType > &  ) [private]

Member Function Documentation

template<class StateType >
void makVrv::DtStateView< StateType >::forceUpdate ( )

Force a single update which will be sent to all views regardless of update rates.

template<class StateType >
void makVrv::DtStateView< StateType >::setUpdateRate ( DtSimEntryUpdater::UpdateRate  rate)

Set the rate this view will be updated with state information.

Referenced by makVrv::DtStateViewCollection< T >::onSimObjectEntryAdded().

template<class StateType >
void makVrv::DtStateView< StateType >::emitStateViewUpdated ( ) [virtual]

This will get called by the DtSimEntry when the state for this view has been updated.

This emits a signal containing the state view that was updated.

Implements makVrv::DtBaseStateView.

template<class StateType >
const StateType & makVrv::DtStateView< StateType >::state ( )

Return the state this is a view onto.

template<class StateType >
const StateType & makVrv::DtStateView< StateType >::state ( ) const

Return the state this is a view onto.

template<class StateType >
bool makVrv::DtStateView< StateType >::isCompatible ( DtSimEntry entry) [static]
template<class StateType >
StateType * makVrv::DtStateView< StateType >::findState ( DtSimEntry entry) [static]

Returns a pointer to the state type for an entry, if the state is not found a null pointer is returned.

References makVrv::DtSimEntry::simStates().

Referenced by makVrv::DtStateView< StateType >::DtStateView(), and makVrv::DtStateView< StateType >::isCompatible().

template<class StateType>
DtUniqueID makVrv::DtStateView< StateType >::id ( ) const [inline]
template<class StateType>
DtStateView& makVrv::DtStateView< StateType >::operator= ( const DtStateView< StateType > &  ) [private]

Member Data Documentation

template<class StateType>
boost::signal<void (DtStateView<StateType>*)> makVrv::DtStateView< StateType >::signal_stateViewUpdated

Emitted when a this view's state has been updated.

template<class StateType>
DtSimEntry& makVrv::DtStateView< StateType >::mySimEntry [protected]
template<class StateType>
StateType* makVrv::DtStateView< StateType >::myState [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)