1 #ifndef SIMPT_SESSION_SIM_SESSION_H_INCLUDED
2 #define SIMPT_SESSION_SIM_SESSION_H_INCLUDED
25 #include <boost/property_tree/ptree.hpp>
42 using boost::property_tree::ptree;
57 SimSession(
const std::shared_ptr<MergedPreferences>& prefs,
const ptree& sim);
66 virtual std::shared_ptr<RootViewerType>
70 virtual std::shared_ptr<SimPT_Sim::Sim> GetSim();
73 virtual ExportersType GetExporters();
76 virtual const ptree& GetParameters()
const;
79 virtual std::string GetStatusMessage()
const;
82 virtual Timings GetTimings()
const;
85 virtual void ForceExport();
88 virtual void SetParameters(
const ptree&);
91 virtual void StartSimulation(
int steps = -1);
94 virtual void StopSimulation();
98 virtual void TimeStep();
101 virtual void ExecuteViewUnit(QString);
104 void ExecuteWorkUnit();
107 std::shared_ptr<SimPT_Sim::Sim> m_sim;
108 std::mutex m_parameters_mutex;
109 std::mutex m_viewers_mutex;
111 std::shared_ptr<MergedPreferences> m_preferences;
113 QThread* m_sim_thread;
121 } m_parameter_buffer;
127 #endif // end_of_include_guard
Collection of instances associated with an opened/running project.
ptree pt
Ptree containing parameters.
Namespace for SimPT shell package.
Interface for handling an opened/running simulation.
Wrapper around workspace to have read and write access to merged (workspace + project) preferences...
bool updated
Whether parameters were updated and need saving to disk.
Namespace for the core simulator.
Namespace for session classes.
Namespace for generic workspace classes.
Contains the state of the whole Simulator at a given simulation step.
see the online Qt documentation
Namespace for generic graphical shell for simulators.
see the online C++11 documentation