VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrv::DtStateViewCollection< T > Class Template Reference

A DtStateViewCollection is a collection of DtStateViews of a specific state. More...

Inheritance diagram for makVrv::DtStateViewCollection< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::map< DtUniqueID,
DtStateView< T > * > 
StateViewMap
 Map of unique id's to DtStateViews's.

Public Member Functions

 DtStateViewCollection (DtDe &de, DtSimEntryUpdater::UpdateRate rate)
 CTOR.
virtual ~DtStateViewCollection ()
 DTOR.
void setUpdateRate (DtSimEntryUpdater::UpdateRate rate)
 Set the rate of every state view in the container.
size_t size () const
 Return the number of the objects in the container.
const StateViewMap & stateViewMap () const
 Return the map of DtStateViews's in this collection.
bool hasStateView (DtUniqueID id) const
 Returns true if a state view with that ID exists.
const DtStateView< T > * findStateView (DtUniqueID id) const
 Find DtStateView by id.

Public Attributes

boost::signal< void(const
DtStateView< T > &)> 
signal_stateViewAdded
 Signal emitted when a DtStateView is added.
boost::signal< void(const
DtStateView< T > &)> 
signal_stateViewAboutToBeRemoved
 Signal emitted when a DtStateView is about to be removed.

Protected Member Functions

bool isCompatible (DtSimObjectEntry &entry)
 Returns true if the DtSimEntry contains a state of type T.
void onSimObjectEntryAdded (DtSimObjectEntry &entry)
 Called when a DtSimObjectEntry is added.
void onSimObjectEntryAboutToBeRemoved (DtSimObjectEntry &entry)
 Called when a DtSimObjectEntry is about to be removed.
void populateFromExistingEntries ()
 Go through existing DtSimEntry's and populate this container.

Protected Attributes

DtDe & myDe
StateViewMap myStateViewMap
DtSimEntryUpdater::UpdateRate myRate

Detailed Description

template<class T>
class makVrv::DtStateViewCollection< T >

A DtStateViewCollection is a collection of DtStateViews of a specific state.


Member Typedef Documentation

template<class T>
typedef std::map<DtUniqueID, DtStateView<T>* > makVrv::DtStateViewCollection< T >::StateViewMap

Map of unique id's to DtStateViews's.


Constructor & Destructor Documentation

template<class T >
makVrv::DtStateViewCollection< T >::~DtStateViewCollection ( ) [virtual]

DTOR.


Member Function Documentation

Set the rate of every state view in the container.

template<class T >
size_t makVrv::DtStateViewCollection< T >::size ( ) const

Return the number of the objects in the container.

template<class T >
const DtStateViewCollection< T >::StateViewMap & makVrv::DtStateViewCollection< T >::stateViewMap ( ) const

Return the map of DtStateViews's in this collection.

template<class T >
bool makVrv::DtStateViewCollection< T >::hasStateView ( DtUniqueID  id) const

Returns true if a state view with that ID exists.

template<class T >
const DtStateView< T > * makVrv::DtStateViewCollection< T >::findStateView ( DtUniqueID  id) const

Find DtStateView by id.

template<class T >
bool makVrv::DtStateViewCollection< T >::isCompatible ( DtSimObjectEntry &  entry) [protected]

Returns true if the DtSimEntry contains a state of type T.

Reimplemented in makVrf::DtVrlinkSimulatedBaseStateViewCollection.

References makVrv::DtStateView< StateType >::isCompatible().

template<class T >
void makVrv::DtStateViewCollection< T >::onSimObjectEntryAdded ( DtSimObjectEntry &  entry) [protected]
template<class T >
void makVrv::DtStateViewCollection< T >::onSimObjectEntryAboutToBeRemoved ( DtSimObjectEntry &  entry) [protected]

Called when a DtSimObjectEntry is about to be removed.

References makVrv::DtSimEntry::id().

template<class T >
void makVrv::DtStateViewCollection< T >::populateFromExistingEntries ( ) [protected]

Go through existing DtSimEntry's and populate this container.

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


Member Data Documentation

template<class T>
boost::signal<void (const DtStateView<T>&)> makVrv::DtStateViewCollection< T >::signal_stateViewAdded

Signal emitted when a DtStateView is added.

template<class T>
boost::signal<void (const DtStateView<T>&)> makVrv::DtStateViewCollection< T >::signal_stateViewAboutToBeRemoved

Signal emitted when a DtStateView is about to be removed.

template<class T>
DtDe& makVrv::DtStateViewCollection< T >::myDe [protected]
template<class T>
StateViewMap makVrv::DtStateViewCollection< T >::myStateViewMap [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)