Debugged the save/load functions
[SXSI/XMLTree.git] / XMLTree.h
index cc5f089..759aff8 100644 (file)
--- a/XMLTree.h
+++ b/XMLTree.h
 #include <stdio.h>\r
 #include <stdlib.h>\r
 #include <cstring>\r
+\r
+//clash between TextCollection/Tools.h and libcds/includes/basics.h\r
+#undef W\r
+#undef WW\r
+#undef Wminusone\r
+\r
 #include "bp.h"\r
 #include <static_bitsequence.h>\r
 #include <alphabet_mapper.h>\r
@@ -91,6 +97,7 @@ class XMLTree {
    int ntagnames;\r
    unsigned int *empty_texts_aux;\r
    bool found_attributes;\r
+   bool disable_tc;\r
    \r
 public:\r
 \r
@@ -210,14 +217,16 @@ public:
    /** ParentNode(d): returns the parent node of document identifier d. */\r
    treeNode ParentNode(DocID d);\r
 \r
-   /** OpenDocument(empty_texts,sample_rate_text): initilizes the construction\r
+   /** OpenDocument(empty_texts,sample_rate_text,dtc): initilizes the construction\r
     * of the data structure for the XML document. Parameter empty_texts \r
     * indicates whether we index empty texts in document or not. Parameter \r
     * sample_rate_text indicates the sampling rate for the text searching data\r
     * structures (small values get faster searching but a bigger space \r
-    * requirement). Returns a non-zero value upon success, NULLT in case of \r
+    * requirement). dtc disable the use of the TextCollection\r
+    * (i.e. everything is considered an empty text *)\r
+    * Returns a non-zero value upon success, NULLT in case of \r
     * error. */\r
-   int OpenDocument(bool empty_texts, int sample_rate_text);\r
+   int OpenDocument(bool empty_texts, int sample_rate_text, bool dtc);\r
 \r
    /** CloseDocument(): finishes the construction of the data structure for \r
     * the XML document. Tree and tags are represented in the final form, \r