VR-Forces 4.2 Class Documentation
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrf::DtVrfSimBackendManager Class Reference

Maintains and signals state of the simulation engines that are currently connected to the GUI. More...

Inheritance diagram for makVrf::DtVrfSimBackendManager:
Inheritance graph
[legend]

Public Types

typedef std::map< std::string,
DtVrfBackendState * > 
DtVrfSimBackendStates

Public Member Functions

 DtVrfSimBackendManager (makVrv::DtDe &)
virtual ~DtVrfSimBackendManager ()
virtual bool backEndsPresent () const
 Returns true if there are any back-ends present.
virtual bool anyBackendsLoaded () const
 Returns true if any back-ends are loaded.
virtual bool allBackendsLoaded () const
 Returns true if all back-ends are loaded.
virtual bool backendLoaded (const DtSimulationAddress &) const
 Returns true if specified back-end is loaded.
virtual bool backendSaving (const DtSimulationAddress &) const
 Returns true if specified back-end is saving.
virtual bool anyBackendsPlaying () const
 Returns true if any back-ends are playing a scenario
virtual bool anyBackendsInControlState (int state) const
 Returns true any backend is in the particular control state (play, pause)
virtual bool allBackendsCanSimulate () const
 Returns true if all back-ends are ready to simulate.
virtual bool backendCanSimulate (const DtSimulationAddress &) const
 Returns true if the specified backend can simulate.
virtual void duplicateBackendDiscovered (const DtSimulationAddress &)
 Called when a duplicate backend is discovered. Will queue duplicateSimulationBackendDiscovered.
DtVrfBackendStatestateFor (const DtSimulationAddress &) const
const DtSimulationAddress & selectedBackend () const
void setSelectedBackend (const DtSimulationAddress &)
virtual int numberOfBackends () const
virtual void clearSelectedBackend ()
 Clears the currently selected backend.
virtual double simTime () const
 Returns the maximum sim time of all known, loaded back-ends.
virtual double simStartSimTime () const
 Returns the maximum sim start sim time of all known, loaded back-ends.
const DtVrfSimBackendStatesbackendStates () const
virtual void signalWhenAllBackendsClosed ()
 Sets the back-end manager to watch for all back-ends closed. Once closed, will stop watching.
virtual void signalIfAllBackendsClosed ()
 If there are no back-ends loaded, signals so and then sets the mySignalWhenAllBackendsClosed flag to false.
virtual void signalWhenAllBackendsLoaded ()
 Sets the back-end manager to watch for all back-ends loaded.
virtual void signalIfAllBackendsLoaded ()
 Will signal if all back-ends are loaded and the mySignalWhenAllBackendsClosed is false.
virtual void signalWhenAllBackendsSaved ()
 Sets the back-end manager to watch for all back-ends switching from saving to non-saving state.
virtual void signalIfAllBackendsSaved ()
 Will signal saved if the myBackendsWaitingForSave list is empty.
const std::string & sessionScenario () const
const std::string & sessionTerrain () const
virtual void removeAllBackends ()
 Called by the DtVrfBackendInterceptor when backend status has changed in some way.
virtual void addBackend (const DtBackend *)
 Called by the DtVrfBackendInterceptor when backend status has changed in some way.
virtual void backendRemoved (const DtSimulationAddress &)
 Called by the DtVrfBackendInterceptor when backend status has changed in some way.
virtual void backendUpdated (const DtSimulationAddress &, const DtBackend *)
 Called by the DtVrfBackendInterceptor when backend status has changed in some way.
- Public Member Functions inherited from makVrf::DtQueuedManager
 DtQueuedManager (makVrv::DtDe &)
virtual ~DtQueuedManager ()
virtual void tick ()
virtual void setActivated (bool)

Static Public Member Functions

static DtVrfSimBackendManagerinstance (makVrv::DtDe &de)
 Returns instance of the messager.

Public Attributes

boost::signal< void()> signal_allBackendsClosed
boost::signal< void()> signal_allBackendsLoaded
boost::signal< void()> signal_allBackendsSaved
boost::signal< void(const
DtVrfBackendState &)> 
signal_frameRatesUpdated
boost::signal< void(const
DtVrfBackendState &)> 
signal_backendDiscovered
boost::signal< void(const
DtVrfBackendState &)> 
signal_backendRemoved
boost::signal< void(const
DtVrfBackendState &, int)> 
signal_backendUpdated
boost::signal< void(int)> signal_sessionUpdated
boost::signal< void(const
DtVrfBackendState &)> 
signal_duplicateSimulationAddress
boost::signal< void(const
DtSimulationAddress &old,
const DtSimulationAddress
&newaddr)> 
signal_selectedBackendChanged
boost::signal< void()> signal_allBackendsAboutToBeRemoved

Protected Member Functions

virtual void slot_frameRatesUpdated (const DtVrfBackendState &)
virtual void simulationBackendRemoved (DtVrfBackendState *)
virtual void simulationBackendDiscovered (DtVrfBackendState *)
virtual void simulationBackendUpdated (DtSimulationAddress, int)
virtual void duplicateSimulationBackendDiscovered (DtSimulationAddress)
virtual void processLoadCompleteCallback (DtSimMessage *)
virtual void processSaveCompleteCallback (DtSimMessage *)
virtual void backendSaved (const std::string &)
 Called when a backend has finished saving or has been removed from the save list due to timeout.
virtual void setBackendSaving (const DtSimulationAddress &, bool b)
virtual void updateSessionInformation (int sessionFlags=0)
 Emits signal if something has changed about the session.
- Protected Member Functions inherited from makVrf::DtQueuedManager
virtual void queueSimulationFunction (const boost::function< void()> &function)
 Put a function in the sim function queue, for threadsafe calling.
virtual void runFunctionQueue (DtVrfBackendManagerCallQueue &queue)
 Execute a function queue.

Protected Attributes

makVrv::DtBaseSimulation * mySimulation
DtVrfSimBackendStates myBackendStates
DtSimulationAddress mySelectedBackend
bool mySignalWhenAllBackendsClosed
bool mySignalWhenAllBackendsLoaded
bool mySignalWhenAllBackendsSaved
std::map< std::string, char > myBackendsWaitingForSave
std::map< std::string, boolmyAlreadyDuplicateWarned
std::map< std::string, boolmyNeedToLoad
std::vector< std::string > myNeedToSave
std::string mySessionTerrainName
std::string mySessionScenarioName
std::map< std::string, boolmyJustLoadedMap
- Protected Attributes inherited from makVrf::DtQueuedManager
makVrv::DtDe & myDe
DtVrfBackendManagerCallQueue myFunctionCallQueue
bool myActivated

Additional Inherited Members

- Protected Types inherited from makVrf::DtQueuedManager
typedef
makVrv::DtLockedBufferedQueue
< boost::function< void()> > 
DtVrfBackendManagerCallQueue
typedef std::vector
< boost::function< void()> > 
DtVrfBackendManagerCallList

Detailed Description

Maintains and signals state of the simulation engines that are currently connected to the GUI.

This class also handles the thread boundary for simulation engine state messages that come from the communication thread, so that subset of the methods on this class are thread safe.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrf::DtVrfSimBackendManager::DtVrfSimBackendManager ( makVrv::DtDe &  )
virtual makVrf::DtVrfSimBackendManager::~DtVrfSimBackendManager ( )
virtual

Member Function Documentation

static DtVrfSimBackendManager& makVrf::DtVrfSimBackendManager::instance ( makVrv::DtDe &  de)
static

Returns instance of the messager.

virtual bool makVrf::DtVrfSimBackendManager::backEndsPresent ( ) const
virtual

Returns true if there are any back-ends present.

virtual bool makVrf::DtVrfSimBackendManager::anyBackendsLoaded ( ) const
virtual

Returns true if any back-ends are loaded.

virtual bool makVrf::DtVrfSimBackendManager::allBackendsLoaded ( ) const
virtual

Returns true if all back-ends are loaded.

virtual bool makVrf::DtVrfSimBackendManager::backendLoaded ( const DtSimulationAddress &  ) const
virtual

Returns true if specified back-end is loaded.

virtual bool makVrf::DtVrfSimBackendManager::backendSaving ( const DtSimulationAddress &  ) const
virtual

Returns true if specified back-end is saving.

virtual bool makVrf::DtVrfSimBackendManager::anyBackendsPlaying ( ) const
virtual

Returns true if any back-ends are playing a scenario

virtual bool makVrf::DtVrfSimBackendManager::anyBackendsInControlState ( int  state) const
virtual

Returns true any backend is in the particular control state (play, pause)

virtual bool makVrf::DtVrfSimBackendManager::allBackendsCanSimulate ( ) const
virtual

Returns true if all back-ends are ready to simulate.

virtual bool makVrf::DtVrfSimBackendManager::backendCanSimulate ( const DtSimulationAddress &  ) const
virtual

Returns true if the specified backend can simulate.

virtual void makVrf::DtVrfSimBackendManager::duplicateBackendDiscovered ( const DtSimulationAddress &  )
virtual

Called when a duplicate backend is discovered. Will queue duplicateSimulationBackendDiscovered.

virtual void makVrf::DtVrfSimBackendManager::removeAllBackends ( )
virtual

Called by the DtVrfBackendInterceptor when backend status has changed in some way.

Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.

virtual void makVrf::DtVrfSimBackendManager::addBackend ( const DtBackend )
virtual

Called by the DtVrfBackendInterceptor when backend status has changed in some way.

Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.

virtual void makVrf::DtVrfSimBackendManager::backendRemoved ( const DtSimulationAddress &  )
virtual

Called by the DtVrfBackendInterceptor when backend status has changed in some way.

Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.

virtual void makVrf::DtVrfSimBackendManager::backendUpdated ( const DtSimulationAddress &  ,
const DtBackend  
)
virtual

Called by the DtVrfBackendInterceptor when backend status has changed in some way.

Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.

DtVrfBackendState* makVrf::DtVrfSimBackendManager::stateFor ( const DtSimulationAddress &  ) const
const DtSimulationAddress& makVrf::DtVrfSimBackendManager::selectedBackend ( ) const
inline
void makVrf::DtVrfSimBackendManager::setSelectedBackend ( const DtSimulationAddress &  )
virtual int makVrf::DtVrfSimBackendManager::numberOfBackends ( ) const
virtual
virtual void makVrf::DtVrfSimBackendManager::clearSelectedBackend ( )
virtual

Clears the currently selected backend.

virtual double makVrf::DtVrfSimBackendManager::simTime ( ) const
virtual

Returns the maximum sim time of all known, loaded back-ends.

virtual double makVrf::DtVrfSimBackendManager::simStartSimTime ( ) const
virtual

Returns the maximum sim start sim time of all known, loaded back-ends.

const DtVrfSimBackendStates& makVrf::DtVrfSimBackendManager::backendStates ( ) const
inline
virtual void makVrf::DtVrfSimBackendManager::signalWhenAllBackendsClosed ( )
virtual

Sets the back-end manager to watch for all back-ends closed. Once closed, will stop watching.

virtual void makVrf::DtVrfSimBackendManager::signalIfAllBackendsClosed ( )
virtual

If there are no back-ends loaded, signals so and then sets the mySignalWhenAllBackendsClosed flag to false.

virtual void makVrf::DtVrfSimBackendManager::signalWhenAllBackendsLoaded ( )
virtual

Sets the back-end manager to watch for all back-ends loaded.

If they are currently loaded will wait until they are closed then wait until they are all reloaded

virtual void makVrf::DtVrfSimBackendManager::signalIfAllBackendsLoaded ( )
virtual

Will signal if all back-ends are loaded and the mySignalWhenAllBackendsClosed is false.

Sets mySignalWhenAllBackendsLoaded flag to false upon completion

virtual void makVrf::DtVrfSimBackendManager::signalWhenAllBackendsSaved ( )
virtual

Sets the back-end manager to watch for all back-ends switching from saving to non-saving state.

virtual void makVrf::DtVrfSimBackendManager::signalIfAllBackendsSaved ( )
virtual

Will signal saved if the myBackendsWaitingForSave list is empty.

const std::string& makVrf::DtVrfSimBackendManager::sessionScenario ( ) const
inline
const std::string& makVrf::DtVrfSimBackendManager::sessionTerrain ( ) const
inline
virtual void makVrf::DtVrfSimBackendManager::slot_frameRatesUpdated ( const DtVrfBackendState )
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::simulationBackendRemoved ( DtVrfBackendState )
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::simulationBackendDiscovered ( DtVrfBackendState )
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::simulationBackendUpdated ( DtSimulationAddress  ,
int   
)
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::duplicateSimulationBackendDiscovered ( DtSimulationAddress  )
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::processLoadCompleteCallback ( DtSimMessage )
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::processSaveCompleteCallback ( DtSimMessage )
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::backendSaved ( const std::string &  )
protectedvirtual

Called when a backend has finished saving or has been removed from the save list due to timeout.

virtual void makVrf::DtVrfSimBackendManager::setBackendSaving ( const DtSimulationAddress &  ,
bool  b 
)
protectedvirtual
virtual void makVrf::DtVrfSimBackendManager::updateSessionInformation ( int  sessionFlags = 0)
protectedvirtual

Emits signal if something has changed about the session.

Member Data Documentation

boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsClosed
boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsLoaded
boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsSaved
boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_frameRatesUpdated
boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_backendDiscovered
boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_backendRemoved
boost::signal<void (const DtVrfBackendState&, int)> makVrf::DtVrfSimBackendManager::signal_backendUpdated
boost::signal<void (int)> makVrf::DtVrfSimBackendManager::signal_sessionUpdated
boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_duplicateSimulationAddress
boost::signal<void (const DtSimulationAddress& old, const DtSimulationAddress& newaddr)> makVrf::DtVrfSimBackendManager::signal_selectedBackendChanged
boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsAboutToBeRemoved
makVrv::DtBaseSimulation* makVrf::DtVrfSimBackendManager::mySimulation
protected
DtVrfSimBackendStates makVrf::DtVrfSimBackendManager::myBackendStates
protected
DtSimulationAddress makVrf::DtVrfSimBackendManager::mySelectedBackend
protected
bool makVrf::DtVrfSimBackendManager::mySignalWhenAllBackendsClosed
protected
bool makVrf::DtVrfSimBackendManager::mySignalWhenAllBackendsLoaded
protected
bool makVrf::DtVrfSimBackendManager::mySignalWhenAllBackendsSaved
protected
std::map<std::string, char> makVrf::DtVrfSimBackendManager::myBackendsWaitingForSave
protected
std::map<std::string, bool> makVrf::DtVrfSimBackendManager::myAlreadyDuplicateWarned
protected
std::map<std::string, bool> makVrf::DtVrfSimBackendManager::myNeedToLoad
protected
std::vector<std::string> makVrf::DtVrfSimBackendManager::myNeedToSave
protected
std::string makVrf::DtVrfSimBackendManager::mySessionTerrainName
protected
std::string makVrf::DtVrfSimBackendManager::mySessionScenarioName
protected
std::map<std::string, bool> makVrf::DtVrfSimBackendManager::myJustLoadedMap
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)