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

#include <dataContext.hpp>

Public Member Functions

 DataContext (Config &config, rad::DbAdapter &db_adapter)
 
virtual ~DataContext ()
 
void ReloadConfig ()
 
void DbUpdate ()
 
DbInterfaceGetDbInterface ()
 
 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 ()
 
 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

◆ DataContext() [1/4]

hello::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.

◆ ~DataContext() [1/2]

hello::DataContext::~DataContext ( )
virtual

Destructor

◆ DataContext() [2/4]

hello::DataContext::DataContext ( const DataContext )
delete

◆ DataContext() [3/4]

hello::DataContext::DataContext ( Config config,
rad::DbAdapter db_adapter 
)

◆ ~DataContext() [2/2]

virtual hello::DataContext::~DataContext ( )
virtual

◆ DataContext() [4/4]

hello::DataContext::DataContext ( const DataContext )
delete

Member Function Documentation

◆ DbUpdate() [1/2]

void hello::DataContext::DbUpdate ( )

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

◆ DbUpdate() [2/2]

void hello::DataContext::DbUpdate ( )

◆ GetDbInterface() [1/2]

DbInterface & hello::DataContext::GetDbInterface ( )
Returns
A reference to the DB interface object.

◆ GetDbInterface() [2/2]

DbInterface& hello::DataContext::GetDbInterface ( )

◆ operator=() [1/2]

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

Disable copy constructor.

◆ operator=() [2/2]

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

Disable copy constructor.

◆ ReloadConfig() [1/2]

void hello::DataContext::ReloadConfig ( )

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

◆ ReloadConfig() [2/2]

void hello::DataContext::ReloadConfig ( )

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