ifw-ccf  1.0.0
dataContext.hpp
Go to the documentation of this file.
1 
5 #ifndef CCFCONTROL_DATACONTEXT_HPP_
6 #define CCFCONTROL_DATACONTEXT_HPP_
7 
8 #include <ctd/param/ParameterSet.hpp>
9 
10 #include <ccf/common/setupBase.hpp>
11 #include <ccf/common/db.hpp>
12 #include <ccf/control/config.hpp>
13 
14 namespace ccf::control {
15 
17 const std::string SETUP_KEY_SIM_FILE = "sim.file";
18 
20 class DataContext {
21  public:
22 
31  DataContext(Config& config);
32 
34  virtual ~DataContext();
35 
37  void ReloadConfig();
38 
40  void UpdateDb();
41 
42  DataContext(const DataContext&) = delete;
43  DataContext& operator=(const DataContext&) = delete;
44 
45  private:
46  Config& m_config;
47 };
48 
49 } // namespace ccf::control
50 
51 #endif // CCFCONTROL_DATACONTEXT_HPP_
ccf::control::DataContext::~DataContext
virtual ~DataContext()
Destructor.
Definition: dataContext.cpp:18
ccf::control::DataContext::UpdateDb
void UpdateDb()
Connect to the DB and update the application configuration.
Definition: dataContext.cpp:28
ccf::control::DataContext::DataContext
DataContext(const DataContext &)=delete
config.hpp
ccf::control::Config
Provides access to the command line options and the configuration parameters stored in the configurat...
Definition: config.hpp:44
db.hpp
ccf::control::SETUP_KEY_SIM_FILE
const std::string SETUP_KEY_SIM_FILE
Setup par referring to the simulation file to be as basis for the simulation.
Definition: dataContext.hpp:17
ccf::control::DataContext::DataContext
DataContext(Config &config)
Definition: dataContext.cpp:13
setupBase.hpp
ccf::control::DataContext::ReloadConfig
void ReloadConfig()
Reload the configuration from file and reconnect to the in-memory DB.
Definition: dataContext.cpp:22
ccf::control::DataContext::operator=
DataContext & operator=(const DataContext &)=delete
Disable copy constructor.
ccf::control::DataContext
Provides access to the application run-time data.
Definition: dataContext.hpp:20
ccf::control
Definition: acqThread.cpp:10