ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
Public Member Functions | List of all members
server::DataContext Class Reference

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

#include <dataContext.hpp>

Public Member Functions

 DataContext (Config &config, rad::DbAdapter &db_adapter)
 This constructor uses the application configuration to initialize the adapter object to the in-memory DB. More...
 
virtual ~DataContext ()
 Destructor. More...
 
void ReloadConfig ()
 Reload the configuration from file and reconnect to the in-memory DB. More...
 
void UpdateDb ()
 Try to connect to the DB and update the application configuration. More...
 
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.

Definition at line 21 of file dataContext.hpp.

Constructor & Destructor Documentation

◆ DataContext() [1/2]

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.

Definition at line 19 of file dataContext.cpp.

◆ ~DataContext()

server::DataContext::~DataContext ( )
virtual

Destructor.

Definition at line 27 of file dataContext.cpp.

◆ DataContext() [2/2]

server::DataContext::DataContext ( const DataContext )
delete

Member Function Documentation

◆ GetDbInterface()

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

Definition at line 55 of file dataContext.cpp.

◆ operator=()

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

Disable copy constructor.

◆ ReloadConfig()

void server::DataContext::ReloadConfig ( )

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

Definition at line 31 of file dataContext.cpp.

◆ UpdateDb()

void server::DataContext::UpdateDb ( )

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

Definition at line 38 of file dataContext.cpp.


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