rad 8.2.0
Loading...
Searching...
No Matches
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
15namespace {{cookiecutter.module_name}} {
16
21class DataContext
22{
23public:
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
35private:
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_
#define cookiecutter
Config class header file.
DbInterface class header file.