ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
This class provide access to the application run-time data including the in-memory DB. More...
#include <dataContext.hpp>
Public Member Functions | |
DataContext (Config &config, rad::DbAdapter &db_adapter) | |
This constructor uses the application configuration to initialize the adapter object to the in-memory DB. More... | |
virtual | ~DataContext () |
Destructor. More... | |
void | ReloadConfig () |
Reload the configuration from file and reconnect to the in-memory DB. More... | |
void | UpdateDb () |
Try to connect to the DB and update the application configuration. More... | |
DbInterface & | GetDbInterface () |
DataContext (const DataContext &)=delete | |
DataContext & | operator= (const DataContext &)=delete |
Disable copy constructor. More... | |
This class provide access to the application run-time data including the in-memory DB.
Definition at line 21 of file dataContext.hpp.
server::DataContext::DataContext | ( | Config & | config, |
rad::DbAdapter & | db_adapter | ||
) |
This constructor uses the application configuration to initialize the adapter object to the in-memory DB.
The DB adapter is then used to initialize the DB interface object that can be used to access the DB key-value pairs.
[in] | config | Reference to the application configuration. |
Definition at line 19 of file dataContext.cpp.
|
virtual |
Destructor.
Definition at line 27 of file dataContext.cpp.
|
delete |
DbInterface & server::DataContext::GetDbInterface | ( | ) |
Definition at line 55 of file dataContext.cpp.
|
delete |
Disable copy constructor.
void server::DataContext::ReloadConfig | ( | ) |
Reload the configuration from file and reconnect to the in-memory DB.
Definition at line 31 of file dataContext.cpp.
void server::DataContext::UpdateDb | ( | ) |
Try to connect to the DB and update the application configuration.
Definition at line 38 of file dataContext.cpp.