| ifw-fcf
    2.0.0
    | 
#include <dataContext.hpp>
| Public Member Functions | |
| DataContext (IConfig &config, rad::DbAdapter &db_adapter, boost::asio::io_service &ios) | |
| virtual | ~DataContext () | 
| void | ReloadConfig () | 
| void | UpdateDb () | 
| DbInterface & | GetDbInterface () | 
| IConfig & | GetConfig () | 
| short | GetState () | 
| void | SetState (const short state) | 
| void | SetState (const std::string state) | 
| short | GetSubstate () | 
| void | SetSubstate (const short state) | 
| void | SetSubstate (const std::string state) | 
| DataContext (const DataContext &)=delete | |
| Disable copy constructor.  More... | |
| DataContext & | operator= (const DataContext &)=delete | 
| Disable assignment operator.  More... | |
This class provide access to the application run-time data including the in-memory DB.
| fcf::devmgr::common::DataContext::DataContext | ( | IConfig & | config, | 
| rad::DbAdapter & | db_adapter, | ||
| boost::asio::io_service & | ios | ||
| ) | 
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. | 
| [in] | db_adapter | DB adapter object | 
| [in] | ios | ASIO IO service reference | 
| 
 | virtual | 
Destructor
| 
 | delete | 
Disable copy constructor.
| DbInterface & fcf::devmgr::common::DataContext::GetDbInterface | ( | ) | 
| short fcf::devmgr::common::DataContext::GetState | ( | ) | 
| short fcf::devmgr::common::DataContext::GetSubstate | ( | ) | 
| 
 | delete | 
Disable assignment operator.
| void fcf::devmgr::common::DataContext::ReloadConfig | ( | ) | 
Reload the configuration from file and reconnect to the in-memory DB.
| void fcf::devmgr::common::DataContext::SetState | ( | const short | state | ) | 
| void fcf::devmgr::common::DataContext::SetState | ( | const std::string | state | ) | 
| void fcf::devmgr::common::DataContext::SetSubstate | ( | const short | state | ) | 
| void fcf::devmgr::common::DataContext::SetSubstate | ( | const std::string | state | ) | 
| void fcf::devmgr::common::DataContext::UpdateDb | ( | ) | 
Try to connect to the DB and update the application configuration.
 1.8.5
 1.8.5