.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Slots | Public Member Functions | Protected Attributes | List of all members
SchedulerGUI::SimulationController Class Reference

Handles the running of the simulation with all the necessary requirements and conditions. More...

#include <SimulationController.h>

Inheritance diagram for SchedulerGUI::SimulationController:

Public Slots

bool Start (const InfoStruct &parameters, const QString &outputDir)
 Attempts to start a new instance of the simulation. More...
 
bool Start (const InfoStruct &parameters)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
bool Pause ()
 Attempts to halt the simulation temporarily. More...
 
bool Resume ()
 Attempts to resume a paused simulation. More...
 
bool Stop ()
 Attempts to stop the simulation completely. More...
 

Public Member Functions

 SimulationController (QObject *parent=0)
 Constructor.
 
 ~SimulationController ()
 Destructor. More...
 
void SetOutpuDir (const QString &dirPath)
 Sets the directory the simulation will output to.
 
QString GetDirectory () const
 Returns the directory the simulation is outputting to.
 
SimulationWorkerGetSimWorker ()
 Returns the address to the simulation worker.
 

Protected Attributes

QThread * SimThread_
 Thread used for running the simulation.
 
SimulationWorkerSimWorker_
 Worker in charged of running the simulation. NOTE: QObjects cannot be copied or passed. However, by design, pointers of QObjects are legal.
 
QString OutputDir_
 The directory where the simulation output will be written to.
 

Detailed Description

Handles the running of the simulation with all the necessary requirements and conditions.

Constructor & Destructor Documentation

SimulationController::~SimulationController ( )

Destructor.

Terminate any running loops and kill the thread.

Member Function Documentation

bool SimulationController::Pause ( )
slot

Attempts to halt the simulation temporarily.

Returns
bool SimulationController::Resume ( )
slot

Attempts to resume a paused simulation.

Returns
bool SimulationController::Start ( const InfoStruct parameters,
const QString &  outputDir 
)
slot

Attempts to start a new instance of the simulation.

Parameters
parametersis the parameters needed to create an instance of the simulation.
outputDiris the directory where the simulation output will bee stored into.
Returns
bool SimulationController::Start ( const InfoStruct parameters)
slot

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
parametersis the parameters needed to create an instance of the simulation.
bool SimulationController::Stop ( )
slot

Attempts to stop the simulation completely.

Returns

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