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 | 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]

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 StateViewMapstateViewMap () 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.
bool isCompatible (DtSimState &entry)
 Returns true if the state if 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 onSimObjectStateEntryAdded (DtSimObjectEntry &entry, DtSimState &)
 Called when a DtSimState is added to a DtSimObjectEntry.
void onSimObjectStateEntryAboutToBeRemoved (DtSimObjectEntry &entry, DtSimState &)
 Called when a DtSimState is about to be removed from a DtSimObjectEntry.
void populateFromExistingEntries ()
 Go through existing DtSimEntry's and populate this container.

Protected Attributes

DtDemyDe
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

Member Function Documentation

template<class T >
void makVrv::DtStateViewCollection< T >::setUpdateRate ( DtSimEntryUpdater::UpdateRate  rate)

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 >
bool makVrv::DtStateViewCollection< T >::isCompatible ( DtSimState entry)
protected

Returns true if the state if of type T.

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 >::onSimObjectStateEntryAdded ( DtSimObjectEntry entry,
DtSimState state 
)
protected
template<class T >
void makVrv::DtStateViewCollection< T >::onSimObjectStateEntryAboutToBeRemoved ( DtSimObjectEntry entry,
DtSimState state 
)
protected

Called when a DtSimState is about to be removed from a DtSimObjectEntry.

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
template<class T>
DtSimEntryUpdater::UpdateRate makVrv::DtStateViewCollection< T >::myRate
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)