summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/SettingsStore.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/dasher/SettingsStore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/dasher/SettingsStore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/inputmethods/dasher/SettingsStore.cpp b/inputmethods/dasher/SettingsStore.cpp
index f7661bd..7e0fa58 100644
--- a/inputmethods/dasher/SettingsStore.cpp
+++ b/inputmethods/dasher/SettingsStore.cpp
@@ -1,66 +1,71 @@
// SettingsStore.cpp
//
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002 Iain Murray
//
/////////////////////////////////////////////////////////////////////////////
#include "SettingsStore.h"
using namespace std;
/* TODO: Consider using Template functions to make this neater. */
+CSettingsStore::~CSettingsStore()
+{
+}
+
+
bool CSettingsStore::GetBoolOption(const string& Key)
{
if (BoolMap.find(Key)==BoolMap.end()) {
bool Value = false;
LoadSetting(Key, &Value);
BoolMap[Key] = Value;
}
return BoolMap[Key];
}
long CSettingsStore::GetLongOption(const string& Key)
{
if (LongMap.find(Key)==LongMap.end()) {
long Value = 0l;
LoadSetting(Key, &Value);
LongMap[Key] = Value;
}
return LongMap[Key];
}
string& CSettingsStore::GetStringOption(const string& Key)
{
if (StringMap.find(Key)==StringMap.end()) {
string Value = "";
LoadSetting(Key, &Value);
StringMap[Key] = Value;
}
return StringMap[Key];
}
void CSettingsStore::SetBoolOption(const string& Key, bool Value)
{
BoolMap[Key] = Value;
SaveSetting(Key, Value);
}
void CSettingsStore::SetLongOption(const string& Key, long Value)
{
LongMap[Key] = Value;
SaveSetting(Key, Value);
}