rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
server::Config Class Reference

#include <config.hpp>

Public Member Functions

 Config ()
 
virtual ~Config ()
 
bool ParseOptions (int argc, char *argv[])
 
void LoadConfig (const std::string &filename="")
 
const std::string & GetMsgReplierEndpoint () const
 
const std::string & GetMsgSubEndpoint () const
 
const std::string & GetDbEndpoint () const
 
const timeval GetDbTimeout () const
 
const std::string & GetSmScxmlFilename () const
 
const std::string & GetSmScxmlAppendFilename () const
 
const std::string & GetConfigFilename () const
 
const std::string & GetProcName () const
 
const std::string & GetLogLevel () const
 
const std::string & GetLogProperties () const
 
 Config (const Config &)=delete
 
Configoperator= (const Config &)=delete
 Disable copy constructor.
 

Detailed Description

This class provide access to the following application read-only configuration information:

Constructor & Destructor Documentation

◆ Config() [1/2]

server::Config::Config ( )

Default constructor.

Initialize application configuration attributes by

  • first use the default constant values defined in the header
  • override the constant values with environment variables (if defined)

◆ ~Config()

server::Config::~Config ( )
virtual

Default destructor.

◆ Config() [2/2]

server::Config::Config ( const Config & )
delete

Member Function Documentation

◆ GetConfigFilename()

const std::string & server::Config::GetConfigFilename ( ) const
Returns
The application configuration filename.

◆ GetDbEndpoint()

const std::string & server::Config::GetDbEndpoint ( ) const
Returns
The IP address used to connect to the runtime DB.

◆ GetDbTimeout()

const timeval server::Config::GetDbTimeout ( ) const
Returns
The timeout used when communicating to the runtime DB.

◆ GetLogLevel()

const std::string & server::Config::GetLogLevel ( ) const
Returns
The configured log level.

◆ GetLogProperties()

const std::string & server::Config::GetLogProperties ( ) const
Returns
The configured log properties filename.

◆ GetMsgReplierEndpoint()

const std::string & server::Config::GetMsgReplierEndpoint ( ) const
Returns
The network endpoint to send request to this application.

The format is "tcp://ipaddr:port", for example: "tcp://127.0.0.1:5577"

◆ GetMsgSubEndpoint()

const std::string & server::Config::GetMsgSubEndpoint ( ) const
Returns
The endpoint for the topic subscription.

◆ GetProcName()

const std::string & server::Config::GetProcName ( ) const
Returns
The application process name.

◆ GetSmScxmlAppendFilename()

const std::string & server::Config::GetSmScxmlAppendFilename ( ) const
Returns
The additional/appended SCXML State Machine model filename used by the application.

◆ GetSmScxmlFilename()

const std::string & server::Config::GetSmScxmlFilename ( ) const
Returns
The SCXML State Machine model filename used by the application.

◆ LoadConfig()

void server::Config::LoadConfig ( const std::string & filename = "")

This method load from a configuration file the application configuration overriding the initialization done in the constructor and the command line options.

Parameters
[in]filenameApplication configuration filename.

◆ operator=()

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

Disable copy constructor.

◆ ParseOptions()

bool server::Config::ParseOptions ( int argc,
char * argv[] )

This method parses the command line parameters overriding the initialization done in the constructor.

Parameters
[in]argcNumber of command line options.
[in]argvPointer to the array of command line options.
Returns
false if the help option has been invoked, true otherwise.

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