ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
devmgr::common::DataContext Class Reference

#include <dataContext.hpp>

Public Member Functions

 DataContext (IConfig &config, rad::DbAdapter &db_adapter, boost::asio::io_service &ios)
 
virtual ~DataContext ()
 
void ReloadConfig ()
 
void UpdateDb ()
 
DbInterfaceGetDbInterface ()
 
IConfigGetConfig ()
 
std::shared_ptr< rad::TopicPubGetPublisher ()
 
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...
 
DataContextoperator= (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 ()
 
DbInterfaceGetDbInterface ()
 
IConfigGetConfig ()
 
std::shared_ptr< rad::TopicPubGetPublisher ()
 
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...
 
DataContextoperator= (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 ()
 
DbInterfaceGetDbInterface ()
 
IConfigGetConfig ()
 
std::shared_ptr< rad::TopicPubGetPublisher ()
 
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...
 
DataContextoperator= (const DataContext &)=delete
 Disable assignment operator. More...
 

Detailed Description

This class provide access to the application run-time data including the in-memory DB.

Constructor & Destructor Documentation

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.

Parameters
[in]configReference to the application configuration.
devmgr::common::DataContext::~DataContext ( )
virtual

Destructor

devmgr::common::DataContext::DataContext ( const DataContext )
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.

Parameters
[in]configReference to the application configuration.
virtual devmgr::common::DataContext::~DataContext ( )
virtual

Destructor

devmgr::common::DataContext::DataContext ( const DataContext )
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.

Parameters
[in]configReference to the application configuration.
virtual devmgr::common::DataContext::~DataContext ( )
virtual

Destructor

devmgr::common::DataContext::DataContext ( const DataContext )
delete

Disable copy constructor.

Member Function Documentation

IConfig & devmgr::common::DataContext::GetConfig ( )
Returns
A reference to the Config object.
IConfig& devmgr::common::DataContext::GetConfig ( )
Returns
A reference to the Config object.
IConfig& devmgr::common::DataContext::GetConfig ( )
Returns
A reference to the Config object.
DbInterface & devmgr::common::DataContext::GetDbInterface ( )
Returns
A reference to the DB interface object.
DbInterface& devmgr::common::DataContext::GetDbInterface ( )
Returns
A reference to the DB interface object.
DbInterface& devmgr::common::DataContext::GetDbInterface ( )
Returns
A reference to the DB interface object.
std::shared_ptr<rad::TopicPub> devmgr::common::DataContext::GetPublisher ( )
Returns
a reference of the publisher object.
std::shared_ptr< rad::TopicPub > devmgr::common::DataContext::GetPublisher ( )
Returns
a reference of the publisher object.
std::shared_ptr<rad::TopicPub> devmgr::common::DataContext::GetPublisher ( )
Returns
a reference of the publisher object.
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 ( )
DataContext& devmgr::common::DataContext::operator= ( const DataContext )
delete

Disable assignment operator.

DataContext& devmgr::common::DataContext::operator= ( const DataContext )
delete

Disable assignment operator.

DataContext& devmgr::common::DataContext::operator= ( const DataContext )
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.


The documentation for this class was generated from the following files: