[dasher: 28/43] iPhone: remove (commented-out) ParameterDictionary methods
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 28/43] iPhone: remove (commented-out) ParameterDictionary methods
- Date: Thu, 23 Jun 2011 18:58:06 +0000 (UTC)
commit af3610b133243820f4a80014c9850bd27dfb29c2
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date: Mon May 16 14:56:34 2011 +0100
iPhone: remove (commented-out) ParameterDictionary methods
Src/iPhone/Classes/CDasherInterfaceBridge.mm | 47 --------------------------
Src/iPhone/Classes/COSXSettingsStore.h | 1 -
Src/iPhone/Classes/COSXSettingsStore.mm | 47 --------------------------
3 files changed, 0 insertions(+), 95 deletions(-)
---
diff --git a/Src/iPhone/Classes/CDasherInterfaceBridge.mm b/Src/iPhone/Classes/CDasherInterfaceBridge.mm
index b9af70a..80a9d6d 100644
--- a/Src/iPhone/Classes/CDasherInterfaceBridge.mm
+++ b/Src/iPhone/Classes/CDasherInterfaceBridge.mm
@@ -261,50 +261,3 @@ void CDasherInterfaceBridge::WriteTrainFile(const std::string &filename,const st
write(fd,strNewText.c_str(),strNewText.length());
close(fd);
}
-
-/*NSDictionary *CDasherInterfaceBridge::ParameterDictionary() {
- COSXSettingsStore *ss(static_cast < COSXSettingsStore * >(m_pSettingsStore));
- return ss->ParameterDictionary();
-}
-
-id CDasherInterfaceBridge::GetParameter(NSString *aKey) {
-
- COSXSettingsStore *ss(static_cast < COSXSettingsStore * >(m_pSettingsStore));
- int pIndex = ss->GetParameterIndex(StdStringFromNSString(aKey));
-
- switch (ss->GetParameterType(pIndex)) {
- case ParamBool:
- return [NSNumber numberWithBool:GetBoolParameter(pIndex)];
- break;
- case ParamLong:
- return [NSNumber numberWithLong:GetLongParameter(pIndex)];
- break;
- case ParamString:
- return NSStringFromStdString(GetStringParameter(pIndex));
- break;
- default:
- break;
- }
-
- return nil;
-}
-
-void CDasherInterfaceBridge::SetParameter(NSString *aKey, id aValue) {
-
- COSXSettingsStore *ss(static_cast < COSXSettingsStore * >(m_pSettingsStore));
- int pIndex = ss->GetParameterIndex(StdStringFromNSString(aKey));
-
- switch (ss->GetParameterType(pIndex)) {
- case ParamBool:
- SetBoolParameter(pIndex, [aValue boolValue]);
- break;
- case ParamLong:
- SetLongParameter(pIndex, [aValue longValue]);
- break;
- case ParamString:
- SetStringParameter(pIndex, StdStringFromNSString(aValue));
- break;
- default:
- break;
- }
-}*/
diff --git a/Src/iPhone/Classes/COSXSettingsStore.h b/Src/iPhone/Classes/COSXSettingsStore.h
index 7dcd4b7..e1c1d07 100644
--- a/Src/iPhone/Classes/COSXSettingsStore.h
+++ b/Src/iPhone/Classes/COSXSettingsStore.h
@@ -22,7 +22,6 @@ public:
COSXSettingsStore(Dasher::CEventHandler * pEventHandler);
~COSXSettingsStore();
std::string GetParamName(int iParameter);
- //NSDictionary *ParameterDictionary();
//int GetParameterIndex(const std::string & Key);
diff --git a/Src/iPhone/Classes/COSXSettingsStore.mm b/Src/iPhone/Classes/COSXSettingsStore.mm
index 7724039..4550b58 100644
--- a/Src/iPhone/Classes/COSXSettingsStore.mm
+++ b/Src/iPhone/Classes/COSXSettingsStore.mm
@@ -19,53 +19,6 @@ COSXSettingsStore::COSXSettingsStore(Dasher::CEventHandler *pEventHandler):CSett
COSXSettingsStore::~COSXSettingsStore() {
};
-/*NSDictionary *COSXSettingsStore::ParameterDictionary() {
- static NSMutableDictionary *parameterDictionary = nil;
-
- if (parameterDictionary == nil) {
- parameterDictionary = [[NSMutableDictionary alloc] initWithCapacity:NUM_OF_BPS + NUM_OF_LPS + NUM_OF_SPS];
- int ii;
-
- for(ii = 0; ii < NUM_OF_BPS; ii++) {
- [parameterDictionary setObject:[NSDictionary dictionaryWithObjectsAndKeys:
- NSStringFromStdString(s_oParamTables.BoolParamTable[ii].regName), @"regName",
- NSStringFromStdString(s_oParamTables.BoolParamTable[ii].humanReadable), @"humanReadable",
- [NSNumber numberWithInt:s_oParamTables.BoolParamTable[ii].key], @"key",
- nil] forKey:NSStringFromStdString(s_oParamTables.BoolParamTable[ii].regName)];
- }
-
- for(ii = 0; ii < NUM_OF_LPS; ii++) {
- [parameterDictionary setObject:[NSDictionary dictionaryWithObjectsAndKeys:
- NSStringFromStdString(s_oParamTables.LongParamTable[ii].regName), @"regName",
- NSStringFromStdString(s_oParamTables.LongParamTable[ii].humanReadable), @"humanReadable",
- [NSNumber numberWithInt:s_oParamTables.LongParamTable[ii].key], @"key",
- nil] forKey:NSStringFromStdString(s_oParamTables.LongParamTable[ii].regName)];
- }
-
- for(ii = 0; ii < NUM_OF_SPS; ii++) {
- [parameterDictionary setObject:[NSDictionary dictionaryWithObjectsAndKeys:
- NSStringFromStdString(s_oParamTables.StringParamTable[ii].regName), @"regName",
- NSStringFromStdString(s_oParamTables.StringParamTable[ii].humanReadable), @"humanReadable",
- [NSNumber numberWithInt:s_oParamTables.StringParamTable[ii].key], @"key",
- nil] forKey:NSStringFromStdString(s_oParamTables.StringParamTable[ii].regName)];
- }
- }
-
- return parameterDictionary;
-}
-
-
-int COSXSettingsStore::GetParameterIndex(const std::string & aKey) {
- NSString *key = NSStringFromStdString(aKey);
- NSDictionary *parameterEntry = [ParameterDictionary() objectForKey:key];
- if (parameterEntry == nil) {
- NSLog(@"COSXSettingsStore::GetParameterIndex - unknown key: %@", key);
- return NSNotFound;
- }
-
- return [[parameterEntry objectForKey:@"key"] intValue];
-}*/
-
/*
the default values for all the parameters are stored in the core. Rather than trying to ferret out those values in order to construct a registration domain, I'm just going to get the object for the key and if it is nil, let the core know I failed to read the default and it will supply the correct default value.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]