X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=XMLTree.h;h=2e9e222ae53f26baa631dbf4ab77dff885173fc8;hb=317fdc10a3d537fd87b855c4b8714b2472cde608;hp=d446ab122d2cd37cd0ef9b24c1d66e18e482008b;hpb=3c8f8af6704ca98b36b503878058aa0619806dad;p=SXSI%2FXMLTree.git diff --git a/XMLTree.h b/XMLTree.h index d446ab1..2e9e222 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -84,6 +84,8 @@ class XMLTree { /** Tag sequence represented with a data structure for rank and select */ static_sequence *Tags; + uint * tags_fix; + uint tags_blen, tags_len; /** The texts in the XML document */ TextCollection *Text; @@ -120,6 +122,7 @@ class XMLTree { bool disable_tc; public: + void print_stats(); /** Data structure constructor */ XMLTree() {finished = false; initialized = false;}; @@ -401,7 +404,9 @@ public: } uchar* GetCachedText(DocID d) { - return (uchar*) (CachedText.at(d).c_str()); + uchar * str = (uchar*) calloc(sizeof(char),(CachedText.at(d).size() + 1)); + strcpy((char*) str,(const char*) CachedText.at(d).c_str()); + return (uchar*) (str); } TextCollection *getTextCollection() {