[dasher] Add CDasherInterfaceBase::GetSettingsStore; rm CSettingsStore deprecated methods
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher] Add CDasherInterfaceBase::GetSettingsStore; rm CSettingsStore deprecated methods
- Date: Tue, 18 Jan 2011 17:16:25 +0000 (UTC)
commit fe3866f0be35a2418c97412d785a7633f7154da5
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date: Thu Nov 18 18:57:08 2010 +0000
Add CDasherInterfaceBase::GetSettingsStore; rm CSettingsStore deprecated methods
{Get,Set}{Bool,String,Long}Option(const string &key)
Src/DasherCore/DasherInterfaceBase.h | 4 ++
Src/DasherCore/SettingsStore.cpp | 79 ----------------------------------
Src/DasherCore/SettingsStore.h | 12 -----
3 files changed, 4 insertions(+), 91 deletions(-)
---
diff --git a/Src/DasherCore/DasherInterfaceBase.h b/Src/DasherCore/DasherInterfaceBase.h
index 40bfc96..03b99eb 100644
--- a/Src/DasherCore/DasherInterfaceBase.h
+++ b/Src/DasherCore/DasherInterfaceBase.h
@@ -88,6 +88,10 @@ public:
return m_pEventHandler;
};
+ virtual CSettingsStore *GetSettingsStore() {
+ return m_pSettingsStore;
+ }
+
///
/// \deprecated In situ alphabet editing is no longer supported
/// \todo Document this
diff --git a/Src/DasherCore/SettingsStore.cpp b/Src/DasherCore/SettingsStore.cpp
index 59c3f95..78c8d5b 100644
--- a/Src/DasherCore/SettingsStore.cpp
+++ b/Src/DasherCore/SettingsStore.cpp
@@ -257,85 +257,6 @@ std::string CSettingsStore::GetParameterName(int iParameter)
}
-////////////////////////////////////////////////////////////
-//// DEPRECATED FUNCTIONS BELOW
-
-bool CSettingsStore::GetBoolOption(const std::string &Key) {
- // Also make the call to the newer implementation
- for(int ii = 0; ii < NUM_OF_BPS; ii++) {
- if(s_oParamTables.BoolParamTable[ii].regName == Key) {
- return GetBoolParameter(s_oParamTables.BoolParamTable[ii].key);
- }
- }
-
- // This means the key passed in a string was not found in the new table
- DASHER_ASSERT(0);
- return false;
-}
-
-long CSettingsStore::GetLongOption(const std::string &Key) {
- for(int ii = 0; ii < NUM_OF_LPS; ii++) {
- if(s_oParamTables.LongParamTable[ii].regName == Key) {
- return GetLongParameter(s_oParamTables.LongParamTable[ii].key);
- }
- }
- // This means the key passed in a string was not found in the new table
- DASHER_ASSERT(0);
- return false;
-}
-
-std::string CSettingsStore::GetStringOption(const std::string &Key) {
- // Also make the call to the newer implementation
- for(int ii = 0; ii < NUM_OF_SPS; ii++) {
- if(s_oParamTables.StringParamTable[ii].regName == Key) {
-
- return GetStringParameter(s_oParamTables.StringParamTable[ii].key);
- }
- }
-
- // This means the key passed in a string was not found in the new table
- DASHER_ASSERT(0);
- return false;
-}
-
-void CSettingsStore::SetBoolOption(const std::string &Key, bool Value) {
- // Also make the call to the newer implementation
- for(int ii = 0; ii < NUM_OF_BPS; ii++) {
- if(s_oParamTables.BoolParamTable[ii].regName == Key) {
- SetBoolParameter(s_oParamTables.BoolParamTable[ii].key, Value);
- return;
- }
- }
-
- // This means the key passed in a string was not found in the new table
- DASHER_ASSERT(0);
-}
-
-void CSettingsStore::SetLongOption(const std::string &Key, long Value) {
- // Also make the call to the newer implementation
- for(int ii = 0; ii < NUM_OF_LPS; ii++) {
- if(s_oParamTables.LongParamTable[ii].regName == Key) {
- SetLongParameter(s_oParamTables.LongParamTable[ii].key, Value);
- return;
- }
- }
-
- // This means the key passed in a string was not found in the new table
- DASHER_ASSERT(0);
-}
-
-void CSettingsStore::SetStringOption(const std::string &Key, const std::string &Value) {
- // Also make the call to the newer implementation
- for(int ii = 0; ii < NUM_OF_SPS; ii++) {
- if(s_oParamTables.StringParamTable[ii].regName == Key) {
- SetStringParameter(s_oParamTables.StringParamTable[ii].key, Value);
- return;
- }
- }
-
- // This means the key passed in a string was not found in the new table
- DASHER_ASSERT(0);
-}
/* Private functions -- Settings are not saved between sessions unless these
functions are over-ridden.
diff --git a/Src/DasherCore/SettingsStore.h b/Src/DasherCore/SettingsStore.h
index 8dbf8e8..32d319f 100644
--- a/Src/DasherCore/SettingsStore.h
+++ b/Src/DasherCore/SettingsStore.h
@@ -65,18 +65,6 @@ public:
const char *ClSet(const std::string &strKey, const std::string &strValue);
- // --- Deprecated functions below
- // although string functionality might be good for
- // reading/writing from permanent storage (string based)
-
- bool GetBoolOption(const std::string & Key);
- long GetLongOption(const std::string & Key);
- std::string GetStringOption(const std::string & Key);
-
- void SetBoolOption(const std::string & Key, bool Value);
- void SetLongOption(const std::string & Key, long Value);
- void SetStringOption(const std::string & Key, const std::string & Value);
-
private:
// Platform Specific settings file management
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]