.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
SimulationController.h
1 // SimulationController.h - SimulationController class implementation.
2 // Written by Jesse Z. Zhong
3 #ifndef __Simulation_Controller_H__
4 #define __Simulation_Controller_H__
5 #pragma region Includes
6 #include <QThread>
7 #include <InfoStruct/InfoStruct.h>
8 #include "SimulationWorker.h"
9 using namespace std;
10 using namespace MDSimulation;
11 #pragma endregion
12 namespace SchedulerGUI {
17  class SimulationController : public QObject {
18  Q_OBJECT
19  public:
23  SimulationController(QObject* parent = 0);
24 
31 
32  public slots:
40  bool Start(const InfoStruct& parameters, const QString& outputDir);
41 
47  bool Start(const InfoStruct& parameters);
48 
54  bool Pause();
55 
61  bool Resume();
62 
68  bool Stop();
69 
70  #pragma region Accessors
71  public:
75  void SetOutpuDir(const QString& dirPath);
76 
80  QString GetDirectory() const;
81 
85  SimulationWorker* GetSimWorker();
86  #pragma endregion
87  protected:
88  #pragma region Simulation Members
89  QThread* SimThread_;
91 
96 
99  QString OutputDir_;
100  #pragma endregion
101  };
102 }
103 
104 #endif // !__Simulation_Controller_H__
SimulationWorker * SimWorker_
Worker in charged of running the simulation. NOTE: QObjects cannot be copied or passed. However, by design, pointers of QObjects are legal.
Definition: SimulationController.h:95
Worker object for running an instance of the simulation.
Definition: SimulationWorker.h:28
Handles the running of the simulation with all the necessary requirements and conditions.
Definition: SimulationController.h:17
QString OutputDir_
The directory where the simulation output will be written to.
Definition: SimulationController.h:99
Defines the structure used to hold the configurable constants of the simulation.
Definition: InfoStruct.h:36