#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 | |
Config & | operator= (const Config &)=delete |
Disable copy constructor. More... | |
This class provide access to the command line options and the configuration parameters stored in the configuration file.
server::Config::Config | ( | ) |
Default constructor.
Initialize application configuration attributes by
|
virtual |
Default destructor.
|
delete |
const std::string & server::Config::GetConfigFilename | ( | ) | const |
const std::string & server::Config::GetDbEndpoint | ( | ) | const |
const timeval server::Config::GetDbTimeout | ( | ) | const |
const std::string & server::Config::GetLogLevel | ( | ) | const |
const std::string & server::Config::GetMsgReplierEndpoint | ( | ) | const |
const std::string & server::Config::GetProcName | ( | ) | const |
const std::string & server::Config::GetSmScxmlFilename | ( | ) | const |
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.
[in] | filename | Application configuration filename. |
bool server::Config::ParseOptions | ( | int | argc, |
char * | argv[] | ||
) |
This method parses the command line parameters overriding the initialization done in the constructor.
[in] | argc | Number of command line options. |
[in] | argv | Pointer to the array of command line options. |