[dasher] Remove CControlManagerFactory class which wrapped ControlManager to



commit dc0a24ad0df2042aa1434b4057a1e58081bae869
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Thu Jul 2 12:27:28 2009 +0100

    Remove CControlManagerFactory class which wrapped ControlManager to
    no effect.

 ChangeLog                                |    1 +
 Src/DasherCore/ControlManagerFactory.cpp |   41 ------------------------------
 Src/DasherCore/ControlManagerFactory.h   |   36 --------------------------
 Src/DasherCore/Makefile.am               |    2 -
 Src/DasherCore/NodeCreationManager.cpp   |   26 +++++++++---------
 Src/DasherCore/NodeCreationManager.h     |    4 +-
 6 files changed, 16 insertions(+), 94 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5c82581..6fe7da7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 	* Remove global 'using namespace Dasher' from top-level of header
 	files and move CFrameRate class into namespace Dasher.
 	* Remove NodeManagerFactory class.
+	* Remove CControlManagerFactory class.
 
 2009-07-02  Patrick Welche <prlw1 cam ac uk>
 
diff --git a/Src/DasherCore/Makefile.am b/Src/DasherCore/Makefile.am
index 3c331da..47cf62f 100644
--- a/Src/DasherCore/Makefile.am
+++ b/Src/DasherCore/Makefile.am
@@ -35,8 +35,6 @@ libdashercore_a_SOURCES = \
 		ColourIO.h \
 		ControlManager.cpp \
 		ControlManager.h \
-		ControlManagerFactory.cpp \
-		ControlManagerFactory.h \
 		ConversionHelper.h \
 		ConversionManager.cpp \
 		ConversionManager.h \
diff --git a/Src/DasherCore/NodeCreationManager.cpp b/Src/DasherCore/NodeCreationManager.cpp
index 64a766f..2f91bb2 100644
--- a/Src/DasherCore/NodeCreationManager.cpp
+++ b/Src/DasherCore/NodeCreationManager.cpp
@@ -6,7 +6,7 @@
 #include "LanguageModelling/MixtureLanguageModel.h"
 #include "LanguageModelling/PPMPYLanguageModel.h"
 #include "NodeCreationManager.h"
-#include "ControlManagerFactory.h"
+#include "ControlManager.h"
 
 CNodeCreationManager::CNodeCreationManager(Dasher::CDasherInterfaceBase *pInterface,
 					   Dasher::CEventHandler *pEventHandler, 
@@ -39,9 +39,9 @@ CNodeCreationManager::CNodeCreationManager(Dasher::CDasherInterfaceBase *pInterf
 
 
 #ifndef _WIN32_WCE
-  m_pControlManagerFactory = new CControlManagerFactory(this);
+  m_pControlManager = new CControlManager(this);
 #else
-  m_pControlManagerFactory = 0;
+  m_pControlManager = 0;
 #endif
   m_pConversionManagerFactory = new CConversionManagerFactory(pEventHandler,
 							      pSettingsStore,
@@ -60,26 +60,26 @@ CNodeCreationManager::~CNodeCreationManager() {
   if(m_pAlphabetManagerFactory)
     delete m_pAlphabetManagerFactory;
   
-  if(m_pControlManagerFactory)
-    delete m_pControlManagerFactory;
+  if(m_pControlManager)
+    delete m_pControlManager;
 
   if(m_pConversionManagerFactory)
     delete m_pConversionManagerFactory;
 }
 
 void CNodeCreationManager::RegisterNode( int iID, const std::string &strLabel, int iColour ) {
-  if(m_pControlManagerFactory)
-    m_pControlManagerFactory->RegisterNode(iID, strLabel, iColour);
+  if(m_pControlManager)
+    m_pControlManager->RegisterNode(iID, strLabel, iColour);
 }
 
 void CNodeCreationManager::ConnectNode(int iChild, int iParent, int iAfter) {
-  if(m_pControlManagerFactory)
-    m_pControlManagerFactory->ConnectNode(iChild, iParent, iAfter);
+  if(m_pControlManager)
+    m_pControlManager->ConnectNode(iChild, iParent, iAfter);
 }
 
 void CNodeCreationManager::DisconnectNode(int iChild, int iParent) {
-  if(m_pControlManagerFactory)
-    m_pControlManagerFactory->DisconnectNode(iChild, iParent);
+  if(m_pControlManager)
+    m_pControlManager->DisconnectNode(iChild, iParent);
 }
 
 CDasherNode *CNodeCreationManager::GetRoot(int iType, Dasher::CDasherNode *pParent, int iLower, int iUpper, void *pUserData ) {
@@ -88,8 +88,8 @@ CDasherNode *CNodeCreationManager::GetRoot(int iType, Dasher::CDasherNode *pPare
   case 0:
     return m_pAlphabetManagerFactory->GetRoot(pParent, iLower, iUpper, pUserData);
   case 1:
-    if(m_pControlManagerFactory)
-      return m_pControlManagerFactory->GetRoot(pParent, iLower, iUpper, pUserData);
+    if(m_pControlManager)
+      return m_pControlManager->GetRoot(pParent, iLower, iUpper, pUserData);
     else
       return NULL;
   case 2:
diff --git a/Src/DasherCore/NodeCreationManager.h b/Src/DasherCore/NodeCreationManager.h
index 44666f1..bb5f6a5 100644
--- a/Src/DasherCore/NodeCreationManager.h
+++ b/Src/DasherCore/NodeCreationManager.h
@@ -15,7 +15,7 @@
 namespace Dasher {
   class CDasherNode;
   class CDasherInterfaceBase;
-  class CControlManagerFactory;
+  class CControlManager;
 };
 //TODO why is CNodeCreationManager _not_ in namespace Dasher?!?!
 /// \ingroup Model
@@ -119,7 +119,7 @@ class CNodeCreationManager : public Dasher::CDasherComponent {
   Dasher::CAlphabet *m_pAlphabet;        // pointer to the alphabet
 
   Dasher::CAlphabetManagerFactory *m_pAlphabetManagerFactory;
-  Dasher::CControlManagerFactory *m_pControlManagerFactory;
+  Dasher::CControlManager *m_pControlManager;
   Dasher::CConversionManagerFactory *m_pConversionManagerFactory;
 };
 /// @}



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