reorganize sources

This commit is contained in:
Eduardo Bart
2011-08-15 11:06:15 -03:00
parent 4e03b15b27
commit d8cc37afdb
113 changed files with 621 additions and 3437 deletions

View File

@@ -1,14 +1,14 @@
#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H
#include <global.h>
#include "declarations.h"
struct ConfigValueProxy {
ConfigValueProxy(const std::string& v) : value(v) { }
operator std::string() const { return aux::unsafe_cast<std::string>(value); }
operator float() const { return aux::unsafe_cast<float>(value); }
operator int() const { return aux::unsafe_cast<int>(value); }
operator bool() const { return aux::unsafe_cast<bool>(value); }
operator std::string() const { return fw::unsafe_cast<std::string>(value); }
operator float() const { return fw::unsafe_cast<float>(value); }
operator int() const { return fw::unsafe_cast<int>(value); }
operator bool() const { return fw::unsafe_cast<bool>(value); }
std::string value;
};
@@ -19,7 +19,7 @@ public:
bool save();
template<class T>
void set(const std::string& key, const T& value) { m_confsMap[key] = aux::unsafe_cast<std::string>(value); }
void set(const std::string& key, const T& value) { m_confsMap[key] = fw::unsafe_cast<std::string>(value); }
ConfigValueProxy get(const std::string& key) { return ConfigValueProxy(m_confsMap[key]); }