X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=XMLTreeBuilder.h;h=c7a9036f384b35d26d5a1ec709ff6d6505170d07;hb=19534e3089bc0c36bc50e5e522c145e73dcda9cc;hp=7dc08a1dae589c80cde01dbdfad32efb5f843d11;hpb=1c40b498ddd6d66b09aff3a22b9f7ddd845250dc;p=SXSI%2FXMLTree.git diff --git a/XMLTreeBuilder.h b/XMLTreeBuilder.h index 7dc08a1..c7a9036 100644 --- a/XMLTreeBuilder.h +++ b/XMLTreeBuilder.h @@ -22,10 +22,6 @@ #ifndef XMLTREEBUILDER_H_ #define XMLTREEBUILDER_H_ -#include -#include -#include -#include #include "TextCollection/TextCollectionBuilder.h" #undef W #undef WW @@ -33,10 +29,6 @@ #include "XMLTree.h" -#include "bp.h" -#include -#include -#include using SXSI::TextCollection; using SXSI::TextCollectionBuilder; @@ -58,7 +50,7 @@ class XMLTreeBuilder { int npar; /** Mapping from tag identifer to tag name */ - vector *TagName; + std::vector *TagName; TagIdMap * tIdMap; /** Array containing the sequence of tags */ TagType *tags_aux; @@ -69,13 +61,13 @@ class XMLTreeBuilder { /** The texts in the XML document (cached for faster display) */ - vector *CachedText; + std::vector *CachedText; unsigned int *empty_texts_aux; int eta_size; // Allows to disable the TextCollection for benchmarkin purposes bool disable_tc; - + TextCollectionBuilder::index_type_t text_index_type; public: XMLTreeBuilder() {;}; @@ -90,7 +82,8 @@ public: * (i.e. everything is considered an empty text *) * Returns a non-zero value upon success, NULLT in case of * error. */ - int OpenDocument(bool empty_texts, int sample_rate_text, bool dtc); + int OpenDocument(bool empty_texts, int sample_rate_text, bool dtc, + TextCollectionBuilder::index_type_t index_type); /** CloseDocument(): finishes the construction of the data structure for * the XML document. Tree and tags are represented in the final form, @@ -101,12 +94,12 @@ public: /** NewOpenTag(tagname): indicates the event of finding a new opening tag * in the document. Tag name is given. Returns a non-zero value upon * success, and returns NULLT in case of error. */ - int NewOpenTag(string tagname); + int NewOpenTag(std::string tagname); /** NewClosingTag(tagname): indicates the event of finding a new closing tag * in the document. Tag name is given. Returns a non-zero value upon * success, and returns NULLT in case of error. */ - int NewClosingTag(string tagname); + int NewClosingTag(std::string tagname); /** NewText(s): indicates the event of finding a new text s in * the document. The new text is inserted within the text collection. @@ -115,7 +108,7 @@ public: * the string the sequence '\0x01\0x00' is inserted in the TextCollection * It is ok to do so since a non printable character cannot occur in an XML document */ - int NewText(string text); + int NewText(std::string text); };