diff options
author | randomdan <randomdan@localhost> | 2013-03-29 21:37:22 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2013-03-29 21:37:22 +0000 |
commit | 6886ca3542907f498eb6c30aa76474f15e7afc39 (patch) | |
tree | 3c4c7fceb294b5cd97b9a3324d137d43d163b9ac /project2/common/variables | |
parent | More aggregates (diff) | |
download | project2-6886ca3542907f498eb6c30aa76474f15e7afc39.tar.bz2 project2-6886ca3542907f498eb6c30aa76474f15e7afc39.tar.xz project2-6886ca3542907f498eb6c30aa76474f15e7afc39.zip |
Split variable and variabletype code into separate files
Use variabletype in populating options data
Add code for guessing the type of some input data
Diffstat (limited to 'project2/common/variables')
-rw-r--r-- | project2/common/variables/config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/project2/common/variables/config.cpp b/project2/common/variables/config.cpp index 67014c4..51759d5 100644 --- a/project2/common/variables/config.cpp +++ b/project2/common/variables/config.cpp @@ -5,7 +5,7 @@ #include <boost/algorithm/string/predicate.hpp> #include "../appEngine.h" -typedef std::map<Glib::ustring, Glib::ustring> ConfigOptions; +typedef std::map<Glib::ustring, VariableType> ConfigOptions; static ConfigOptions cfgOpts; SimpleMessageException(NoSuchConfigurationValue); @@ -40,7 +40,7 @@ class VariableConfigLoader : public VariableLoader::For<VariableConfig> { void reset() const { cfgOpts.clear(); } - void consume(const Glib::ustring & n, const Glib::ustring & p, const Glib::ustring & v) const { + void consume(const Glib::ustring & n, const Glib::ustring & p, const VariableType & v) const { if (boost::algorithm::starts_with(n, "application.")) { Glib::ustring k(n.substr(12)); const ConfigOptions::iterator i = cfgOpts.find(k); |