summaryrefslogtreecommitdiff
path: root/project2/common/variables
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-03-29 21:37:22 +0000
committerrandomdan <randomdan@localhost>2013-03-29 21:37:22 +0000
commit6886ca3542907f498eb6c30aa76474f15e7afc39 (patch)
tree3c4c7fceb294b5cd97b9a3324d137d43d163b9ac /project2/common/variables
parentMore aggregates (diff)
downloadproject2-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.cpp4
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);