[dasher: 12/16] Default&OneDimensionalFilter: protected meths & ctor-w/-name to ease subclassing



commit 0a80d3d68e23338c12ba00a62b6922789472e902
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Tue Sep 29 16:49:29 2009 +0100

    Default&OneDimensionalFilter: protected meths & ctor-w/-name to ease subclassing
    
    Added named constructor & made ApplyTransform protected to ease subclassing

 Src/DasherCore/DefaultFilter.h          |    4 ++--
 Src/DasherCore/OneDimensionalFilter.cpp |   11 +++++++----
 Src/DasherCore/OneDimensionalFilter.h   |    9 +++------
 3 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/Src/DasherCore/DefaultFilter.h b/Src/DasherCore/DefaultFilter.h
index 063d0d7..116b44c 100644
--- a/Src/DasherCore/DefaultFilter.h
+++ b/Src/DasherCore/DefaultFilter.h
@@ -21,12 +21,12 @@ class CDefaultFilter : public CInputFilter {
 
  protected:
   virtual void CreateStartHandler();
+  virtual void ApplyAutoCalibration(myint &iDasherX, myint &iDasherY, bool bUpdate);
+  virtual void ApplyTransform(myint &iDasherX, myint &iDasherY);
   
  private:
   virtual void DrawMouse(CDasherView *pView);
   virtual void DrawMouseLine(CDasherView *pView);
-  virtual void ApplyAutoCalibration(myint &iDasherX, myint &iDasherY, bool bUpdate);
-  virtual void ApplyTransform(myint &iDasherX, myint &iDasherY);
 
   CAutoSpeedControl *m_pAutoSpeedControl;
   CStartHandler *m_pStartHandler;
diff --git a/Src/DasherCore/OneDimensionalFilter.cpp b/Src/DasherCore/OneDimensionalFilter.cpp
index 7159cd1..2f374fe 100644
--- a/Src/DasherCore/OneDimensionalFilter.cpp
+++ b/Src/DasherCore/OneDimensionalFilter.cpp
@@ -3,13 +3,16 @@
 
 using namespace Dasher;
 
-COneDimensionalFilter::COneDimensionalFilter(Dasher::CEventHandler * pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface)
-  : CDefaultFilter(pEventHandler, pSettingsStore, pInterface, 4, _("One Dimensional Mode")) {
+/*COneDimensionalFilter::COneDimensionalFilter(Dasher::CEventHandler * pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface, CDasherModel *m_pDasherModel)
+  : COneDimensionalFilter(pEventHandler, pSettingsStore, pInterface, m_pDasherModel, 4, _("One Dimensional Mode")) {
+}*/
+
+COneDimensionalFilter::COneDimensionalFilter(Dasher::CEventHandler * pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface, ModuleID_t iID, const char *szName)
+  : CDefaultFilter(pEventHandler, pSettingsStore, pInterface, iID, szName) {
 }
 
-void COneDimensionalFilter::ApplyTransform(myint &iDasherX, myint &iDasherY) {
 
-  iLastY = iDasherY;
+void COneDimensionalFilter::ApplyTransform(myint &iDasherX, myint &iDasherY) {
 
   double disty,circlesize,yfullrange,yforwardrange,angle,ellipse_eccentricity,ybackrange,yb,x;	
   
diff --git a/Src/DasherCore/OneDimensionalFilter.h b/Src/DasherCore/OneDimensionalFilter.h
index e028d04..9422635 100644
--- a/Src/DasherCore/OneDimensionalFilter.h
+++ b/Src/DasherCore/OneDimensionalFilter.h
@@ -8,13 +8,10 @@
 namespace Dasher {
 class COneDimensionalFilter : public CDefaultFilter {
  public:
-  COneDimensionalFilter(Dasher::CEventHandler * pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface);
-
- private:
+//  COneDimensionalFilter(Dasher::CEventHandler * pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface, CDasherModel *m_pDasherModel);
+  COneDimensionalFilter(Dasher::CEventHandler * pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface,  ModuleID_t iID = 4, const char *szName = _("One Dimensional Mode"));
+ protected:
    virtual void ApplyTransform(myint &iDasherX, myint &iDasherY);
-
-   int iLastY;
-   int iOffset;
 };
 }
 /// @}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]