rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
server::DataContext Class Reference

#include <dataContext.hpp>

Public Member Functions

 DataContext (Config &config, rad::DbAdapter &db_adapter)
 
virtual ~DataContext ()
 
void ReloadConfig ()
 
void DbUpdate ()
 
DbInterfaceGetDbInterface ()
 
void GetTargetPos (double &x, double &y)
 
void SetTargetPos (const double x, const double y)
 
 DataContext (const DataContext &)=delete
 
DataContextoperator= (const DataContext &)=delete
 Disable copy constructor. More...
 
 DataContext (Config &config, rad::DbAdapter &db_adapter)
 
virtual ~DataContext ()
 
void ReloadConfig ()
 
void DbUpdate ()
 
DbInterfaceGetDbInterface ()
 
void GetTargetPos (double &x, double &y)
 
void SetTargetPos (const double x, const double y)
 
 DataContext (const DataContext &)=delete
 
DataContextoperator= (const DataContext &)=delete
 Disable copy constructor. More...
 

Detailed Description

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

Constructor & Destructor Documentation

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.

Parameters
[in]configReference to the application configuration.
[in]db_adapterSM adapter used to trigger events.
server::DataContext::~DataContext ( )
virtual

Destructor

server::DataContext::DataContext ( const DataContext )
delete
server::DataContext::DataContext ( Config config,
rad::DbAdapter db_adapter 
)
virtual server::DataContext::~DataContext ( )
virtual
server::DataContext::DataContext ( const DataContext )
delete

Member Function Documentation

void server::DataContext::DbUpdate ( )

Try to connect to the DB and update the application configuration.

void server::DataContext::DbUpdate ( )
DbInterface& server::DataContext::GetDbInterface ( )
DbInterface & server::DataContext::GetDbInterface ( )
Returns
A reference to the DB interface object.
void server::DataContext::GetTargetPos ( double &  x,
double &  y 
)

Get target device position.

void server::DataContext::GetTargetPos ( double &  x,
double &  y 
)
DataContext& server::DataContext::operator= ( const DataContext )
delete

Disable copy constructor.

DataContext& server::DataContext::operator= ( const DataContext )
delete

Disable copy constructor.

void server::DataContext::ReloadConfig ( )
void server::DataContext::ReloadConfig ( )

Reload the configuration from file and reconnect to the in-memory DB.

void server::DataContext::SetTargetPos ( const double  x,
const double  y 
)

Set target device position.

void server::DataContext::SetTargetPos ( const double  x,
const double  y 
)

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