Stride Reference Manual  - generated for commit 9643b11
SimBuilder.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 "util/RnMan.h"
24 
25 #include <boost/property_tree/ptree.hpp>
26 #include <memory>
27 
28 namespace stride {
29 
30 class Sim;
31 class Population;
32 
42 {
43 public:
45  explicit SimBuilder(const boost::property_tree::ptree& config);
46 
48  std::shared_ptr<Sim> Build(std::shared_ptr<Sim> sim, std::shared_ptr<Population> pop, util::RnMan rnMan);
49 
50 private:
52  boost::property_tree::ptree ReadAgeContactPtree();
53 
55  boost::property_tree::ptree ReadDiseasePtree();
56 
57 private:
58  boost::property_tree::ptree m_config;
59 };
60 
61 } // namespace stride
boost::property_tree::ptree ReadAgeContactPtree()
Get the contact configuration data.
Definition: SimBuilder.cpp:107
SimBuilder(const boost::property_tree::ptree &config)
Initializing SimBuilder.
Definition: SimBuilder.cpp:39
Builds a simulator based a configuration property tree.
Definition: SimBuilder.h:41
std::shared_ptr< Sim > Build(std::shared_ptr< Sim > sim, std::shared_ptr< Population > pop, util::RnMan rnMan)
Build the simulator and return it afterwards.
Definition: SimBuilder.cpp:41
Interface of RnMan.
boost::property_tree::ptree m_config
Run config in ptree.
Definition: SimBuilder.h:58
boost::property_tree::ptree ReadDiseasePtree()
Get the disease configuration data.
Definition: SimBuilder.cpp:114
Namespace for the simulator and related classes.
Definition: Calendar.cpp:28