ifw
0.0.1-dev
|
#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 () |
std::shared_ptr< rad::TopicPub > | GetPublisher () |
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... | |
DataContext (IConfig &config, rad::DbAdapter &db_adapter, boost::asio::io_service &ios) | |
virtual | ~DataContext () |
void | ReloadConfig () |
void | UpdateDb () |
DbInterface & | GetDbInterface () |
IConfig & | GetConfig () |
std::shared_ptr< rad::TopicPub > | GetPublisher () |
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... | |
DataContext (IConfig &config, rad::DbAdapter &db_adapter, boost::asio::io_service &ios) | |
virtual | ~DataContext () |
void | ReloadConfig () |
void | UpdateDb () |
DbInterface & | GetDbInterface () |
IConfig & | GetConfig () |
std::shared_ptr< rad::TopicPub > | GetPublisher () |
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.
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. |
|
virtual |
Destructor
|
delete |
Disable copy constructor.
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. |
|
virtual |
Destructor
|
delete |
Disable copy constructor.
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. |
|
virtual |
Destructor
|
delete |
Disable copy constructor.
DbInterface & devmgr::common::DataContext::GetDbInterface | ( | ) |
DbInterface& devmgr::common::DataContext::GetDbInterface | ( | ) |
DbInterface& devmgr::common::DataContext::GetDbInterface | ( | ) |
std::shared_ptr<rad::TopicPub> devmgr::common::DataContext::GetPublisher | ( | ) |
std::shared_ptr< rad::TopicPub > devmgr::common::DataContext::GetPublisher | ( | ) |
std::shared_ptr<rad::TopicPub> devmgr::common::DataContext::GetPublisher | ( | ) |
short devmgr::common::DataContext::GetState | ( | ) |
short devmgr::common::DataContext::GetState | ( | ) |
short devmgr::common::DataContext::GetState | ( | ) |
short devmgr::common::DataContext::GetSubstate | ( | ) |
short devmgr::common::DataContext::GetSubstate | ( | ) |
short devmgr::common::DataContext::GetSubstate | ( | ) |
|
delete |
Disable assignment operator.
|
delete |
Disable assignment operator.
|
delete |
Disable assignment operator.
void devmgr::common::DataContext::ReloadConfig | ( | ) |
Reload the configuration from file and reconnect to the in-memory DB.
void devmgr::common::DataContext::ReloadConfig | ( | ) |
Reload the configuration from file and reconnect to the in-memory DB.
void devmgr::common::DataContext::ReloadConfig | ( | ) |
Reload the configuration from file and reconnect to the in-memory DB.
void devmgr::common::DataContext::SetState | ( | const short | state | ) |
void devmgr::common::DataContext::SetState | ( | const short | state | ) |
void devmgr::common::DataContext::SetState | ( | const short | state | ) |
void devmgr::common::DataContext::SetState | ( | const std::string | state | ) |
void devmgr::common::DataContext::SetState | ( | const std::string | state | ) |
void devmgr::common::DataContext::SetState | ( | const std::string | state | ) |
void devmgr::common::DataContext::SetSubstate | ( | const short | state | ) |
void devmgr::common::DataContext::SetSubstate | ( | const short | state | ) |
void devmgr::common::DataContext::SetSubstate | ( | const short | state | ) |
void devmgr::common::DataContext::SetSubstate | ( | const std::string | state | ) |
void devmgr::common::DataContext::SetSubstate | ( | const std::string | state | ) |
void devmgr::common::DataContext::SetSubstate | ( | const std::string | state | ) |
void devmgr::common::DataContext::UpdateDb | ( | ) |
Try to connect to the DB and update the application configuration.
void devmgr::common::DataContext::UpdateDb | ( | ) |
Try to connect to the DB and update the application configuration.
void devmgr::common::DataContext::UpdateDb | ( | ) |
Try to connect to the DB and update the application configuration.