ifw-ccf  3.0.0-pre2
dataContext.hpp
Go to the documentation of this file.
1 
5 #ifndef CCFCONTROL_DATACONTEXT_HPP_
6 #define CCFCONTROL_DATACONTEXT_HPP_
7 
8 #include <core/utils/param/parameterSet.hpp>
9 
10 #include <ccf/common/setup.hpp>
11 #include <ccf/common/db.hpp>
12 #include <ccf/control/config.hpp>
13 
14 
15 namespace ccf::control {
16 
18 class DataContext {
19  public:
20 
29  DataContext(Config& config);
30 
32  virtual ~DataContext();
33 
35  void ReloadConfig();
36 
38  void UpdateDb();
39 
40  DataContext(const DataContext&) = delete;
41  DataContext& operator=(const DataContext&) = delete;
42 
43  private:
44  Config& m_config;
45 };
46 
47 } // namespace ccf::control
48 
49 #endif // CCFCONTROL_DATACONTEXT_HPP_
Provides access to the command line options and the configuration parameters stored in the configurat...
Definition: config.hpp:32
Provides access to the application run-time data.
Definition: dataContext.hpp:18
virtual ~DataContext()
Destructor.
Definition: dataContext.cpp:18
DataContext & operator=(const DataContext &)=delete
Disable copy constructor.
DataContext(Config &config)
Definition: dataContext.cpp:13
void ReloadConfig()
Reload the configuration from file and reconnect to the in-memory DB.
Definition: dataContext.cpp:22
void UpdateDb()
Connect to the DB and update the application configuration.
Definition: dataContext.cpp:28
DataContext(const DataContext &)=delete
Definition: acqThread.cpp:10