|
ifw-sup
3.0.0-pre3
|
#include <config.hpp>
Public Member Functions | |
| Config () | |
| virtual | ~Config () |
| void | LoadConfig (const std::string &filename="", bool reset=false) override |
| std::optional< bool > | GetReplyOk (const std::string &name) const |
| std::optional< int > | GetReplyDelay (const std::string &name) const |
| std::optional< std::string > | GetReplyErrorMessage (const std::string &name) const |
| ReplyConfigData * | GetCmdReplyData (const std::string &name) |
| virtual void | GetConfigList (DbVector &cfg_list) override |
| Get configuration list. More... | |
| const int | GetNumCommands () |
| const std::string | GetCommandName (const int &cmd_index) |
| void | SetReplyOk (const std::string &name, const bool &flag) |
| void | SetReplyDelay (const std::string &name, const int &delay) |
| void | SetReplyErrorMessage (const std::string &name, const std::string &msg) |
| 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.
| sup::subsim::common::Config::Config | ( | ) |
Default constructor.
Initialize application configuration attributes by
|
virtual |
Default destructor.
|
delete |
| ReplyConfigData * sup::subsim::common::Config::GetCmdReplyData | ( | const std::string & | name | ) |
| const std::string sup::subsim::common::Config::GetCommandName | ( | const int & | cmd_index | ) |
|
overridevirtual |
Get configuration list.
| cfg_list | List of all configuration parameters. |
This method returs the complete of configuration parameters handled by this class. This method is used to dump the list into the DB.
| const int sup::subsim::common::Config::GetNumCommands | ( | ) |
| std::optional< int > sup::subsim::common::Config::GetReplyDelay | ( | const std::string & | name | ) | const |
| std::optional< std::string > sup::subsim::common::Config::GetReplyErrorMessage | ( | const std::string & | name | ) | const |
| std::optional< bool > sup::subsim::common::Config::GetReplyOk | ( | const std::string & | name | ) | const |
|
override |
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. |
| [in] | reset | Resets the internal configuration. |
| void sup::subsim::common::Config::SetReplyDelay | ( | const std::string & | name, |
| const int & | delay | ||
| ) |
| void sup::subsim::common::Config::SetReplyErrorMessage | ( | const std::string & | name, |
| const std::string & | msg | ||
| ) |
| void sup::subsim::common::Config::SetReplyOk | ( | const std::string & | name, |
| const bool & | flag | ||
| ) |