VPTissue Reference Manual
Simulator.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_SIMULATOR_H_INCLUDED
2 #define SIMPT_PAREX_SIMULATOR_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "parex_protocol/SimTask.h"
24 
25 #include <QObject>
26 #include <memory>
27 
28 namespace SimPT_Shell {
29  class CliController;
30 }
31 
32 namespace SimPT_Parex {
33 
37 class Simulator: public QObject
38 {
39  Q_OBJECT
40 public:
42  Simulator();
43 
45  virtual ~Simulator();
46 
47 public slots:
49  virtual void SolveTask(const SimTask & task);
50 
52  void StopTask();
53 
56  void Delete(const std::string& name);
57 
58 signals:
60  void TaskSolved(const SimResult &);
61 
62 private:
63  std::shared_ptr<SimPT_Shell::CliController> m_controller;
64  bool m_stopped;
65 };
66 
67 } // namespace
68 
69 #endif // end-of-include-guard
A container class for the final result of a simulation.
Definition: SimResult.h:29
Namespace for SimPT shell package.
Definition: Client.cpp:50
void StopTask()
Stop the current task.
Definition: Simulator.cpp:189
void TaskSolved(const SimResult &)
Emitted when task is solved. If it was unsuccssful or interrupted a flag is set in SimResult...
virtual ~Simulator()
Destructor.
Definition: Simulator.cpp:113
void Delete(const std::string &name)
Delete a folder on the disk.
Definition: Simulator.cpp:117
virtual void SolveTask(const SimTask &task)
Do the real task of solving a SimTask and saving the results as requested by that task...
Definition: Simulator.cpp:128
Simulator()
Constructor.
Definition: Simulator.cpp:108
Interface for SimResult.
Simulator handling requested simulation tasks.
Definition: Simulator.h:37
Interface for SimTask.
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
Contains all information needed for a transmitable simulation task.
Definition: SimTask.h:31
see the online Qt documentation