projects
/
SXSI
/
XMLTree.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wrong condition for assert
[SXSI/XMLTree.git]
/
XMLTree.h
diff --git
a/XMLTree.h
b/XMLTree.h
index
80173a4
..
9b79ae3
100644
(file)
--- a/
XMLTree.h
+++ b/
XMLTree.h
@@
-21,7
+21,7
@@
\r
#ifndef XMLTREE_H_
\r
#define XMLTREE_H_
\r
\r
#ifndef XMLTREE_H_
\r
#define XMLTREE_H_
\r
-#include "TextCollection/TextCollection.h"
\r
+#include "TextCollection/TextCollection
Builder
.h"
\r
#include <stdio.h>
\r
#include <stdlib.h>
\r
#include <cstring>
\r
#include <stdio.h>
\r
#include <stdlib.h>
\r
#include <cstring>
\r
@@
-37,6
+37,7
@@
#include <alphabet_mapper.h>
\r
#include <static_sequence.h>
\r
using SXSI::TextCollection;
\r
#include <alphabet_mapper.h>
\r
#include <static_sequence.h>
\r
using SXSI::TextCollection;
\r
+using SXSI::TextCollectionBuilder;
\r
\r
\r
// this constant is used to efficiently compute the child operation in the tree
\r
\r
\r
// this constant is used to efficiently compute the child operation in the tree
\r
@@
-88,7
+89,9
@@
class XMLTree {
uint tags_blen, tags_len;
\r
\r
/** The texts in the XML document */
\r
uint tags_blen, tags_len;
\r
\r
/** The texts in the XML document */
\r
+ TextCollectionBuilder *TextBuilder;
\r
TextCollection *Text;
\r
TextCollection *Text;
\r
+
\r
/** The texts in the XML document (cached for faster display) */
\r
vector<string> CachedText;
\r
\r
/** The texts in the XML document (cached for faster display) */
\r
vector<string> CachedText;
\r
\r
@@
-125,7
+128,7
@@
public:
void print_stats();
\r
\r
/** Data structure constructor */
\r
void print_stats();
\r
\r
/** Data structure constructor */
\r
- XMLTree() {finished = false; initialized = false;};
\r
+ XMLTree() {finished = false; initialized = false;
Text = 0; TextBuilder = 0;
};
\r
\r
/** Data structure destructor */
\r
~XMLTree();
\r
\r
/** Data structure destructor */
\r
~XMLTree();
\r
@@
-331,7
+334,7
@@
public:
TagType RegisterTag(unsigned char *tagname);
\r
\r
bool EmptyText(DocID i) {
\r
TagType RegisterTag(unsigned char *tagname);
\r
\r
bool EmptyText(DocID i) {
\r
- return Text->EmptyText(i);
\r
+
return Text->EmptyText(i);
\r
}
\r
/** Prefix(s): search for texts prefixed by string s. */
\r
TextCollection::document_result Prefix(uchar const *s) {
\r
}
\r
/** Prefix(s): search for texts prefixed by string s. */
\r
TextCollection::document_result Prefix(uchar const *s) {
\r
@@
-420,7
+423,7
@@
public:
/** GetText(d): returns the text corresponding to document with
\r
* id d. */
\r
uchar* GetText(DocID d) {
\r
/** GetText(d): returns the text corresponding to document with
\r
* id d. */
\r
uchar* GetText(DocID d) {
\r
- return Text->GetText(d);
\r
+
return Text->GetText(d);
\r
}
\r
\r
uchar* GetCachedText(DocID d) {
\r
}
\r
\r
uchar* GetCachedText(DocID d) {
\r