changeset 994:6b3efe9e93a6

add more destructors
author bachmann
date Sat, 01 Nov 2008 21:23:00 -0700
parents 4f3440869807
children 2250f9bbd303
files src/share/tools/MakeDeps/DirectoryTree.cpp src/share/tools/MakeDeps/DirectoryTree.h src/share/tools/MakeDeps/DirectoryTreeNode.h src/share/tools/MakeDeps/WinGammaPlatformVC7.cpp src/share/tools/MakeDeps/WinGammaPlatformVC7.h
diffstat 5 files changed, 41 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/tools/MakeDeps/DirectoryTree.cpp	Wed Oct 14 12:28:48 2009 -0700
+++ b/src/share/tools/MakeDeps/DirectoryTree.cpp	Sat Nov 01 21:23:00 2008 -0700
@@ -36,6 +36,10 @@
 #include <sstream>
 #include <iostream>
 
+DirectoryTreeNode::~DirectoryTreeNode() {
+    // nothing to do
+}
+
 /** file must be a canonical file */
 DirectoryTree::Node::Node(std::string file) {
     this->file = file;
@@ -86,6 +90,9 @@
     return (DirectoryTreeNode*) children[i];
 }
 
+DirectoryTree::Node::~Node() {
+}
+
 DirectoryTree::DirectoryTree() {
     verbose = false;
 }
--- a/src/share/tools/MakeDeps/DirectoryTree.h	Wed Oct 14 12:28:48 2009 -0700
+++ b/src/share/tools/MakeDeps/DirectoryTree.h	Sat Nov 01 21:23:00 2008 -0700
@@ -60,6 +60,8 @@
 
         public: DirectoryTreeNode* getChild(int i)
             throw (IllegalArgumentException, ArrayIndexOutOfBoundsException) ;
+
+        public: virtual ~Node();
     };
 
     /** The root of the read directoryTree */
--- a/src/share/tools/MakeDeps/DirectoryTreeNode.h	Wed Oct 14 12:28:48 2009 -0700
+++ b/src/share/tools/MakeDeps/DirectoryTreeNode.h	Sat Nov 01 21:23:00 2008 -0700
@@ -38,6 +38,7 @@
     public: virtual int getNumChildren() throw (IllegalArgumentException) = 0;
     public: virtual DirectoryTreeNode* getChild(int i)
         throw (IllegalArgumentException, ArrayIndexOutOfBoundsException) = 0;
+    public: virtual ~DirectoryTreeNode();
 };
 
 #endif // _MAKEDEPS_DIRECTORY_TREE_NODE_H_
--- a/src/share/tools/MakeDeps/WinGammaPlatformVC7.cpp	Wed Oct 14 12:28:48 2009 -0700
+++ b/src/share/tools/MakeDeps/WinGammaPlatformVC7.cpp	Sat Nov 01 21:23:00 2008 -0700
@@ -96,6 +96,10 @@
   return this->fname;
 }
 
+WinGammaPlatformVC7::NameFilter::~NameFilter() {
+  // nothing to do
+}
+
 WinGammaPlatformVC7::DirectoryFilter::DirectoryFilter(std::string dir, std::string sbase) {
   this->dir = dir;
   this->baseLen = sbase.size();
@@ -114,6 +118,9 @@
   return regionMatches(fi->full, true, baseLen, dir, 0, dirLen);
 }
 
+WinGammaPlatformVC7::DirectoryFilter::~DirectoryFilter() {
+  // nothing to do
+}
 
 WinGammaPlatformVC7::TypeFilter::TypeFilter(std::string fname, std::vector < std::string > exts) {
   this->fname = fname;
@@ -133,6 +140,9 @@
   return Util::join(";", exts);
 }
 
+WinGammaPlatformVC7::TypeFilter::~TypeFilter() {
+  // nothing to do
+}
 
 WinGammaPlatformVC7::TerminatorFilter::TerminatorFilter(std::string fname) {
   this->fname = fname;
@@ -142,6 +152,10 @@
   return true;
 }
 
+WinGammaPlatformVC7::TerminatorFilter::~TerminatorFilter() {
+  // nothing to do
+}
+
 
 WinGammaPlatformVC7::SpecificNameFilter::SpecificNameFilter(std::string fname, std::vector < std::string > pats) {
   this->fname = fname;
@@ -157,6 +171,10 @@
   return false;
 }
 
+WinGammaPlatformVC7::SpecificNameFilter::~SpecificNameFilter() {
+  // nothing to do
+}
+
 
 WinGammaPlatformVC7::ContainerFilter::ContainerFilter(std::string fname) {
   this->fname = fname;
@@ -166,6 +184,10 @@
   return false;
 }
 
+WinGammaPlatformVC7::ContainerFilter::~ContainerFilter() {
+  // nothing to do
+}
+
 std::vector < WinGammaPlatformVC7::NameFilter * > WinGammaPlatformVC7::ContainerFilter::babies() {
   return children;
 }
--- a/src/share/tools/MakeDeps/WinGammaPlatformVC7.h	Wed Oct 14 12:28:48 2009 -0700
+++ b/src/share/tools/MakeDeps/WinGammaPlatformVC7.h	Sat Nov 01 21:23:00 2008 -0700
@@ -44,6 +44,7 @@
 
         virtual std::string filterString() ;
         std::string name() ;
+	virtual ~NameFilter();
     };
 
     class DirectoryFilter : public NameFilter {
@@ -56,6 +57,8 @@
         DirectoryFilter(std::string fname, std::string dir, std::string sbase) ;
 
         bool match(FileInfo * fi) ;
+	
+	virtual ~DirectoryFilter();
     };
 
     class TypeFilter : public NameFilter {
@@ -66,6 +69,8 @@
         bool match(FileInfo * fi) ;
 
         std::string  filterString() ;
+
+	virtual ~TypeFilter();
     };
 
     class TerminatorFilter : public NameFilter {
@@ -73,6 +78,7 @@
         TerminatorFilter(std::string fname) ;
         bool match(FileInfo * fi) ;
 
+	virtual ~TerminatorFilter();
     };
 
     class SpecificNameFilter : public NameFilter {
@@ -83,6 +89,7 @@
 
         bool match(FileInfo * fi) ;
 
+	virtual ~SpecificNameFilter();
     };
 
     class ContainerFilter : public NameFilter {
@@ -95,6 +102,8 @@
         std::vector < NameFilter * > babies() ;
 
         void push_back(NameFilter * f) ;
+
+	virtual ~ContainerFilter();
     };