Stride Reference Manual  - generated for commit 9643b11
SimController.h
Go to the documentation of this file.
1 /*
2  * This is free software: you can redistribute it and/or modify it
3  * under the terms of the GNU General Public License as published by
4  * the Free Software Foundation, either version 3 of the License, or
5  * any later version.
6  * The software is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  * GNU General Public License for more details.
10  * You should have received a copy of the GNU General Public License
11  * along with the software. If not, see <http://www.gnu.org/licenses/>.
12  *
13  * Copyright 2017, 2018, Kuylen E, Willem L, Broeckhove J
14  */
15 
21 #pragma once
22 
23 #include "ControlHelper.h"
24 
25 #include <boost/property_tree/ptree_fwd.hpp>
26 #include <memory>
27 
28 namespace stride {
29 
30 class Sim;
31 
47 class SimController : protected ControlHelper
48 {
49 public:
51  explicit SimController(const boost::property_tree::ptree& config, const std::string& name = "SimController");
52 
54  void Control();
55 
57  std::shared_ptr<Sim> GetSim() const { return m_simulator; };
58 
59 private:
60  std::shared_ptr<Sim> m_simulator;
61 };
62 
63 } // namespace stride
void Control()
Control the execution of the simulation.
std::shared_ptr< Sim > GetSim() const
Reference the simulator (method used mostly in tests).
Definition: SimController.h:57
std::shared_ptr< Sim > m_simulator
Definition: SimController.h:57
Controls a simulation run initiated with the command line interface (cli).
Definition: ControlHelper.h:45
Namespace for the simulator and related classes.
Definition: Calendar.cpp:28
Controls a simulation run initiated with the command line interface (cli).
Definition: SimController.h:47
SimController(const boost::property_tree::ptree &config, const std::string &name="SimController")
Straight initialization.
Header for the command line controller.