From 99ac0ee0d0f85549a19b5e96442caa5a56f95a78 Mon Sep 17 00:00:00 2001 From: kim Date: Thu, 30 Apr 2009 14:25:29 +0000 Subject: [PATCH] Removed deprecated StorageInterface git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/xpathcomp@368 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- Makefile | 8 ++--- SXSIStorageInterface.cpp | 66 ---------------------------------------- SXSIStorageInterface.h | 55 --------------------------------- StorageInterface.cpp | 16 ---------- StorageInterface.h | 36 ---------------------- 5 files changed, 3 insertions(+), 178 deletions(-) delete mode 100644 SXSIStorageInterface.cpp delete mode 100644 SXSIStorageInterface.h delete mode 100644 StorageInterface.cpp delete mode 100644 StorageInterface.h diff --git a/Makefile b/Makefile index 97f3352..97ac568 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ OCAMLPACKAGES = str,unix,ulex,camlp4 PPINCLUDES=$(OCAMLINCLUDES:%=-ppopt %) -CXXSOURCES = XMLDocShredder.cpp SXSIStorageInterface.cpp StorageInterface.cpp OCamlDriver.cpp +CXXSOURCES = XMLDocShredder.cpp OCamlDriver.cpp CXXOBJECTS = $(CXXSOURCES:.cpp=.o) CXXINCLUDES = \ @@ -131,10 +131,8 @@ timeXMLTree: $(CXXOBJECTS) XMLTree/XMLTree.a timeXMLTree.cpp myTimeXMLTree.cpp # $(LIBS) testXMLTree.cpp rm -rf .libs -SXSIStorageInterface.o: SXSIStorageInterface.h SXSIStorageInterface.cpp StorageInterface.h -StorageInterface.o: StorageInterface.h -XMLDocShredder.o: XMLDocShredder.h XMLDocShredder.cpp SXSIStorageInterface.h StorageInterface.h -OCamlDriver.o: XMLDocShredder.h StorageInterface.h +XMLDocShredder.o: XMLDocShredder.h XMLDocShredder.cpp +OCamlDriver.o: XMLDocShredder.h compute_depend: @echo [DEP] diff --git a/SXSIStorageInterface.cpp b/SXSIStorageInterface.cpp deleted file mode 100644 index 2594bd2..0000000 --- a/SXSIStorageInterface.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************* - * SXSIStorageInterface.cpp - * ------------------------ - * - * - * Author: Kim Nguyen - * Date: 04/11/08 - */ - - -#include "SXSIStorageInterface.h" -#include "Utils.h" - -SXSIStorageInterface::SXSIStorageInterface(int sf,bool iet,bool dtc) -{ - tree = NULL; - tb = new XMLTreeBuilder(); - tb ->OpenDocument(iet,sf,dtc); -} - -SXSIStorageInterface::~SXSIStorageInterface() -{ -} - -void SXSIStorageInterface::newChild(string name) -{ - tb->NewOpenTag(name); -} - - -void SXSIStorageInterface::newText(string text) -{ - - tb->NewText(text); -} - - -void SXSIStorageInterface::nodeFinished(string name) -{ - tb->NewClosingTag(name); - -} - - void SXSIStorageInterface::parsingFinished() -{ - - tree = tb->CloseDocument(); - -} - -void *SXSIStorageInterface::returnDocument(){ -#ifdef DEBUG - printStats(); -#endif - return ((void *) tree); - -} - -void SXSIStorageInterface::printStats(){ - std::cerr << "Parsing stats : \n"; - std::cerr << _new_child << " calls to newOpenTag/newClosingTag\n"; - std::cerr << _new_text << " calls to newText\n"; - std::cerr << _new_empty_text << " calls to newEmptyText\n"; - std::cerr << _length_text << " bytes (=" << _length_text/1024 << "kb ) added to TextCollection\n"; - return; -} diff --git a/SXSIStorageInterface.h b/SXSIStorageInterface.h deleted file mode 100644 index bd65594..0000000 --- a/SXSIStorageInterface.h +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************** - * SXSIStorageInterface.h - * ------------------------ - * Header file for an SXSI Storage Interface - * - * Author: Kim Nguyen - * Date: 25/11/08 - */ - -#ifndef SXSISTORAGEINTERFACE_H_ -#define SXSISTORAGEINTERFACE_H_ - -#include "XMLTree.h" -#include "XMLTreeBuilder.h" -#include "StorageInterface.h" -extern "C" { -#include -#include -#include -#include -#include -#include - - -} //extern C - -using namespace std; - -class SXSIStorageInterface: public StorageInterface -{ - public: - SXSIStorageInterface(int sf, bool iet, bool dtc); - virtual ~SXSIStorageInterface(); - virtual void newChild(string name); - virtual void newText(string text); - virtual void nodeFinished(string name); - virtual void parsingFinished(); - virtual void* returnDocument(); - virtual void printStats(); - - private: - - XMLTree* tree; - XMLTreeBuilder* tb; - int _new_text; - int _new_empty_text; - int _new_child; - int _length_text; - int _heap_base; - int _heap_parsing; - int _heap_done; - -}; - -#endif /*SXSISTORAGEINTERFACE_H_*/ diff --git a/StorageInterface.cpp b/StorageInterface.cpp deleted file mode 100644 index 4953b13..0000000 --- a/StorageInterface.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/********************************************** - * StorageInterface.cpp - * ------------------------ - * Abstract class defining methods for the storage interface. - * - * Author: Greg Leighton - * Date: 02/11/08 - */ - - -#include "StorageInterface.h" - -StorageInterface::~StorageInterface() -{ - -} diff --git a/StorageInterface.h b/StorageInterface.h deleted file mode 100644 index 843a55e..0000000 --- a/StorageInterface.h +++ /dev/null @@ -1,36 +0,0 @@ -/************************************* - * StorageInterface.h - * --------------------- - * Header file for abstract class defining a storage interface. - * - * Author: Greg Leighton - * Date: 02/11/08 - * - * Changes: - * 05/11/08 -- Added returnDocument() method - */ - - -#ifndef STORAGEINTERFACE_H_ -#define STORAGEINTERFACE_H_ - -#include - -using namespace std; - -class StorageInterface -{ - public: - virtual ~StorageInterface(); - virtual void newChild(string name) = 0; - virtual void newText(string text) = 0; - virtual void nodeFinished(string name) = 0; - virtual void parsingFinished() = 0; - virtual void* returnDocument() = 0; - virtual void printStats() = 0; - private: - - -}; - -#endif /*STORAGEINTERFACE_H_*/ -- 2.17.1