9 #ifndef {{cookiecutter.module_name|upper}}_CONFIG_HPP_
10 #define {{cookiecutter.module_name|upper}}_CONFIG_HPP_
12 #include <yaml-cpp/yaml.h>
52 bool ParseOptions(
int argc,
char *argv[]);
54 void LoadConfig(
const std::string& filename =
"");
56 const std::string& GetMsgReplierEndpoint()
const;
57 const std::string& GetMsgSubEndpoint()
const;
59 const std::string& GetDbEndpoint()
const;
60 const timeval GetDbTimeout()
const;
62 const std::string& GetSmScxmlFilename()
const;
64 const std::string& GetConfigFilename()
const;
65 const std::string& GetProcName()
const;
66 const std::string& GetLogLevel()
const;
67 const std::string& GetLogProperties()
const;
69 Config(
const Config&) =
delete;
70 Config& operator= (
const Config&) =
delete;
73 YAML::Node m_config_node;
75 std::string m_proc_name;
76 std::string m_log_level;
77 std::string m_log_properties;
78 std::string m_config_filename;
79 std::string m_scxml_filename;
80 std::string m_db_host_endpoint;
82 std::string m_req_endpoint;
83 std::string m_sub_endpoint;
88 #endif // {{cookiecutter.module_name|upper}}_CONFIG_HPP_
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
const std::string CONFIG_ENVVAR_DBHOST
Definition: config.hpp:35
const std::string CONFIG_DEFAULT_SUB_ENDPOINT
Definition: config.hpp:30
const std::string CONFIG_DEFAULT_LOG_LEVEL
Definition: config.hpp:25
const std::string CONFIG_DEFAULT_REQ_ENDPOINT
Definition: config.hpp:29
const std::string CONFIG_DEFAULT_PROCNAME
Definition: config.hpp:21
const int CONFIG_DEFAULT_DB_TIMEOUT
Definition: config.hpp:28
const std::string CONFIG_DEFAULT_DB_ENDPOINT
Definition: config.hpp:27
const std::string CONFIG_DEFAULT_SCXML_FILENAME
Definition: config.hpp:24
const std::string CONFIG_DEFAULT_LOG_PROPERTIES
Definition: config.hpp:26