[dasher: 13/21] iPhone: remove "using namespace Dasher" from header file...
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 13/21] iPhone: remove "using namespace Dasher" from header file...
- Date: Thu, 14 Jul 2011 17:32:14 +0000 (UTC)
commit 84d9496b4d0b9b42f1468c131a4fc95af73936c6
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date: Mon Jul 11 16:38:53 2011 +0100
iPhone: remove "using namespace Dasher" from header file...
(and move custom filters into namespace Dasher)
Src/iPhone/Classes/CDasherInterfaceBridge.h | 22 +++++++++++-----------
Src/iPhone/Classes/CDasherInterfaceBridge.mm | 1 +
Src/iPhone/Classes/DasherAppDelegate.h | 6 +++---
Src/iPhone/Classes/DasherAppDelegate.mm | 1 +
Src/iPhone/Classes/IPhoneFilters.h | 5 +++--
Src/iPhone/Classes/IPhoneFilters.mm | 2 ++
Src/iPhone/Classes/InputMethodSelector.mm | 4 ++--
7 files changed, 23 insertions(+), 18 deletions(-)
---
diff --git a/Src/iPhone/Classes/CDasherInterfaceBridge.h b/Src/iPhone/Classes/CDasherInterfaceBridge.h
index b4e5f25..04aca70 100644
--- a/Src/iPhone/Classes/CDasherInterfaceBridge.h
+++ b/Src/iPhone/Classes/CDasherInterfaceBridge.h
@@ -59,16 +59,16 @@ public:
void ClearAllContext();
std::string GetAllContext();
std::string GetContext(unsigned int iStart, unsigned int iLength);
- unsigned int ctrlMove(bool bForwards, CControlManager::EditDistance dist);
- unsigned int ctrlDelete(bool bForwards, CControlManager::EditDistance dist);
+ unsigned int ctrlMove(bool bForwards, Dasher::CControlManager::EditDistance dist);
+ unsigned int ctrlDelete(bool bForwards, Dasher::CControlManager::EditDistance dist);
void SetLockStatus(const string &strText, int iPercent);
- void editOutput(const string &strText, CDasherNode *pNode);
- void editDelete(const string &strText, CDasherNode *pNode);
- void editConvert(CDasherNode *pNode);
- void editProtect(CDasherNode *pNode);
+ void editOutput(const string &strText, Dasher::CDasherNode *pNode);
+ void editDelete(const string &strText, Dasher::CDasherNode *pNode);
+ void editConvert(Dasher::CDasherNode *pNode);
+ void editProtect(Dasher::CDasherNode *pNode);
///Override for asynchronous messages only...TODO?
void Message(const string &strText, bool bInterrupt);
- CGameModule *CreateGameModule(CDasherView *pView,CDasherModel *pModel);
+ Dasher::CGameModule *CreateGameModule(Dasher::CDasherView *pView,Dasher::CDasherModel *pModel);
private:
virtual void ScanAlphabetFiles(std::vector<std::string> &vFileList);
virtual void ScanColourFiles(std::vector<std::string> &vFileList);
@@ -84,8 +84,8 @@ private:
DasherAppDelegate *dasherApp; // objc counterpart
- CIPhoneMouseInput *m_pMouseDevice;
- CIPhoneTiltInput *m_pTiltDevice;
- UndoubledTouch *m_pUndoubledTouch;
- CIPhoneTwoFingerInput *m_pTwoFingerDevice;
+ Dasher::CIPhoneMouseInput *m_pMouseDevice;
+ Dasher::CIPhoneTiltInput *m_pTiltDevice;
+ Dasher::UndoubledTouch *m_pUndoubledTouch;
+ Dasher::CIPhoneTwoFingerInput *m_pTwoFingerDevice;
};
diff --git a/Src/iPhone/Classes/CDasherInterfaceBridge.mm b/Src/iPhone/Classes/CDasherInterfaceBridge.mm
index f8ef86a..49f7f06 100644
--- a/Src/iPhone/Classes/CDasherInterfaceBridge.mm
+++ b/Src/iPhone/Classes/CDasherInterfaceBridge.mm
@@ -30,6 +30,7 @@
-(UIWebView *)getWebView;
@end;
+using namespace Dasher;
using namespace std;
class IPhoneGameModule : public CGameModule {
diff --git a/Src/iPhone/Classes/DasherAppDelegate.h b/Src/iPhone/Classes/DasherAppDelegate.h
index 10dc759..c6e0ade 100644
--- a/Src/iPhone/Classes/DasherAppDelegate.h
+++ b/Src/iPhone/Classes/DasherAppDelegate.h
@@ -35,11 +35,11 @@
NSString *m_wordBoundary, *m_sentenceBoundary, *m_lineBoundary;
}
-- (void)setAlphabet:(const CAlphInfo *)pAlph;
+- (void)setAlphabet:(const Dasher::CAlphInfo *)pAlph;
- (void)outputCallback:(NSString *)s;
- (void)deleteCallback:(NSString *)s;
-- (unsigned int)move:(CControlManager::EditDistance)amt forwards:(BOOL)bForwards;
-- (unsigned int)del:(CControlManager::EditDistance)amt forwards:(BOOL)bForwards;
+- (unsigned int)move:(Dasher::CControlManager::EditDistance)amt forwards:(BOOL)bForwards;
+- (unsigned int)del:(Dasher::CControlManager::EditDistance)amt forwards:(BOOL)bForwards;
- (BOOL)supportsSpeech;
- (void)speak:(NSString *)text interrupt:(BOOL)bInt;
- (void)copy:(NSString *)text;
diff --git a/Src/iPhone/Classes/DasherAppDelegate.mm b/Src/iPhone/Classes/DasherAppDelegate.mm
index 9092863..983189e 100644
--- a/Src/iPhone/Classes/DasherAppDelegate.mm
+++ b/Src/iPhone/Classes/DasherAppDelegate.mm
@@ -77,6 +77,7 @@ static SModuleSettings _miscSettings[] = { //note iStep and string description a
{BP_DOUBLE_X, T_BOOL, -1, -1, -1, -1, ""},
};
+using namespace Dasher;
@implementation DasherAppDelegate
diff --git a/Src/iPhone/Classes/IPhoneFilters.h b/Src/iPhone/Classes/IPhoneFilters.h
index 4c45bcf..7b9453b 100644
--- a/Src/iPhone/Classes/IPhoneFilters.h
+++ b/Src/iPhone/Classes/IPhoneFilters.h
@@ -11,8 +11,6 @@
#include "StylusFilter.h"
#include "IPhoneInputs.h"
-using namespace Dasher;
-
@class NSUserDefaultsObserver;
class IPhonePrefsObserver {
@@ -35,6 +33,8 @@ extern NSString *TOUCH_USE_TILT_X;
#define TOUCH_FILTER "IPhone Touch Filter"
#define TWO_FINGER_FILTER "Two-finger filter"
+namespace Dasher {
+
class CIPhoneTiltFilter : public COneDimensionalFilter, private IPhonePrefsObserver {
public:
CIPhoneTiltFilter(CSettingsUser *pCreator, CDasherInterfaceBase *pInterface, ModuleID_t iID, CDasherInput *pTouch);
@@ -83,4 +83,5 @@ public:
virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput);
};
+}
/// @}
\ No newline at end of file
diff --git a/Src/iPhone/Classes/IPhoneFilters.mm b/Src/iPhone/Classes/IPhoneFilters.mm
index a453e76..63d9d30 100644
--- a/Src/iPhone/Classes/IPhoneFilters.mm
+++ b/Src/iPhone/Classes/IPhoneFilters.mm
@@ -64,6 +64,8 @@ IPhonePrefsObserver::~IPhonePrefsObserver() {
[obsvr release];
}
+using namespace Dasher;
+
CIPhoneTiltFilter::CIPhoneTiltFilter(CSettingsUser *pCreator, CDasherInterfaceBase *pInterface, ModuleID_t iID, CDasherInput *pTouch)
: COneDimensionalFilter(pCreator, pInterface, iID, TILT_FILTER), m_pTouch(pTouch) {
ObserveKeys(HOLD_TO_GO, TILT_USE_TOUCH_X, TILT_1D, @"CircleStart", nil);
diff --git a/Src/iPhone/Classes/InputMethodSelector.mm b/Src/iPhone/Classes/InputMethodSelector.mm
index 302cb2f..13c6314 100644
--- a/Src/iPhone/Classes/InputMethodSelector.mm
+++ b/Src/iPhone/Classes/InputMethodSelector.mm
@@ -183,7 +183,7 @@ int numSections = sizeof(allMeths) / sizeof(allMeths[0]);
-(UITableViewCellAccessoryType)accessoryTypeForFilter:(SFilterDesc *)filter {
SModuleSettings *sets; int count;
- CDasherInterfaceBase *intf = [DasherAppDelegate theApp].dasherInterface;
+ Dasher::CDasherInterfaceBase *intf = [DasherAppDelegate theApp].dasherInterface;
if (intf->GetModuleSettings(filter->filterName, &sets, &count))
if (count>0) return UITableViewCellAccessoryDisclosureIndicator;
if (intf->GetModuleSettings(filter->deviceName, &sets, &count))
@@ -279,7 +279,7 @@ int numSections = sizeof(allMeths) / sizeof(allMeths[0]);
@implementation ExtraParametersController
-(id)initForFilter:(SFilterDesc *)filter {
- CDasherInterfaceBase *intf=[DasherAppDelegate theApp].dasherInterface;
+ Dasher::CDasherInterfaceBase *intf=[DasherAppDelegate theApp].dasherInterface;
SModuleSettings *settings; int count;
if (!intf->GetModuleSettings(filter->filterName, &settings, &count)) {
settings=NULL; count=0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]