OGS 6.2.1-76-gbb689931b
TimeInterval.cpp
Go to the documentation of this file.
1 
14 #include "TimeInterval.h"
15 
16 #include "BaseLib/ConfigTree.h"
17 
18 namespace BaseLib
19 {
20 std::unique_ptr<TimeInterval> createTimeInterval(
21  BaseLib::ConfigTree const& config)
22 {
24  auto const& time_interval_config = config.getConfigSubtree("time_interval");
25 
26  const auto start_time =
28  time_interval_config.getConfigParameter<double>("start");
29 
30  const auto end_time =
32  time_interval_config.getConfigParameter<double>("end");
33 
34  return std::make_unique<BaseLib::TimeInterval>(start_time, end_time);
35 }
36 } // namespace BaseLib
T getConfigParameter(std::string const &param) const
std::unique_ptr< TimeInterval > createTimeInterval(BaseLib::ConfigTree const &config)
Build information.
ConfigTree getConfigSubtree(std::string const &root) const
Definition: ConfigTree.cpp:150