diff options
author | lloyd <[email protected]> | 2006-12-14 11:10:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-12-14 11:10:55 +0000 |
commit | 2bbe075762ef36f6467de9dd0c97596625321d1e (patch) | |
tree | dfc1f14fd73945038a3067a98393e4dd7bd5bdb2 | |
parent | a7c6dc06d2a11716e5a6771829bea3ecbf21bfbd (diff) |
Add a new set_option member function to Config
-rw-r--r-- | include/config.h | 6 | ||||
-rw-r--r-- | src/config.cpp | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h index 1612cd7e7..03548319a 100644 --- a/include/config.h +++ b/include/config.h @@ -27,22 +27,22 @@ class Config void set(const std::string&, const std::string&, const std::string&, bool = true); + std::string option(const std::string&) const; u32bit option_as_u32bit(const std::string&) const; u32bit option_as_time(const std::string&) const; bool option_as_bool(const std::string&) const; std::vector<std::string> option_as_list(const std::string&) const; + void set_option(const std::string, const std::string&); + void add_alias(const std::string&, const std::string&); std::string deref_alias(const std::string&) const; - std::string option(const std::string&) const; - void load_inifile(const std::string&); static void choose_sig_format(const std::string&, std::string&, Signature_Format&); private: - std::map<std::string, std::string> settings; }; diff --git a/src/config.cpp b/src/config.cpp index a3bcfa1fd..139e1d410 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -82,6 +82,14 @@ std::string Config::deref_alias(const std::string& key) const } /************************************************* +* Set/Add an option * +*************************************************/ +void Config::set_option(const std::string key, const std::string& value) + { + set("conf", key, value); + } + +/************************************************* * Get an option value * *************************************************/ std::string Config::option(const std::string& key) const |