~james-gangur/sqee/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include <sqee/forward.hpp>
#include <unordered_map>

namespace chaiscript { class Boxed_Value; }

namespace sq {

/// The SQEE Settings manager
class Settings final : NonCopyable {
public:
    Settings(); ~Settings();

    template<class T> void add(const string& _key, T _val);
    template<class T> void mod(const string& _key, T _val);
    template<class T> T get(const string& _key) const;

    void cs_mod(const string& _key, chai::Boxed_Value _val);
    chai::Boxed_Value cs_get(const string& _key) const;

private:
    unique_ptr<std::unordered_map<string, chai::Boxed_Value>> settingMap;
};

}