Further optimisations, changed the prototype of Tree.mli
[SXSI/xpathcomp.git] / SXSIStorageInterface.h
1 /*****************************************
2  * SXSIStorageInterface.h
3  * ------------------------
4  * Header file for an SXSI Storage Interface
5  * 
6  * Author: Kim Nguyen
7  * Date: 25/11/08
8  */
9
10 #ifndef SXSISTORAGEINTERFACE_H_
11 #define SXSISTORAGEINTERFACE_H_
12
13 #include "XMLTree.h"
14 #include "XMLTreeBuilder.h"
15 #include "StorageInterface.h"
16 extern "C" {
17 #include <caml/mlvalues.h>
18 #include <caml/alloc.h>
19 #include <caml/memory.h>
20 #include <caml/callback.h>
21 #include <caml/fail.h>
22 #include <caml/custom.h>
23   
24
25 } //extern C
26
27 using namespace std;
28
29 class SXSIStorageInterface: public StorageInterface
30 {
31  public:
32         SXSIStorageInterface(int sf, bool iet, bool dtc);
33         virtual ~SXSIStorageInterface();
34         virtual void newChild(string name);
35         virtual void newText(string text); 
36         virtual void nodeFinished(string name);
37         virtual void parsingFinished();
38         virtual void* returnDocument();
39         virtual void printStats();
40         
41  private:
42
43         XMLTree* tree;
44         XMLTreeBuilder* tb;
45         int _new_text;
46         int _new_empty_text;
47         int _new_child;
48         int _length_text;
49         int _heap_base;
50         int _heap_parsing;
51         int _heap_done;
52         
53 };
54
55 #endif /*SXSISTORAGEINTERFACE_H_*/