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::DtVrfBatchScenarioManager Class Reference

The class that will contain information about the currently loaded scenario. More...

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

Public Types

enum  State {
  StateIdle, StateRunStart, StateLoading, StateRunning,
  StateRunComplete, StateRunBatchComplete, StateErrorLoading, StateClosing
}
 Enumerations for state of batch run. More...

Public Member Functions

 DtVrfBatchScenarioManager (makVrv::DtDe &)
virtual ~DtVrfBatchScenarioManager ()
virtual void loadBatchScenario (QWidget *)
 Creates and shows the batch load scenario dialog.
virtual QFileDialogcreateLoadBatchScenarioDialog (QWidget *)
virtual bool loadBatchScenario (const QString &batch)
virtual bool runBatch ()
 Starts up the batch run.
bool isBatchRunning () const
DtScenarioBatchIteratorbatchIterator () const
bool runningBatchScenario () const
virtual void nextScenarioRun ()
 Call this function to move onto the next scenario run in the batch (if there is one)
virtual void nextScenario ()
 Call this function to move onto the next scenario in the batch even if there are runs left in the current scenario.
virtual bool close ()
 Stops the currently running batch scenario.

Static Public Member Functions

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

Public Attributes

boost::signal< void()> signal_stateRunStart
boost::signal< void()> signal_nextRunAboutToStart
 Sent after the last scenario has closed and next one is about to start.
boost::signal< void()> signal_batchRunComplete
 Sent when all batch files have been run.
boost::signal< void()> signal_errorLoadingScenario
boost::signal< void()> signal_scenarioRunComplete
 Signalled when a scenario run is complete.

Protected Member Functions

virtual void tick ()
virtual void idle ()
 Called in idle state.
virtual void startNextBatchScenario ()
 Starts by running the next batch.
virtual void loading ()
 Iterated over while waiting for scenario to load.
virtual void running ()
 Called when batch is running.
virtual double currentSimulationTime () const
 Returns the current simulation time from the first back-end in the remote control list.
virtual DtFilename constructLoggerFilename (const DtScenario *scenario)
virtual void allBackendsClosed ()
 Schedules next run.
virtual void loadScenarioError (const std::string &error, bool showMessage=true)
 Called when there is an error loading the scenario.
virtual void slot_scenarioLoadComplete ()
 Called after scenario is loaded.
virtual QString batchRunTitle (const DtScenario *) const
virtual void setMainWindowTitle (const QString &)
virtual QString mainWindowTitle () const

Protected Attributes

DtScenarioBatchIteratormyBatchIterator
makVrv::DtDe & myDe
QString myBatchFile
bool myRunning
DtVrfScenarioRemapFunctionmyRemap
double myRunStartTime
State myState
QString myOriginalTitle

Detailed Description

The class that will contain information about the currently loaded scenario.

Member Enumeration Documentation

Enumerations for state of batch run.

Enumerator:
StateIdle 
StateRunStart 
StateLoading 
StateRunning 
StateRunComplete 
StateRunBatchComplete 
StateErrorLoading 
StateClosing 

Constructor & Destructor Documentation

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

Member Function Documentation

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

Returns instance of the messager.

virtual void makVrf::DtVrfBatchScenarioManager::loadBatchScenario ( QWidget )
virtual

Creates and shows the batch load scenario dialog.

virtual QFileDialog* makVrf::DtVrfBatchScenarioManager::createLoadBatchScenarioDialog ( QWidget )
virtual
virtual bool makVrf::DtVrfBatchScenarioManager::loadBatchScenario ( const QString &  batch)
virtual
virtual bool makVrf::DtVrfBatchScenarioManager::runBatch ( )
virtual

Starts up the batch run.

bool makVrf::DtVrfBatchScenarioManager::isBatchRunning ( ) const
inline
DtScenarioBatchIterator* makVrf::DtVrfBatchScenarioManager::batchIterator ( ) const
inline
bool makVrf::DtVrfBatchScenarioManager::runningBatchScenario ( ) const
inline
virtual void makVrf::DtVrfBatchScenarioManager::nextScenarioRun ( )
virtual

Call this function to move onto the next scenario run in the batch (if there is one)

virtual void makVrf::DtVrfBatchScenarioManager::nextScenario ( )
virtual

Call this function to move onto the next scenario in the batch even if there are runs left in the current scenario.

virtual bool makVrf::DtVrfBatchScenarioManager::close ( )
virtual

Stops the currently running batch scenario.

virtual void makVrf::DtVrfBatchScenarioManager::tick ( )
protectedvirtual
virtual void makVrf::DtVrfBatchScenarioManager::idle ( )
protectedvirtual

Called in idle state.

virtual void makVrf::DtVrfBatchScenarioManager::startNextBatchScenario ( )
protectedvirtual

Starts by running the next batch.

virtual void makVrf::DtVrfBatchScenarioManager::loading ( )
protectedvirtual

Iterated over while waiting for scenario to load.

Will call slot_scenarioLoadComplete callback when loaded

virtual void makVrf::DtVrfBatchScenarioManager::running ( )
protectedvirtual

Called when batch is running.

Will check time to see if current batch is over and next batch needs to be run

virtual double makVrf::DtVrfBatchScenarioManager::currentSimulationTime ( ) const
protectedvirtual

Returns the current simulation time from the first back-end in the remote control list.

virtual DtFilename makVrf::DtVrfBatchScenarioManager::constructLoggerFilename ( const DtScenario scenario)
protectedvirtual
virtual void makVrf::DtVrfBatchScenarioManager::allBackendsClosed ( )
protectedvirtual

Schedules next run.

virtual void makVrf::DtVrfBatchScenarioManager::loadScenarioError ( const std::string &  error,
bool  showMessage = true 
)
protectedvirtual

Called when there is an error loading the scenario.

virtual void makVrf::DtVrfBatchScenarioManager::slot_scenarioLoadComplete ( )
protectedvirtual

Called after scenario is loaded.

virtual QString makVrf::DtVrfBatchScenarioManager::batchRunTitle ( const DtScenario ) const
protectedvirtual
virtual void makVrf::DtVrfBatchScenarioManager::setMainWindowTitle ( const QString &  )
protectedvirtual
virtual QString makVrf::DtVrfBatchScenarioManager::mainWindowTitle ( ) const
protectedvirtual

Member Data Documentation

boost::signal<void ()> makVrf::DtVrfBatchScenarioManager::signal_stateRunStart
boost::signal<void ()> makVrf::DtVrfBatchScenarioManager::signal_nextRunAboutToStart

Sent after the last scenario has closed and next one is about to start.

boost::signal<void ()> makVrf::DtVrfBatchScenarioManager::signal_batchRunComplete

Sent when all batch files have been run.

boost::signal<void ()> makVrf::DtVrfBatchScenarioManager::signal_errorLoadingScenario
boost::signal<void ()> makVrf::DtVrfBatchScenarioManager::signal_scenarioRunComplete

Signalled when a scenario run is complete.

DtScenarioBatchIterator* makVrf::DtVrfBatchScenarioManager::myBatchIterator
protected
makVrv::DtDe& makVrf::DtVrfBatchScenarioManager::myDe
protected
QString makVrf::DtVrfBatchScenarioManager::myBatchFile
protected
bool makVrf::DtVrfBatchScenarioManager::myRunning
protected
DtVrfScenarioRemapFunction* makVrf::DtVrfBatchScenarioManager::myRemap
protected
double makVrf::DtVrfBatchScenarioManager::myRunStartTime
protected
State makVrf::DtVrfBatchScenarioManager::myState
protected
QString makVrf::DtVrfBatchScenarioManager::myOriginalTitle
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)