ifw  0.0.1-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ctd::qatk::qapp2::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
 
 Config (const Config &)=delete
 
Configoperator= (const Config &)=delete
 
 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
 
 Config (const Config &)=delete
 
Configoperator= (const Config &)=delete
 

Detailed Description

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

Constructor & Destructor Documentation

ctd::qatk::qapp2::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)
Todo:
These msgs won't be displayed until the DEBUG logLevel is applied.
Todo:
These msgs won't be displayed until the DEBUG logLevel is applied.
ctd::qatk::qapp2::Config::~Config ( )
virtual
ctd::qatk::qapp2::Config::Config ( const Config )
delete
ctd::qatk::qapp2::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)
virtual ctd::qatk::qapp2::Config::~Config ( )
virtual
ctd::qatk::qapp2::Config::Config ( const Config )
delete

Member Function Documentation

const std::string & ctd::qatk::qapp2::Config::GetConfigFilename ( ) const
Returns
The application configuration filename.
const std::string& ctd::qatk::qapp2::Config::GetConfigFilename ( ) const
Returns
The application configuration filename.
const std::string & ctd::qatk::qapp2::Config::GetDbEndpoint ( ) const
Returns
The IP address and port used to connect to the runtime DB.
const std::string& ctd::qatk::qapp2::Config::GetDbEndpoint ( ) const
Returns
The IP address and port used to connect to the runtime DB.
const timeval ctd::qatk::qapp2::Config::GetDbTimeout ( ) const
Returns
The timeout used when communicating to the runtime DB.
const timeval ctd::qatk::qapp2::Config::GetDbTimeout ( ) const
Returns
The timeout used when communicating to the runtime DB.
const std::string & ctd::qatk::qapp2::Config::GetLogLevel ( ) const
Returns
The configured log level.
const std::string& ctd::qatk::qapp2::Config::GetLogLevel ( ) const
Returns
The configured log level.
const std::string & ctd::qatk::qapp2::Config::GetMsgReplierEndpoint ( ) const
Returns
The network endpoint to send request to this application. The format is "<protocol>://<ipaddr>:<port>" where <protocol> is 'tcp' For example: "tcp://127.0.0.1:5577"
const std::string& ctd::qatk::qapp2::Config::GetMsgReplierEndpoint ( ) const
Returns
The network endpoint to send request to this application. The format is "<protocol>://<ipaddr>:<port>" where <protocol> is 'tcp' For example: "tcp://127.0.0.1:5577"
const std::string & ctd::qatk::qapp2::Config::GetProcName ( ) const
Returns
The application process name.
const std::string& ctd::qatk::qapp2::Config::GetProcName ( ) const
Returns
The application process name.
const std::string& ctd::qatk::qapp2::Config::GetSmScxmlFilename ( ) const
Returns
The SCXML State Machine model filename used by the application.
const std::string & ctd::qatk::qapp2::Config::GetSmScxmlFilename ( ) const
Returns
The SCXML State Machine model filename used by the application.
void ctd::qatk::qapp2::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.
void ctd::qatk::qapp2::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.
Config& ctd::qatk::qapp2::Config::operator= ( const Config )
delete
Config& ctd::qatk::qapp2::Config::operator= ( const Config )
delete
bool ctd::qatk::qapp2::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.
bool ctd::qatk::qapp2::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: