[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Thu Nov 25 08:09:48 CET 2004


CVS commit by staikos: 

use pure virtuals instead


  M +0 -11     enodes.cpp   1.32
  M +4 -6      enodes.h   1.21


--- kdeextragear-2/kst/kst/enodes.cpp  #1.31:1.32
@@ -899,15 +899,4 @@ NodeVisitor::NodeVisitor() {
 
 
-NodeVisitor::~NodeVisitor() {
-}
-
-
-void NodeVisitor::visitNode(Node*) {
-}
-
-
-void NodeVisitor::visitBinaryNode(BinaryNode*) {
-}
-
 /////////////////////////////////////////////////////////////////
 

--- kdeextragear-2/kst/kst/enodes.h  #1.20:1.21
@@ -171,11 +171,9 @@ namespace Equation {
   class NodeVisitor {
     public:
-      virtual ~NodeVisitor();
-
-      virtual void visitNode(Node*);
-      virtual void visitBinaryNode(BinaryNode*);
+      NodeVisitor();
+      virtual ~NodeVisitor() = 0;
     
-    protected:
-      NodeVisitor();  // cannot instantiate base class directly; need a sub-class that does something interesting
+      virtual void visitNode(Node*) = 0;
+      virtual void visitBinaryNode(BinaryNode*) = 0;
   };
   





More information about the Kst mailing list