aboutsummaryrefslogtreecommitdiff
path: root/common/config-manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/config-manager.h')
-rw-r--r--common/config-manager.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/common/config-manager.h b/common/config-manager.h
index d43a7bec51..6bf56749c5 100644
--- a/common/config-manager.h
+++ b/common/config-manager.h
@@ -24,7 +24,6 @@
#define COMMON_CONFIG_MANAGER_H
#include "common/array.h"
-//#include "common/config-file.h"
#include "common/hashmap.h"
#include "common/singleton.h"
#include "common/str.h"
@@ -47,12 +46,33 @@ class ConfigManager : public Singleton<ConfigManager> {
public:
- class Domain : public StringMap {
+ class Domain {
private:
+ StringMap _entries;
StringMap _keyValueComments;
String _domainComment;
public:
+ typedef StringMap::const_iterator const_iterator;
+ const_iterator begin() const { return _entries.begin(); }
+ const_iterator end() const { return _entries.end(); }
+
+ bool empty() const { return _entries.empty(); }
+
+ bool contains(const String &key) const { return _entries.contains(key); }
+
+ String &operator[](const String &key) { return _entries[key]; }
+ const String &operator[](const String &key) const { return _entries[key]; }
+
+ void setVal(const String &key, const String &value) { _entries.setVal(key, value); }
+
+ String &getVal(const String &key) { return _entries.getVal(key); }
+ const String &getVal(const String &key) const { return _entries.getVal(key); }
+
+ void clear() { _entries.clear(); }
+
+ void erase(const String &key) { _entries.erase(key); }
+
void setDomainComment(const String &comment);
const String &getDomainComment() const;
@@ -143,7 +163,8 @@ public:
bool hasMiscDomain(const String &domName) const;
const DomainMap & getGameDomains() const { return _gameDomains; }
- DomainMap & getGameDomains() { return _gameDomains; }
+ DomainMap::iterator beginGameDomains() { return _gameDomains.begin(); }
+ DomainMap::iterator endGameDomains() { return _gameDomains.end(); }
static void defragment(); // move in memory to reduce fragmentation
void copyFrom(ConfigManager &source);