rad  3.0.0
Public Member Functions | List of all members
hello::DbInterface Class Reference

#include <dbInterface.hpp>

Public Member Functions

 DbInterface (const std::string &prefix, rad::DbAdapter &runtime_db)
 
virtual ~DbInterface ()
 
std::string GetControlState ()
 
std::string GetControlSubstate ()
 
std::string GetControlStatus ()
 
std::string Get (const std::string &key)
 
void SetControlState (const std::string &value)
 
void SetControlSubstate (const std::string &value)
 
void SetControlStatus (const std::string &value)
 
void SetControl (const std::string &state, const std::string &substate, const std::string &status)
 
void SetConfig (Config &cfg)
 
void Set (const std::string &key, const std::string &value)
 
 DbInterface (const DbInterface &)=delete
 
DbInterfaceoperator= (const DbInterface &)=delete
 Disable copy constructor. More...
 
 DbInterface (const std::string &prefix, rad::DbAdapter &runtime_db)
 
virtual ~DbInterface ()
 
std::string GetControlState ()
 
std::string GetControlSubstate ()
 
std::string GetControlStatus ()
 
std::string Get (const std::string &key)
 
void SetControlState (const std::string &value)
 
void SetControlSubstate (const std::string &value)
 
void SetControlStatus (const std::string &value)
 
void SetControl (const std::string &state, const std::string &substate, const std::string &status)
 
void SetConfig (Config &cfg)
 
void Set (const std::string &key, const std::string &value)
 
 DbInterface (const DbInterface &)=delete
 
DbInterfaceoperator= (const DbInterface &)=delete
 Disable copy constructor. More...
 

Detailed Description

Interface class to the data stored in the in-memory DB.

Constructor & Destructor Documentation

◆ DbInterface() [1/4]

hello::DbInterface::DbInterface ( const std::string &  prefix,
rad::DbAdapter runtime_db 
)

Constructor.

Parameters
[in]prefixString used as prefix when building the keys.
[in]runtime_dbReference to the in-memory DB adapter.

◆ ~DbInterface() [1/2]

hello::DbInterface::~DbInterface ( )
virtual

Destructor

◆ DbInterface() [2/4]

hello::DbInterface::DbInterface ( const DbInterface )
delete

◆ DbInterface() [3/4]

hello::DbInterface::DbInterface ( const std::string &  prefix,
rad::DbAdapter runtime_db 
)

◆ ~DbInterface() [2/2]

virtual hello::DbInterface::~DbInterface ( )
virtual

◆ DbInterface() [4/4]

hello::DbInterface::DbInterface ( const DbInterface )
delete

Member Function Documentation

◆ Get() [1/2]

std::string hello::DbInterface::Get ( const std::string &  key)
Parameters
[in]keyKey in the DB.
Returns
The value stored in the DB associated to the given key.

◆ Get() [2/2]

std::string hello::DbInterface::Get ( const std::string &  key)

◆ GetControlState() [1/2]

std::string hello::DbInterface::GetControlState ( )
Returns
The current state of the application stored in the DB.

◆ GetControlState() [2/2]

std::string hello::DbInterface::GetControlState ( )

◆ GetControlStatus() [1/2]

std::string hello::DbInterface::GetControlStatus ( )
Returns
The current state and sub-state of the application stored in the DB.

◆ GetControlStatus() [2/2]

std::string hello::DbInterface::GetControlStatus ( )

◆ GetControlSubstate() [1/2]

std::string hello::DbInterface::GetControlSubstate ( )
Returns
The current sub-state of the application stored in the DB.

◆ GetControlSubstate() [2/2]

std::string hello::DbInterface::GetControlSubstate ( )

◆ operator=() [1/2]

DbInterface& hello::DbInterface::operator= ( const DbInterface )
delete

Disable copy constructor.

◆ operator=() [2/2]

DbInterface& hello::DbInterface::operator= ( const DbInterface )
delete

Disable copy constructor.

◆ Set() [1/2]

void hello::DbInterface::Set ( const std::string &  key,
const std::string &  value 
)
Parameters
[in]keyKey to be written in the DB.
[in]valueValue, associated to the given key, to be written in the DB.

◆ Set() [2/2]

void hello::DbInterface::Set ( const std::string &  key,
const std::string &  value 
)

◆ SetConfig() [1/2]

void hello::DbInterface::SetConfig ( Config cfg)

Set the application configuration information in the DB.

Parameters
[in]req_endpointRequest msg endpoint.
[in]dbIpAddrDB IP address.
[in]dbPortDB port.
[in]db_timeoutDB timeout.

◆ SetConfig() [2/2]

void hello::DbInterface::SetConfig ( Config cfg)

◆ SetControl() [1/2]

void hello::DbInterface::SetControl ( const std::string &  state,
const std::string &  substate,
const std::string &  status 
)

Set the application control information in the DB.

Parameters
[in]stateState to be stored in the DB.
[in]substateSubstate to be stored in the DB.
[in]statusStatus to be stored in the DB.

◆ SetControl() [2/2]

void hello::DbInterface::SetControl ( const std::string &  state,
const std::string &  substate,
const std::string &  status 
)

◆ SetControlState() [1/2]

void hello::DbInterface::SetControlState ( const std::string &  value)
Parameters
[in]valueState to be stored in the DB.

◆ SetControlState() [2/2]

void hello::DbInterface::SetControlState ( const std::string &  value)

◆ SetControlStatus() [1/2]

void hello::DbInterface::SetControlStatus ( const std::string &  value)
Parameters
[in]valueStatus (state and substate) to be stored in the DB.

◆ SetControlStatus() [2/2]

void hello::DbInterface::SetControlStatus ( const std::string &  value)

◆ SetControlSubstate() [1/2]

void hello::DbInterface::SetControlSubstate ( const std::string &  value)
Parameters
[in]valueSub-state to be stored in the DB.

◆ SetControlSubstate() [2/2]

void hello::DbInterface::SetControlSubstate ( const std::string &  value)

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