rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dataContext.hpp
Go to the documentation of this file.
1 
9 #ifndef {{cookiecutter.module_name|upper}}_DATA_CONTEXT_HPP_
10 #define {{cookiecutter.module_name|upper}}_DATA_CONTEXT_HPP_
11 
12 #include "config.hpp"
13 #include "dbInterface.hpp"
14 
15 namespace {{cookiecutter.module_name}} {
16 
21 class DataContext {
22  public:
32  DataContext(Config& config, rad::DbAdapter& db_adapter);
33 
37  virtual ~DataContext();
38 
42  void ReloadConfig();
43 
47  void UpdateDb();
48 
52  DbInterface& GetDbInterface();
53 
54  DataContext(const DataContext&) = delete;
55  DataContext& operator=(const DataContext&) = delete;
56 
57  private:
58  Config& m_config;
59  rad::DbAdapter& m_runtime_db;
60  DbInterface m_db_interface;
61 };
62 
63 } // namespace {{cookiecutter.module_name}}
64 
65 #endif // {{cookiecutter.module_name|upper}}_DATA_CONTEXT_HPP_
Definition: dbAdapter.hpp:29
DbInterface class header file.
Config class header file.
#define cookiecutter