9 #ifndef SERVER_CONFIG_HPP_
10 #define SERVER_CONFIG_HPP_
12 #include <yaml-cpp/yaml.h>
72 void LoadConfig(
const std::string& filename =
"");
115 YAML::Node m_config_node;
116 std::string m_proc_name;
117 std::string m_log_level;
118 std::string m_config_filename;
119 std::string m_scxml_filename;
120 std::string m_db_host_endpoint;
121 int m_db_timeout_sec;
122 std::string m_req_endpoint;
127 #endif // SERVER_CONFIG_HPP_
const std::string & GetConfigFilename() const
Definition: config.cpp:218
const std::string CONFIG_DEFAULT_DB_ENDPOINT
Definition: config.hpp:26
const std::string & GetProcName() const
Definition: config.cpp:223
Definition: config.hpp:39
bool ParseOptions(int argc, char *argv[])
Definition: config.cpp:61
Config & operator=(const Config &)=delete
Disable copy constructor.
const std::string & GetLogLevel() const
Definition: config.cpp:228
const std::string & GetDbEndpoint() const
Definition: config.cpp:202
const std::string & GetSmScxmlFilename() const
Definition: config.cpp:213
Config()
Definition: config.cpp:26
const std::string CONFIG_DEFAULT_LOGLEVEL
Definition: config.hpp:25
const std::string CONFIG_DEFAULT_REQ_ENDPOINT
Definition: config.hpp:28
const std::string CONFIG_DEFAULT_SCXML_FILENAME
Definition: config.hpp:24
const timeval GetDbTimeout() const
Definition: config.cpp:207
const std::string CONFIG_DEFAULT_FILENAME
no default value to force user to specify config filename since it overwrites the command line option...
Definition: config.hpp:23
void LoadConfig(const std::string &filename="")
Definition: config.cpp:141
const int CONFIG_DEFAULT_DB_TIMEOUT_SEC
Definition: config.hpp:27
virtual ~Config()
Definition: config.cpp:57
const std::string & GetMsgReplierEndpoint() const
Definition: config.cpp:197
const std::string CONFIG_DEFAULT_PROCNAME
Definition: config.hpp:21
const std::string CONFIG_ENVVAR_DBHOST
Definition: config.hpp:33