[dasher] Remove NodeManagerFactory class.



commit f93ebfa631f448c72d978e079afc945d11f8963c
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Thu Jul 2 12:15:36 2009 +0100

    Remove NodeManagerFactory class.
    
    It is a Superclass, containing no code, and subclasses only ever accessed
    directly, i.e., never as instances of the NodeManagerFactory superclass.

 ChangeLog                                   |    1 +
 Src/DasherCore/AlphabetManagerFactory.h     |    3 +-
 Src/DasherCore/ControlManagerFactory.h      |    4 +-
 Src/DasherCore/ConversionManagerFactory.h   |    3 +-
 Src/DasherCore/Makefile.am                  |    1 -
 Src/DasherCore/NodeCreationManager.cpp      |   16 +++++++-
 Src/DasherCore/NodeCreationManager.h        |   17 ++------
 Src/DasherCore/NodeManagerFactory.h         |   59 ---------------------------
 Src/MacOSX/Dasher.xcodeproj/project.pbxproj |    8 ----
 9 files changed, 24 insertions(+), 88 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7ed0bd2..5c82581 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
 	* Remove global 'using namespace Dasher' from top-level of header
 	files and move CFrameRate class into namespace Dasher.
+	* Remove NodeManagerFactory class.
 
 2009-07-02  Patrick Welche <prlw1 cam ac uk>
 
diff --git a/Src/DasherCore/AlphabetManagerFactory.h b/Src/DasherCore/AlphabetManagerFactory.h
index 5561471..ddf9da7 100644
--- a/Src/DasherCore/AlphabetManagerFactory.h
+++ b/Src/DasherCore/AlphabetManagerFactory.h
@@ -2,7 +2,6 @@
 #define __alphabetmanagerfactory_h__
 
 #include "AlphabetManager.h"
-#include "NodeManagerFactory.h"
 #include "LanguageModelling/LanguageModel.h"
 
 class CNodeCreationManager;
@@ -34,7 +33,7 @@ namespace Dasher {
 
   /// \ingroup Model
   /// @{
-  class CAlphabetManagerFactory : public CNodeManagerFactory {
+  class CAlphabetManagerFactory {
   public:
 
     CAlphabetManagerFactory(CDasherInterfaceBase *pInterface,
diff --git a/Src/DasherCore/ControlManagerFactory.h b/Src/DasherCore/ControlManagerFactory.h
index c5aa0ba..d16ff98 100644
--- a/Src/DasherCore/ControlManagerFactory.h
+++ b/Src/DasherCore/ControlManagerFactory.h
@@ -1,8 +1,8 @@
 #ifndef __controlmanagerfactory_h__
 #define __controlmanagerfactory_h__
 
-#include "NodeManagerFactory.h"
 #include "LanguageModelling/LanguageModel.h"
+#include "DasherNode.h"
 
 class CNodeCreationManager;
 
@@ -15,7 +15,7 @@ namespace Dasher {
 
   /// \ingroup Model
   /// @{
-  class CControlManagerFactory : public CNodeManagerFactory {
+  class CControlManagerFactory {
   public:
     CControlManagerFactory(CNodeCreationManager *pNCManager);
     ~CControlManagerFactory();
diff --git a/Src/DasherCore/ConversionManagerFactory.h b/Src/DasherCore/ConversionManagerFactory.h
index d0863c3..3200aec 100644
--- a/Src/DasherCore/ConversionManagerFactory.h
+++ b/Src/DasherCore/ConversionManagerFactory.h
@@ -4,7 +4,6 @@
 #include "ConversionHelper.h"
 //#include "DasherModel.h"
 #include "LanguageModelling/LanguageModel.h" // Urgh - we really shouldn't need to know about language models here
-#include "NodeManagerFactory.h"
 
 #include <map>
 
@@ -13,7 +12,7 @@ namespace Dasher {
 
   /// \ingroup Model
   /// @{
-  class CConversionManagerFactory : public CNodeManagerFactory {
+  class CConversionManagerFactory {
   public:
     CConversionManagerFactory(Dasher::CEventHandler *pEventHandler,  CSettingsStore *pSettingsStore, CNodeCreationManager *pNCManager, int iID, Dasher::CAlphIO *pCAlphIO, CAlphabet *pAlphabet);
     virtual CDasherNode *GetRoot(CDasherNode *pParent, int iLower, int iUpper, void *pUserData);
diff --git a/Src/DasherCore/Makefile.am b/Src/DasherCore/Makefile.am
index 547d4a5..3c331da 100644
--- a/Src/DasherCore/Makefile.am
+++ b/Src/DasherCore/Makefile.am
@@ -95,7 +95,6 @@ libdashercore_a_SOURCES = \
 		NodeCreationManager.cpp \
 		NodeCreationManager.h \
 		NodeManager.h \
-		NodeManagerFactory.h \
 		OneButtonDynamicFilter.cpp \
 		OneButtonDynamicFilter.h \
 		OneDimensionalFilter.cpp \
diff --git a/Src/DasherCore/NodeCreationManager.cpp b/Src/DasherCore/NodeCreationManager.cpp
index 20825bf..64a766f 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"
 
 CNodeCreationManager::CNodeCreationManager(Dasher::CDasherInterfaceBase *pInterface,
 					   Dasher::CEventHandler *pEventHandler, 
@@ -67,6 +67,20 @@ CNodeCreationManager::~CNodeCreationManager() {
     delete m_pConversionManagerFactory;
 }
 
+void CNodeCreationManager::RegisterNode( int iID, const std::string &strLabel, int iColour ) {
+  if(m_pControlManagerFactory)
+    m_pControlManagerFactory->RegisterNode(iID, strLabel, iColour);
+}
+
+void CNodeCreationManager::ConnectNode(int iChild, int iParent, int iAfter) {
+  if(m_pControlManagerFactory)
+    m_pControlManagerFactory->ConnectNode(iChild, iParent, iAfter);
+}
+
+void CNodeCreationManager::DisconnectNode(int iChild, int iParent) {
+  if(m_pControlManagerFactory)
+    m_pControlManagerFactory->DisconnectNode(iChild, iParent);
+}
 
 CDasherNode *CNodeCreationManager::GetRoot(int iType, Dasher::CDasherNode *pParent, int iLower, int iUpper, void *pUserData ) {
 
diff --git a/Src/DasherCore/NodeCreationManager.h b/Src/DasherCore/NodeCreationManager.h
index c21b114..44666f1 100644
--- a/Src/DasherCore/NodeCreationManager.h
+++ b/Src/DasherCore/NodeCreationManager.h
@@ -4,7 +4,6 @@
 #include "Alphabet/Alphabet.h"
 #include "Alphabet/AlphIO.h"
 #include "AlphabetManagerFactory.h"
-#include "ControlManagerFactory.h"
 #include "ConversionManagerFactory.h"
 #include "DasherComponent.h"
 
@@ -16,6 +15,7 @@
 namespace Dasher {
   class CDasherNode;
   class CDasherInterfaceBase;
+  class CControlManagerFactory;
 };
 //TODO why is CNodeCreationManager _not_ in namespace Dasher?!?!
 /// \ingroup Model
@@ -38,28 +38,19 @@ class CNodeCreationManager : public Dasher::CDasherComponent {
   /// Resgister a control node 
   ///
 
-  void RegisterNode( int iID, const std::string &strLabel, int iColour ) {
-    if(m_pControlManagerFactory)
-      m_pControlManagerFactory->RegisterNode(iID, strLabel, iColour);
-  }
+  void RegisterNode( int iID, const std::string &strLabel, int iColour );
 
   ///
   /// Connect control nodes in the tree
   ///
   
-  void ConnectNode(int iChild, int iParent, int iAfter) {
-    if(m_pControlManagerFactory)
-      m_pControlManagerFactory->ConnectNode(iChild, iParent, iAfter);
-  }
+  void ConnectNode(int iChild, int iParent, int iAfter);
 
   ///
   /// Disconnect control nodes
   ///
 
-  void DisconnectNode(int iChild, int iParent) {
-    if(m_pControlManagerFactory)
-      m_pControlManagerFactory->DisconnectNode(iChild, iParent);
-  }
+  void DisconnectNode(int iChild, int iParent);
 
   ///
   /// Temporary methods: TODO: remove
diff --git a/Src/MacOSX/Dasher.xcodeproj/project.pbxproj b/Src/MacOSX/Dasher.xcodeproj/project.pbxproj
index 4e24d76..bb4f9b0 100755
--- a/Src/MacOSX/Dasher.xcodeproj/project.pbxproj
+++ b/Src/MacOSX/Dasher.xcodeproj/project.pbxproj
@@ -113,13 +113,11 @@
 		1948BF0B0C226CFD001DFA32 /* WordLanguageModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE660C226CFD001DFA32 /* WordLanguageModel.h */; };
 		1948BF0D0C226CFD001DFA32 /* MemoryLeak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BE680C226CFD001DFA32 /* MemoryLeak.cpp */; };
 		1948BF0E0C226CFD001DFA32 /* MemoryLeak.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE690C226CFD001DFA32 /* MemoryLeak.h */; };
-		1948BF0F0C226CFD001DFA32 /* ModuleFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE6A0C226CFD001DFA32 /* ModuleFactory.h */; };
 		1948BF100C226CFD001DFA32 /* ModuleManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BE6B0C226CFD001DFA32 /* ModuleManager.cpp */; };
 		1948BF110C226CFD001DFA32 /* ModuleManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE6C0C226CFD001DFA32 /* ModuleManager.h */; };
 		1948BF120C226CFD001DFA32 /* NodeCreationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BE6D0C226CFD001DFA32 /* NodeCreationManager.cpp */; };
 		1948BF130C226CFD001DFA32 /* NodeCreationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE6E0C226CFD001DFA32 /* NodeCreationManager.h */; };
 		1948BF140C226CFD001DFA32 /* NodeManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE6F0C226CFD001DFA32 /* NodeManager.h */; };
-		1948BF150C226CFD001DFA32 /* NodeManagerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE700C226CFD001DFA32 /* NodeManagerFactory.h */; };
 		1948BF160C226CFD001DFA32 /* OneButtonFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BE710C226CFD001DFA32 /* OneButtonFilter.cpp */; };
 		1948BF170C226CFD001DFA32 /* OneButtonFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1948BE720C226CFD001DFA32 /* OneButtonFilter.h */; };
 		1948BF180C226CFD001DFA32 /* OneDimensionalFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1948BE730C226CFD001DFA32 /* OneDimensionalFilter.cpp */; };
@@ -523,13 +521,11 @@
 		1948BE660C226CFD001DFA32 /* WordLanguageModel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WordLanguageModel.h; sourceTree = "<group>"; };
 		1948BE680C226CFD001DFA32 /* MemoryLeak.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryLeak.cpp; sourceTree = "<group>"; };
 		1948BE690C226CFD001DFA32 /* MemoryLeak.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MemoryLeak.h; sourceTree = "<group>"; };
-		1948BE6A0C226CFD001DFA32 /* ModuleFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ModuleFactory.h; sourceTree = "<group>"; };
 		1948BE6B0C226CFD001DFA32 /* ModuleManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ModuleManager.cpp; sourceTree = "<group>"; };
 		1948BE6C0C226CFD001DFA32 /* ModuleManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ModuleManager.h; sourceTree = "<group>"; };
 		1948BE6D0C226CFD001DFA32 /* NodeCreationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeCreationManager.cpp; sourceTree = "<group>"; };
 		1948BE6E0C226CFD001DFA32 /* NodeCreationManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeCreationManager.h; sourceTree = "<group>"; };
 		1948BE6F0C226CFD001DFA32 /* NodeManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeManager.h; sourceTree = "<group>"; };
-		1948BE700C226CFD001DFA32 /* NodeManagerFactory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeManagerFactory.h; sourceTree = "<group>"; };
 		1948BE710C226CFD001DFA32 /* OneButtonFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OneButtonFilter.cpp; sourceTree = "<group>"; };
 		1948BE720C226CFD001DFA32 /* OneButtonFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OneButtonFilter.h; sourceTree = "<group>"; };
 		1948BE730C226CFD001DFA32 /* OneDimensionalFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OneDimensionalFilter.cpp; sourceTree = "<group>"; };
@@ -1002,13 +998,11 @@
 				1948BE4D0C226CFD001DFA32 /* LanguageModelling */,
 				1948BE680C226CFD001DFA32 /* MemoryLeak.cpp */,
 				1948BE690C226CFD001DFA32 /* MemoryLeak.h */,
-				1948BE6A0C226CFD001DFA32 /* ModuleFactory.h */,
 				1948BE6B0C226CFD001DFA32 /* ModuleManager.cpp */,
 				1948BE6C0C226CFD001DFA32 /* ModuleManager.h */,
 				1948BE6D0C226CFD001DFA32 /* NodeCreationManager.cpp */,
 				1948BE6E0C226CFD001DFA32 /* NodeCreationManager.h */,
 				1948BE6F0C226CFD001DFA32 /* NodeManager.h */,
-				1948BE700C226CFD001DFA32 /* NodeManagerFactory.h */,
 				1948BE710C226CFD001DFA32 /* OneButtonFilter.cpp */,
 				1948BE720C226CFD001DFA32 /* OneButtonFilter.h */,
 				1921DB370C7ECAA400E6DAA5 /* OneButtonDynamicFilter.cpp */,
@@ -1466,11 +1460,9 @@
 				1948BF090C226CFD001DFA32 /* SymbolAlphabet.h in Headers */,
 				1948BF0B0C226CFD001DFA32 /* WordLanguageModel.h in Headers */,
 				1948BF0E0C226CFD001DFA32 /* MemoryLeak.h in Headers */,
-				1948BF0F0C226CFD001DFA32 /* ModuleFactory.h in Headers */,
 				1948BF110C226CFD001DFA32 /* ModuleManager.h in Headers */,
 				1948BF130C226CFD001DFA32 /* NodeCreationManager.h in Headers */,
 				1948BF140C226CFD001DFA32 /* NodeManager.h in Headers */,
-				1948BF150C226CFD001DFA32 /* NodeManagerFactory.h in Headers */,
 				1948BF170C226CFD001DFA32 /* OneButtonFilter.h in Headers */,
 				1948BF190C226CFD001DFA32 /* OneDimensionalFilter.h in Headers */,
 				1948BF1A0C226CFD001DFA32 /* Parameters.h in Headers */,



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