rad  3.0.0
Public Member Functions | List of all members
exmalserver::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 & GetDbEndpoint () const
 
const timeval GetDbTimeout () const
 
const std::string & GetSmScxmlFilename () 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. More...
 
 Config ()
 
virtual ~Config ()
 
bool ParseOptions (int argc, char *argv[])
 
void LoadConfig (const std::string &filename="")
 
const std::string & GetMsgReplierEndpoint () const
 
const std::string & GetDbEndpoint () const
 
const timeval GetDbTimeout () const
 
const std::string & GetSmScxmlFilename () 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. More...
 

Detailed Description

This class provide access to the command line options and the configuration parameters stored in the configuration file.

Constructor & Destructor Documentation

◆ Config() [1/4]

exmalserver::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() [1/2]

exmalserver::Config::~Config ( )
virtual

Default destructor.

◆ Config() [2/4]

exmalserver::Config::Config ( const Config )
delete

◆ Config() [3/4]

exmalserver::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() [2/2]

virtual exmalserver::Config::~Config ( )
virtual

Default destructor.

◆ Config() [4/4]

exmalserver::Config::Config ( const Config )
delete

Member Function Documentation

◆ GetConfigFilename() [1/2]

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

◆ GetConfigFilename() [2/2]

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

◆ GetDbEndpoint() [1/2]

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

◆ GetDbEndpoint() [2/2]

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

◆ GetDbTimeout() [1/2]

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

◆ GetDbTimeout() [2/2]

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

◆ GetLogLevel() [1/2]

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

◆ GetLogLevel() [2/2]

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

◆ GetLogProperties() [1/2]

const std::string & exmalserver::Config::GetLogProperties ( ) const
Returns
The log properties config filename.

◆ GetLogProperties() [2/2]

const std::string& exmalserver::Config::GetLogProperties ( ) const
Returns
The log properties config filename.

◆ GetMsgReplierEndpoint() [1/2]

const std::string & exmalserver::Config::GetMsgReplierEndpoint ( ) const
Returns
The network endpoint to send request to this application. The format is "<middleware>.<protocol>://<ipaddr>:<port>". For example: "zpb.rr://127.0.0.1:12081/"

◆ GetMsgReplierEndpoint() [2/2]

const std::string& exmalserver::Config::GetMsgReplierEndpoint ( ) const
Returns
The network endpoint to send request to this application. The format is "<middleware>.<protocol>://<ipaddr>:<port>". For example: "zpb.rr://127.0.0.1:12081/"

◆ GetProcName() [1/2]

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

◆ GetProcName() [2/2]

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

◆ GetSmScxmlFilename() [1/2]

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

◆ GetSmScxmlFilename() [2/2]

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

◆ LoadConfig() [1/2]

void exmalserver::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.

◆ LoadConfig() [2/2]

void exmalserver::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=() [1/2]

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

Disable copy constructor.

◆ operator=() [2/2]

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

Disable copy constructor.

◆ ParseOptions() [1/2]

bool exmalserver::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.

◆ ParseOptions() [2/2]

bool exmalserver::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: