[dasher: 22/43] Remove pAdded+pNumDeleted from Output, Undo, Timer(Impl), etc.



commit d7325a812466602dcf1317fd67ec8219c85b00ea
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Mon Mar 28 22:24:37 2011 +0100

    Remove pAdded+pNumDeleted from Output, Undo, Timer(Impl), etc.
    
    As unnecessary after change to UserLogBase.
    other beneficiaries inc. CDasherModel::NextScheduledStep,OneStepTowards,OutputTo
    Also standardize on 'unsigned long Time' for Timer() methods (was int)
      - TODO, do the same for KeyDown/Up, etc.?

 Src/DasherCore/AlphabetManager.cpp        |   11 +++++------
 Src/DasherCore/AlphabetManager.h          |    8 ++++----
 Src/DasherCore/ButtonMode.cpp             |    4 ++--
 Src/DasherCore/ButtonMode.h               |    2 +-
 Src/DasherCore/ClickFilter.cpp            |    4 ++--
 Src/DasherCore/ClickFilter.h              |    2 +-
 Src/DasherCore/ControlManager.cpp         |    2 +-
 Src/DasherCore/ControlManager.h           |    2 +-
 Src/DasherCore/ConversionManager.cpp      |    6 ++----
 Src/DasherCore/ConversionManager.h        |    4 ++--
 Src/DasherCore/DasherButtons.cpp          |    4 ++--
 Src/DasherCore/DasherButtons.h            |    2 +-
 Src/DasherCore/DasherInterfaceBase.cpp    |    2 +-
 Src/DasherCore/DasherModel.cpp            |   24 +++++++++++-------------
 Src/DasherCore/DasherModel.h              |    8 ++++----
 Src/DasherCore/DasherNode.h               |    4 ++--
 Src/DasherCore/DefaultFilter.cpp          |    4 ++--
 Src/DasherCore/DefaultFilter.h            |    2 +-
 Src/DasherCore/DynamicFilter.cpp          |    6 +++---
 Src/DasherCore/DynamicFilter.h            |    4 ++--
 Src/DasherCore/InputFilter.h              |    2 +-
 Src/DasherCore/OneButtonDynamicFilter.cpp |    4 ++--
 Src/DasherCore/OneButtonDynamicFilter.h   |    2 +-
 Src/DasherCore/OneButtonFilter.cpp        |    4 ++--
 Src/DasherCore/OneButtonFilter.h          |    2 +-
 Src/DasherCore/StylusFilter.cpp           |    6 +++---
 Src/DasherCore/StylusFilter.h             |    2 +-
 Src/DasherCore/TwoButtonDynamicFilter.cpp |    4 ++--
 Src/DasherCore/TwoButtonDynamicFilter.h   |    2 +-
 Src/DasherCore/TwoPushDynamicFilter.cpp   |    4 ++--
 Src/DasherCore/TwoPushDynamicFilter.h     |    2 +-
 31 files changed, 67 insertions(+), 72 deletions(-)
---
diff --git a/Src/DasherCore/AlphabetManager.cpp b/Src/DasherCore/AlphabetManager.cpp
index 6a65886..f776383 100644
--- a/Src/DasherCore/AlphabetManager.cpp
+++ b/Src/DasherCore/AlphabetManager.cpp
@@ -208,7 +208,7 @@ CAlphabetManager::CAlphBase::CAlphBase(CDasherNode *pParent, int iOffset, unsign
 : CDasherNode(pParent, iOffset, iLbnd, iHbnd, iColour, pLabel), m_pMgr(pMgr) {
 }
 
-void CAlphabetManager::CAlphBase::Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization) {
+void CAlphabetManager::CAlphBase::Output() {
   if (m_pMgr->m_pLastOutput && m_pMgr->m_pLastOutput == Parent())
     m_pMgr->m_pLastOutput=this;
   //Case where lastOutput != Parent to subclasses, if they want to.
@@ -216,7 +216,7 @@ void CAlphabetManager::CAlphBase::Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int
   // will register as a context switch and write out an empty/default context.
 }
 
-void CAlphabetManager::CAlphBase::Undo(int *pNumDeleted) {
+void CAlphabetManager::CAlphBase::Undo() {
   if (m_pMgr->m_pLastOutput==this) m_pMgr->m_pLastOutput = Parent();
 }
 CAlphabetManager::CAlphNode::CAlphNode(CDasherNode *pParent, int iOffset, unsigned int iLbnd, unsigned int iHbnd, int iColour, CDasherScreen::Label *pLabel, CAlphabetManager *pMgr)
@@ -545,7 +545,7 @@ int CAlphabetManager::CSymbolNode::numChars() {
   return (outputText()=="\r\n") ? 2 : 1;
 }
 
-void CAlphabetManager::CSymbolNode::Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization) {
+void CAlphabetManager::CSymbolNode::Output() {
   if (m_pMgr->m_pNCManager->GetBoolParameter(BP_LM_ADAPTIVE)) {
     if (m_pMgr->m_pLastOutput != Parent()) {
       //Context changed. Flush to disk the old context + text written in it...
@@ -577,7 +577,7 @@ SymbolProb CAlphabetManager::CSymbolNode::GetSymbolProb(int iNormalization) cons
   return Dasher::SymbolProb(iSymbol, m_pMgr->m_pAlphabet->GetText(iSymbol), Range() / (double)iNormalization);
 }
 
-void CAlphabetManager::CSymbolNode::Undo(int *pNumDeleted) {
+void CAlphabetManager::CSymbolNode::Undo() {
   DASHER_ASSERT(GetFlag(NF_SEEN));
   if (m_pMgr->m_pNCManager->GetBoolParameter(BP_LM_ADAPTIVE)) {
     if (m_pMgr->m_pLastOutput == this) {
@@ -590,10 +590,9 @@ void CAlphabetManager::CSymbolNode::Undo(int *pNumDeleted) {
         m_pMgr->m_pLastOutput = Parent();
       }
     }
-  } else CAlphBase::Undo(pNumDeleted);
+  } else CAlphBase::Undo();
   Dasher::CEditEvent oEvent(2, outputText(), this);
   m_pMgr->m_pNCManager->InsertEvent(&oEvent);
-  if (pNumDeleted) (*pNumDeleted)++;
 }
 
 CDasherNode *CAlphabetManager::CGroupNode::RebuildParent() {
diff --git a/Src/DasherCore/AlphabetManager.h b/Src/DasherCore/AlphabetManager.h
index 709637d..01fbf12 100644
--- a/Src/DasherCore/AlphabetManager.h
+++ b/Src/DasherCore/AlphabetManager.h
@@ -104,9 +104,9 @@ namespace Dasher {
       /// \param pParent parent of the symbol node to create; could be the previous root, or an intervening node (e.g. group)
       virtual CDasherNode *RebuildGroup(CAlphNode *pParent, unsigned int iLbnd, unsigned int iHbnd, int iBkgCol, const SGroupInfo *pInfo);
       ///Just keep track of the last node output (for training file purposes)
-      void Undo(int *pNumDeleted);
+      void Undo();
       ///Just keep track of the last node output (for training file purposes)
-      void Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization);
+      void Output();
     protected:
       ///Called in process of rebuilding parent: fill in the hierarchy _beneath_ the
       /// the previous root node, by calling IterateChildGroups passing this node as
@@ -148,8 +148,8 @@ namespace Dasher {
 
       ///Create the children of this node, by starting traversal of the alphabet from the top
       virtual void PopulateChildren();
-      virtual void Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization);
-      virtual void Undo(int *pNumDeleted);
+      virtual void Output();
+      virtual void Undo();
       ///Override to provide symbol number, probability, _edit_ text from alphabet
       virtual SymbolProb GetSymbolProb(int iNormalization) const;
 
diff --git a/Src/DasherCore/ButtonMode.cpp b/Src/DasherCore/ButtonMode.cpp
index 9ff9714..39e5c9a 100644
--- a/Src/DasherCore/ButtonMode.cpp
+++ b/Src/DasherCore/ButtonMode.cpp
@@ -178,14 +178,14 @@ bool CButtonMode::DecorateView(CDasherView *pView, CDasherInput *pInput) {
   return bRV;
 }
 
-bool CButtonMode::Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) {
+bool CButtonMode::Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol) {
   bool m_bOldHighlight(m_bHighlight);
   m_bHighlight = (Time - m_iLastTime < 200);
 
   if(m_bOldHighlight != m_bHighlight)
     m_bDecorationChanged = true;
 
-  return CDasherButtons::Timer(Time, pView, pInput, pModel, pAdded, pNumDeleted, pol);
+  return CDasherButtons::Timer(Time, pView, pInput, pModel, pol);
 }
 
 void CButtonMode::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY)
diff --git a/Src/DasherCore/ButtonMode.h b/Src/DasherCore/ButtonMode.h
index db8cbcb..062a5c2 100644
--- a/Src/DasherCore/ButtonMode.h
+++ b/Src/DasherCore/ButtonMode.h
@@ -25,7 +25,7 @@ class CButtonMode : public CDasherButtons
   CButtonMode(Dasher::CEventHandler * pEventHandler, CSettingsStore * pSettingsStore, CDasherInterfaceBase *pInterface, bool bMenu, int iID, const char *szName);
 
   virtual void HandleEvent(Dasher::CEvent * pEvent);
-  bool Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol);
   bool DecorateView(CDasherView *pView, CDasherInput *pInput);
 
   //override to get mouse clicks/taps back again
diff --git a/Src/DasherCore/ClickFilter.cpp b/Src/DasherCore/ClickFilter.cpp
index eca5d04..3c69cb9 100644
--- a/Src/DasherCore/ClickFilter.cpp
+++ b/Src/DasherCore/ClickFilter.cpp
@@ -76,8 +76,8 @@ void CClickFilter::AdjustZoomCoords(myint &iDasherX, myint &iDasherY, CDasherVie
   }
 }
 
-bool CClickFilter::Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) {
-  return pModel->NextScheduledStep(Time, pAdded, pNumDeleted);
+bool CClickFilter::Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol) {
+  return pModel->NextScheduledStep(Time);
 }
 
 void CClickFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY) {
diff --git a/Src/DasherCore/ClickFilter.h b/Src/DasherCore/ClickFilter.h
index 158f984..36dedd7 100644
--- a/Src/DasherCore/ClickFilter.h
+++ b/Src/DasherCore/ClickFilter.h
@@ -12,7 +12,7 @@ class CClickFilter : public CInputFilter {
     : CInputFilter(pEventHandler, pSettingsStore, pInterface, 7, _("Click Mode")) { };
 
   virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput);
-  virtual bool Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pDasherModel, CExpansionPolicy **pol);
   virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog, bool bPos, int iX, int iY);
   virtual bool GetSettings(SModuleSettings **pSettings, int *iCount);
 
diff --git a/Src/DasherCore/ControlManager.cpp b/Src/DasherCore/ControlManager.cpp
index 1b2d7b9..f8c6d67 100644
--- a/Src/DasherCore/ControlManager.cpp
+++ b/Src/DasherCore/ControlManager.cpp
@@ -121,7 +121,7 @@ int CControlBase::CContNode::ExpectedNumChildren() {
   return m_pTemplate->successors.size();
 }
 
-void CControlBase::CContNode::Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization ) {
+void CControlBase::CContNode::Output() {
   m_pTemplate->happen(this);
 }
 
diff --git a/Src/DasherCore/ControlManager.h b/Src/DasherCore/ControlManager.h
index 42ffa27..222342a 100644
--- a/Src/DasherCore/ControlManager.h
+++ b/Src/DasherCore/ControlManager.h
@@ -70,7 +70,7 @@ namespace Dasher {
       virtual void PopulateChildren();
       virtual int ExpectedNumChildren();
 
-      virtual void Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization );
+      virtual void Output();
 
       virtual void Enter();
       virtual void Leave();
diff --git a/Src/DasherCore/ConversionManager.cpp b/Src/DasherCore/ConversionManager.cpp
index 917ab44..f475f0e 100644
--- a/Src/DasherCore/ConversionManager.cpp
+++ b/Src/DasherCore/ConversionManager.cpp
@@ -154,7 +154,7 @@ void CConversionManager::CConvNode::GetContext(CDasherInterfaceBase *pInterface,
   CDasherNode::GetContext(pInterface, pAlphabetMap, vContextSymbols, iOffset, iLength);
 }
 
-void CConversionManager::CConvNode::Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization) {
+void CConversionManager::CConvNode::Output() {
   // TODO: Reimplement this
   //  m_pNCManager->m_bContextSensitive = true;
 
@@ -186,9 +186,7 @@ void CConversionManager::CConvNode::Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, i
   }
 }
 
-void CConversionManager::CConvNode::Undo(int *pNumDeleted) {
-  //ACL note: possibly ought to update pNumDeleted here if non-null,
-  // but conversion symbols were not logged by old code so am not starting now!
+void CConversionManager::CConvNode::Undo() {
   SCENode *pCurrentSCENode(pSCENode);
 
   if(pCurrentSCENode) {
diff --git a/Src/DasherCore/ConversionManager.h b/Src/DasherCore/ConversionManager.h
index ab89a8f..6c4e490 100644
--- a/Src/DasherCore/ConversionManager.h
+++ b/Src/DasherCore/ConversionManager.h
@@ -105,13 +105,13 @@ namespace Dasher {
     /// moves under the crosshair
     ///
 
-    virtual void Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization);
+    virtual void Output();
 
     ///
     /// Called when a node is left backwards
     ///
 
-    virtual void Undo(int *pNumDeleted);
+    virtual void Undo();
 
     protected:
       CConversionManager *m_pMgr;
diff --git a/Src/DasherCore/DasherButtons.cpp b/Src/DasherCore/DasherButtons.cpp
index 05aed43..f581969 100644
--- a/Src/DasherCore/DasherButtons.cpp
+++ b/Src/DasherCore/DasherButtons.cpp
@@ -81,7 +81,7 @@ void CDasherButtons::DirectKeyDown(int iTime, int iId, CDasherView *pView, CDash
   pModel->ScheduleZoom(iTime, m_pBoxes[iActiveBox].iTop,m_pBoxes[iActiveBox].iBottom);
 }
 
-bool CDasherButtons::Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) {
+bool CDasherButtons::Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol) {
   if (m_bMenu && GetLongParameter(LP_BUTTON_SCAN_TIME) &&
       Time > m_iScanTime) {
     m_iScanTime = Time + GetLongParameter(LP_BUTTON_SCAN_TIME);
@@ -97,7 +97,7 @@ bool CDasherButtons::Timer(int Time, CDasherView *pView, CDasherInput *pInput, C
   pInput->GetDasherCoords(iDasherX, iDasherY, pView);
   // ----
 
-  return pModel->NextScheduledStep(Time, pAdded, pNumDeleted);
+  return pModel->NextScheduledStep(Time);
 }
 
 void CDasherButtons::NewDrawGoTo(CDasherView *pView, myint iDasherMin, myint iDasherMax, bool bActive) {
diff --git a/Src/DasherCore/DasherButtons.h b/Src/DasherCore/DasherButtons.h
index d2d9e7a..07aa13f 100644
--- a/Src/DasherCore/DasherButtons.h
+++ b/Src/DasherCore/DasherButtons.h
@@ -29,7 +29,7 @@ class CDasherButtons : public CInputFilter
   virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput)=0;
   
   void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
-  bool Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
   void Activate();
   
   struct SBoxInfo {
diff --git a/Src/DasherCore/DasherInterfaceBase.cpp b/Src/DasherCore/DasherInterfaceBase.cpp
index ebc55bb..77a23e5 100644
--- a/Src/DasherCore/DasherInterfaceBase.cpp
+++ b/Src/DasherCore/DasherInterfaceBase.cpp
@@ -530,7 +530,7 @@ void CDasherInterfaceBase::NewFrame(unsigned long iTime, bool bForceRedraw) {
   
       //1. Move around in the model
       if(m_pInputFilter) {
-        bChanged = m_pInputFilter->Timer(iTime, m_pDasherView, m_pInput, m_pDasherModel, 0, 0, &pol);
+        bChanged = m_pInputFilter->Timer(iTime, m_pDasherView, m_pInput, m_pDasherModel, &pol);
       }
       //2. Render...
       //check: if we were paused before, and the input filter didn't unpause,
diff --git a/Src/DasherCore/DasherModel.cpp b/Src/DasherCore/DasherModel.cpp
index 844c5ec..d46c4a1 100644
--- a/Src/DasherCore/DasherModel.cpp
+++ b/Src/DasherCore/DasherModel.cpp
@@ -390,7 +390,7 @@ void CDasherModel::Get_new_root_coords(dasherint X, dasherint Y, dasherint &r1,
   r2 = ((R2 - C) * Y2) / (y2 - y1) + C;
 }
 
-bool CDasherModel::NextScheduledStep(unsigned long iTime, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted)
+bool CDasherModel::NextScheduledStep(unsigned long iTime)
 {
   DASHER_ASSERT (!GetBoolParameter(BP_DASHER_PAUSED) || m_deGotoQueue.size()==0);
   if (m_deGotoQueue.size() == 0) return false;
@@ -399,22 +399,22 @@ bool CDasherModel::NextScheduledStep(unsigned long iTime, Dasher::VECTOR_SYMBOL_
   iNewMax = m_deGotoQueue.front().iN2;
   m_deGotoQueue.pop_front();
 
-  UpdateBounds(iNewMin, iNewMax, iTime, pAdded, pNumDeleted);
+  UpdateBounds(iNewMin, iNewMax, iTime);
   if (m_deGotoQueue.size() == 0) SetBoolParameter(BP_DASHER_PAUSED, true);
   return true;
 }
 
-void CDasherModel::OneStepTowards(myint miMousex, myint miMousey, unsigned long iTime, Dasher::VECTOR_SYMBOL_PROB* pAdded, int* pNumDeleted) {
+void CDasherModel::OneStepTowards(myint miMousex, myint miMousey, unsigned long iTime) {
   DASHER_ASSERT(!GetBoolParameter(BP_DASHER_PAUSED));
 
   myint iNewMin, iNewMax;
   // works out next viewpoint
   Get_new_root_coords(miMousex, miMousey, iNewMin, iNewMax, iTime);
 
-  UpdateBounds(iNewMin, iNewMax, iTime, pAdded, pNumDeleted);
+  UpdateBounds(iNewMin, iNewMax, iTime);
 }
 
-void CDasherModel::UpdateBounds(myint newRootmin, myint newRootmax, unsigned long iTime, Dasher::VECTOR_SYMBOL_PROB* pAdded, int* pNumDeleted) {
+void CDasherModel::UpdateBounds(myint newRootmin, myint newRootmax, unsigned long iTime) {
 
   m_dTotalNats += log((newRootmax - newRootmin) / static_cast<double>(m_Rootmax - m_Rootmin));
 
@@ -443,7 +443,7 @@ void CDasherModel::UpdateBounds(myint newRootmin, myint newRootmax, unsigned lon
         //first we're gonna have to force it to be output, as a non-output root won't work...
         if (!pChild->GetFlag(NF_SEEN)) {
           DASHER_ASSERT(m_pLastOutput == m_Root);
-          OutputTo(pChild, pAdded, pNumDeleted);
+          OutputTo(pChild);
         }
         //we need to update the target coords (newRootmin,newRootmax)
         // to reflect the new coordinate system based upon pChild as root.
@@ -489,15 +489,15 @@ void CDasherModel::RecordFrame(unsigned long Time) {
     pTeacher->NewFrame(Time);
 }
 
-void CDasherModel::OutputTo(CDasherNode *pNewNode, Dasher::VECTOR_SYMBOL_PROB* pAdded, int* pNumDeleted) {
+void CDasherModel::OutputTo(CDasherNode *pNewNode) {
   //first, recurse back up to last seen node (must be processed ancestor-first)
   if (pNewNode && !pNewNode->GetFlag(NF_SEEN)) {
-    OutputTo(pNewNode->Parent(), pAdded, pNumDeleted);
+    OutputTo(pNewNode->Parent());
     if (pNewNode->Parent()) pNewNode->Parent()->Leave();
     pNewNode->Enter();
 
     m_pLastOutput = pNewNode;
-    pNewNode->Output(pAdded, GetLongParameter(LP_NORMALIZATION));
+    pNewNode->Output();
     pNewNode->SetFlag(NF_SEEN, true); //becomes NF_SEEN after output.
 
     // If the node we are outputting is the last one in a game target sentence, then
@@ -511,7 +511,7 @@ void CDasherModel::OutputTo(CDasherNode *pNewNode, Dasher::VECTOR_SYMBOL_PROB* p
       // if pNewNode is null, m_pLastOutput is not; else, pNewNode has been seen,
       // so we should encounter it on the way back out to the root, _before_ null
       m_pLastOutput->SetFlag(NF_COMMITTED, false);
-      m_pLastOutput->Undo(pNumDeleted);
+      m_pLastOutput->Undo();
       m_pLastOutput->Leave(); //Should we? I think so, but the old code didn't...?
       m_pLastOutput->SetFlag(NF_SEEN, false);
 
@@ -598,9 +598,7 @@ void CDasherModel::RenderToView(CDasherView *pView, CExpansionPolicy &policy) {
     }
   //////////////////////////////////////
 
-  // TODO: Fix up stats
-  // TODO: Is this the right way to handle this?
-  OutputTo(pOutput, NULL, NULL);
+  OutputTo(pOutput);
 
   while (CDasherNode *pNewRoot = m_Root->onlyChildRendered) {
 #ifdef DEBUG
diff --git a/Src/DasherCore/DasherModel.h b/Src/DasherCore/DasherModel.h
index 30f0780..f1d6d4b 100644
--- a/Src/DasherCore/DasherModel.h
+++ b/Src/DasherCore/DasherModel.h
@@ -77,7 +77,7 @@ class Dasher::CDasherModel:public Dasher::CFrameRate, private NoClones
   ///
   /// Update the root location with *one step* towards the specified
   /// co-ordinates - used by timer callbacks (for non-button modes)
-  void OneStepTowards(myint, myint, unsigned long iTime, Dasher::VECTOR_SYMBOL_PROB* pAdded = NULL, int* pNumDeleted = NULL);
+  void OneStepTowards(myint, myint, unsigned long iTime);
 
   ///
   /// Notify the framerate class that a new frame has occurred
@@ -151,7 +151,7 @@ class Dasher::CDasherModel:public Dasher::CFrameRate, private NoClones
   /// still-in-progress zoom scheduled by ScheduleZoom (does nothing
   /// if no steps remaining / no zoom scheduled).
   ///
-  bool NextScheduledStep(unsigned long iTime, Dasher::VECTOR_SYMBOL_PROB* pAdded = NULL, int *pNumDeleted = NULL);
+  bool NextScheduledStep(unsigned long iTime);
 
   /// @}
 
@@ -198,7 +198,7 @@ class Dasher::CDasherModel:public Dasher::CFrameRate, private NoClones
 
   /// Common portion of OneStepTowards / NextScheduledStep, taking
   /// bounds for the root node in the next frame.
-  void UpdateBounds(myint iNewMin, myint iNewMax, unsigned long iTime, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted);
+  void UpdateBounds(myint iNewMin, myint iNewMax, unsigned long iTime);
 
   /// Struct representing intermediate stages in the goto queue
   ///
@@ -302,7 +302,7 @@ class Dasher::CDasherModel:public Dasher::CFrameRate, private NoClones
   /// deletes from m_pLastOutput back to closest ancestor of pNewNode,
   /// then outputs from that ancestor to that node
   /// @param pNewNode innermost node now covering the crosshair
-  void OutputTo(CDasherNode *pNewNode, Dasher::VECTOR_SYMBOL_PROB* pAdded, int* pNumDeleted);
+  void OutputTo(CDasherNode *pNewNode);
 
 
   ///
diff --git a/Src/DasherCore/DasherNode.h b/Src/DasherCore/DasherNode.h
index 0d80e9f..b8c60d3 100644
--- a/Src/DasherCore/DasherNode.h
+++ b/Src/DasherCore/DasherNode.h
@@ -231,8 +231,8 @@ class Dasher::CDasherNode:private NoClones {
   /// moves under the crosshair
   ///
 
-  virtual void Output(Dasher::VECTOR_SYMBOL_PROB* pAdded, int iNormalization) {};
-  virtual void Undo(int *pNumDeleted) {};
+  virtual void Output() {};
+  virtual void Undo() {};
 
   ///Called by logging code to get information about node which has just been
   /// output. Subclasses performing output, should override to return appropriate
diff --git a/Src/DasherCore/DefaultFilter.cpp b/Src/DasherCore/DefaultFilter.cpp
index 787c7f3..6924f92 100644
--- a/Src/DasherCore/DefaultFilter.cpp
+++ b/Src/DasherCore/DefaultFilter.cpp
@@ -104,7 +104,7 @@ bool CDefaultFilter::DecorateView(CDasherView *pView, CDasherInput *pInput) {
   return bDidSomething;
 }
 
-bool CDefaultFilter::Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) {
+bool CDefaultFilter::Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol) {
   if (!(m_bGotMouseCoords = pInput->GetDasherCoords(m_iLastX, m_iLastY, pView))) {
     m_pInterface->Stop(); //does nothing if already paused
     return false;
@@ -127,7 +127,7 @@ bool CDefaultFilter::Timer(int Time, CDasherView *pView, CDasherInput *pInput, C
       }
     }
 
-    m_pDasherModel->OneStepTowards(m_iLastX,m_iLastY, Time, pAdded, pNumDeleted);
+    m_pDasherModel->OneStepTowards(m_iLastX,m_iLastY, Time);
     bDidSomething = true;
 
     m_pAutoSpeedControl->SpeedControl(m_iLastX, m_iLastY, pView);
diff --git a/Src/DasherCore/DefaultFilter.h b/Src/DasherCore/DefaultFilter.h
index 2cafd09..b3670e4 100644
--- a/Src/DasherCore/DefaultFilter.h
+++ b/Src/DasherCore/DefaultFilter.h
@@ -17,7 +17,7 @@ class CDefaultFilter : public CInputFilter {
   virtual void HandleEvent(Dasher::CEvent * pEvent);
 
   virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput);
-  virtual bool Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol);
   virtual void KeyDown(int iTime, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
   virtual void Activate();
   virtual void Deactivate();
diff --git a/Src/DasherCore/DynamicFilter.cpp b/Src/DasherCore/DynamicFilter.cpp
index 95a0315..8f5a741 100644
--- a/Src/DasherCore/DynamicFilter.cpp
+++ b/Src/DasherCore/DynamicFilter.cpp
@@ -30,7 +30,7 @@ CDynamicFilter::CDynamicFilter(Dasher::CEventHandler * pEventHandler, CSettingsS
   pause();
 }
 
-bool CDynamicFilter::Timer(int iTime, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol)
+bool CDynamicFilter::Timer(unsigned long iTime, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol)
 {
   if(m_bKeyDown && !m_bKeyHandled && ((iTime - m_iKeyDownTime) > GetLongParameter(LP_HOLD_TIME))) {
     Event(iTime, m_iHeldId, 1, m_pDasherModel, m_pUserLog);
@@ -39,7 +39,7 @@ bool CDynamicFilter::Timer(int iTime, CDasherView *pDasherView, CDasherInput *pI
   }
   if (isPaused()) return false;
   if (isReversing()) {
-    m_pDasherModel->OneStepTowards(41943,2048, iTime, pAdded, pNumDeleted);
+    m_pDasherModel->OneStepTowards(41943,2048, iTime);
     return true;
   }
   //moving forwards. Check auto speed control...
@@ -50,7 +50,7 @@ bool CDynamicFilter::Timer(int iTime, CDasherView *pDasherView, CDasherInput *pI
         SetLongParameter(LP_MAX_BITRATE, GetLongParameter(LP_MAX_BITRATE) * (1.0 + GetLongParameter(LP_DYNAMIC_SPEED_INC)/100.0));
 	  m_uSpeedControlTime = uTime + 1000*GetLongParameter(LP_DYNAMIC_SPEED_FREQ);
   }
-  return TimerImpl(iTime, pDasherView, m_pDasherModel, pAdded, pNumDeleted, pol);
+  return TimerImpl(iTime, pDasherView, m_pDasherModel, pol);
 }
 
 void CDynamicFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
diff --git a/Src/DasherCore/DynamicFilter.h b/Src/DasherCore/DynamicFilter.h
index 4d2f1b5..57e42b5 100644
--- a/Src/DasherCore/DynamicFilter.h
+++ b/Src/DasherCore/DynamicFilter.h
@@ -34,7 +34,7 @@ class CDynamicFilter : public CInputFilter {
   virtual bool supportsPause() {return true;}
 
   ///when reversing, backs off; when paused, does nothing; when running, delegates to TimerImpl
-  virtual bool Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
 
   virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
   virtual void KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
@@ -55,7 +55,7 @@ class CDynamicFilter : public CInputFilter {
   virtual void reverse();
   virtual void run();
 
-  virtual bool TimerImpl(int Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) = 0;
+  virtual bool TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol) = 0;
 
   private:
     int m_iState; // 0 = paused, 1 = reversing, >=2 = running (extensible by subclasses)
diff --git a/Src/DasherCore/InputFilter.h b/Src/DasherCore/InputFilter.h
index b94ebd6..3925fa8 100644
--- a/Src/DasherCore/InputFilter.h
+++ b/Src/DasherCore/InputFilter.h
@@ -29,7 +29,7 @@ class CInputFilter : public CDasherModule {
     KeyUp(Time, iId, pDasherView, pInput, pModel);
   };
 
-  virtual bool Timer(int Time, CDasherView *m_pDasherView, CDasherInput *pInput, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol)=0;// { return false; };
+  virtual bool Timer(unsigned long Time, CDasherView *m_pDasherView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol)=0;// { return false; };
 
   virtual void Activate() {};
   virtual void Deactivate() {};
diff --git a/Src/DasherCore/OneButtonDynamicFilter.cpp b/Src/DasherCore/OneButtonDynamicFilter.cpp
index 3bdb1a4..348533d 100644
--- a/Src/DasherCore/OneButtonDynamicFilter.cpp
+++ b/Src/DasherCore/OneButtonDynamicFilter.cpp
@@ -115,8 +115,8 @@ void COneButtonDynamicFilter::KeyUp(int Time, int iId, CDasherView *pDasherView,
     CInputFilter::KeyUp(Time, iId, pDasherView, pInput, pModel, bPos, iX, iY);
 }
 
-bool COneButtonDynamicFilter::TimerImpl(int Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) {
-  m_pDasherModel->OneStepTowards(m_iTargetX[m_iTarget], m_iTargetY[m_iTarget], Time, pAdded, pNumDeleted);
+bool COneButtonDynamicFilter::TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol) {
+  m_pDasherModel->OneStepTowards(m_iTargetX[m_iTarget], m_iTargetY[m_iTarget], Time);
   return true;
 }
 
diff --git a/Src/DasherCore/OneButtonDynamicFilter.h b/Src/DasherCore/OneButtonDynamicFilter.h
index 0f1a81c..87c1104 100644
--- a/Src/DasherCore/OneButtonDynamicFilter.h
+++ b/Src/DasherCore/OneButtonDynamicFilter.h
@@ -41,7 +41,7 @@ class COneButtonDynamicFilter : public CButtonMultiPress {
 
  private:
   unsigned int maxClickCount() {return 2;} //double-click to reverse
-  virtual bool TimerImpl(int Time, CDasherView *pView, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool TimerImpl(unsigned long Time, CDasherView *pView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
   virtual void ActionButton(int iTime, int iButton, int iType, CDasherModel *pModel, CUserLogBase *pUserLog);
   
   int m_iTarget;
diff --git a/Src/DasherCore/OneButtonFilter.cpp b/Src/DasherCore/OneButtonFilter.cpp
index 8bfadf9..29a7675 100644
--- a/Src/DasherCore/OneButtonFilter.cpp
+++ b/Src/DasherCore/OneButtonFilter.cpp
@@ -52,7 +52,7 @@ bool COneButtonFilter::DecorateView(CDasherView *pView, CDasherInput *pInput) {
   return true;
 }
 
-bool COneButtonFilter::Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) {
+bool COneButtonFilter::Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol) {
 
   if(bStarted) {
     iLocation = (Time - iStartTime) * 4096 / GetLongParameter(LP_STATIC1B_TIME);
@@ -67,7 +67,7 @@ bool COneButtonFilter::Timer(int Time, CDasherView *pView, CDasherInput *pInput,
     }
   }
 
-  return m_pDasherModel->NextScheduledStep(Time, pAdded, pNumDeleted);
+  return m_pDasherModel->NextScheduledStep(Time);
 }
 
 void COneButtonFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
diff --git a/Src/DasherCore/OneButtonFilter.h b/Src/DasherCore/OneButtonFilter.h
index 35bc3ed..4f64964 100644
--- a/Src/DasherCore/OneButtonFilter.h
+++ b/Src/DasherCore/OneButtonFilter.h
@@ -12,7 +12,7 @@ class COneButtonFilter : public CInputFilter {
   ~COneButtonFilter();
 
   virtual bool DecorateView(CDasherView *pView, CDasherInput *pInput);
-  virtual bool Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
   virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
   bool GetSettings(SModuleSettings **pSettings, int *iCount);
  private:
diff --git a/Src/DasherCore/StylusFilter.cpp b/Src/DasherCore/StylusFilter.cpp
index b401cb3..436ca46 100644
--- a/Src/DasherCore/StylusFilter.cpp
+++ b/Src/DasherCore/StylusFilter.cpp
@@ -10,16 +10,16 @@ CStylusFilter::CStylusFilter(Dasher::CEventHandler *pEventHandler, CSettingsStor
   : CDefaultFilter(pEventHandler, pSettingsStore, pInterface, iID, szName) {
 }
 
-bool CStylusFilter::Timer(int iTime, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol)
+bool CStylusFilter::Timer(unsigned long iTime, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol)
 {
   //First, try to continue any zoom scheduled by a previous click...
-  if (pModel->NextScheduledStep(iTime, pAdded, pNumDeleted)) {
+  if (pModel->NextScheduledStep(iTime)) {
     //note that this skips the rest of CDefaultFilter::Timer;
     //however, given we're paused, this is only the Start Handler,
     //which we're not using anyway.
     return true;
   }
-  return CDefaultFilter::Timer(iTime, pView, pInput, pModel, pAdded, pNumDeleted, pol);
+  return CDefaultFilter::Timer(iTime, pView, pInput, pModel, pol);
 }
 
 void CStylusFilter::KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog) {
diff --git a/Src/DasherCore/StylusFilter.h b/Src/DasherCore/StylusFilter.h
index 61df611..6c6394c 100644
--- a/Src/DasherCore/StylusFilter.h
+++ b/Src/DasherCore/StylusFilter.h
@@ -12,7 +12,7 @@ class CStylusFilter : public CDefaultFilter {
   ///Override DefaultFilter (which supports pause), as we don't
   /// - motion requires continually holding stylus against screen
   virtual bool supportsPause() {return false;}
-  virtual bool Timer(int Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol);
   virtual void KeyDown(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CUserLogBase *pUserLog);
   virtual void KeyUp(int iTime, int iId, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel);
  protected:
diff --git a/Src/DasherCore/TwoButtonDynamicFilter.cpp b/Src/DasherCore/TwoButtonDynamicFilter.cpp
index a792db9..0c26c1b 100644
--- a/Src/DasherCore/TwoButtonDynamicFilter.cpp
+++ b/Src/DasherCore/TwoButtonDynamicFilter.cpp
@@ -111,8 +111,8 @@ void CTwoButtonDynamicFilter::KeyUp(int Time, int iId, CDasherView *pView, CDash
 		CInputFilter::KeyUp(Time, iId, pView, pInput, pModel, bPos, iX, iY);
 }
 
-bool CTwoButtonDynamicFilter::TimerImpl(int Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol) {
-  m_pDasherModel->OneStepTowards(100,2048, Time, pAdded, pNumDeleted);
+bool CTwoButtonDynamicFilter::TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol) {
+  m_pDasherModel->OneStepTowards(100,2048, Time);
   return true;
 }
 
diff --git a/Src/DasherCore/TwoButtonDynamicFilter.h b/Src/DasherCore/TwoButtonDynamicFilter.h
index 03b343d..6fd3445 100644
--- a/Src/DasherCore/TwoButtonDynamicFilter.h
+++ b/Src/DasherCore/TwoButtonDynamicFilter.h
@@ -55,7 +55,7 @@ class CTwoButtonDynamicFilter : public CButtonMultiPress {
 	
  private:
   unsigned int maxClickCount() {return GetBoolParameter(BP_2B_INVERT_DOUBLE) ? 3 : 2;}
-  virtual bool TimerImpl(int Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
   virtual void ActionButton(int iTime, int iButton, int iType, CDasherModel *pModel, CUserLogBase *pUserLog);
   double m_dLagMul;
 
diff --git a/Src/DasherCore/TwoPushDynamicFilter.cpp b/Src/DasherCore/TwoPushDynamicFilter.cpp
index 4ef4028..8f09f59 100644
--- a/Src/DasherCore/TwoPushDynamicFilter.cpp
+++ b/Src/DasherCore/TwoPushDynamicFilter.cpp
@@ -227,7 +227,7 @@ bool doSet(int &var, const int val)
   return true;
 }
 
-bool CTwoPushDynamicFilter::TimerImpl(int iTime, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol)
+bool CTwoPushDynamicFilter::TimerImpl(unsigned long iTime, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol)
 {
   DASHER_ASSERT(isRunning());
   if (m_dNatsSinceFirstPush > -std::numeric_limits<double>::infinity()) // first button has been pushed
@@ -263,7 +263,7 @@ bool CTwoPushDynamicFilter::TimerImpl(int iTime, CDasherView *m_pDasherView, CDa
       m_bDecorationChanged |= doSet(m_iActiveMarker, 1 /*down*/);
     else m_bDecorationChanged |= doSet(m_iActiveMarker, -1 /*in middle (neither/both) or too short*/);
   }
-  m_pDasherModel->OneStepTowards(100, 2048, iTime, pAdded, pNumDeleted);
+  m_pDasherModel->OneStepTowards(100, 2048, iTime);
   return true;
 }
 
diff --git a/Src/DasherCore/TwoPushDynamicFilter.h b/Src/DasherCore/TwoPushDynamicFilter.h
index c02c7b4..bfb7321 100644
--- a/Src/DasherCore/TwoPushDynamicFilter.h
+++ b/Src/DasherCore/TwoPushDynamicFilter.h
@@ -42,7 +42,7 @@ class CTwoPushDynamicFilter : public CDynamicFilter /*long push, but do our own
   virtual void KeyUp(int Time, int iId, CDasherView *pDasherView, CDasherInput *pInput, CDasherModel *pModel, bool bPos, int iX, int iY);
 
  protected:
-  virtual bool TimerImpl(int Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, Dasher::VECTOR_SYMBOL_PROB *pAdded, int *pNumDeleted, CExpansionPolicy **pol);
+  virtual bool TimerImpl(unsigned long Time, CDasherView *m_pDasherView, CDasherModel *m_pDasherModel, CExpansionPolicy **pol);
   virtual void ActionButton(int iTime, int iButton, int iType, CDasherModel *pModel, CUserLogBase *pUserLog);
 
   virtual void HandleEvent(Dasher::CEvent * pEvent);



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