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 {
23 public:
24  DataContext(Config& config, rad::DbAdapter& db_adapter);
25  virtual ~DataContext();
26 
27  void ReloadConfig();
28  void DbUpdate();
29 
30  DbInterface& GetDbInterface();
31 
32  DataContext(const DataContext&) = delete;
33  DataContext& operator= (const DataContext&) = delete;
34 
35 private:
36  Config& m_config; // can be created only after reading the cmd line
37  rad::DbAdapter& m_runtime_db;
38  DbInterface m_db_interface;
39 };
40 
41 } // namespace {{cookiecutter.module_name}}
42 
43 #endif // {{cookiecutter.module_name|upper}}_DATA_CONTEXT_HPP_
Config class header file.
#define cookiecutter
DbInterface class header file.
Definition: dbAdapter.hpp:29