X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Flexindex_stub.cpp;fp=src%2Flexindex_stub.cpp;h=2118e2e07934de0399135d242633d1620fe00f9b;hb=5c2d599b89c01c879f685655545a5e212a5cdcd2;hp=0a9df0fd74babc42907da72954570c615b3dce20;hpb=4bc52a4501326430a0afa0185a6cf0611ae27ef4;p=SXSI%2Fxpathcomp.git diff --git a/src/lexindex_stub.cpp b/src/lexindex_stub.cpp index 0a9df0f..2118e2e 100644 --- a/src/lexindex_stub.cpp +++ b/src/lexindex_stub.cpp @@ -1,4 +1,4 @@ -a#include +#include #include #include #include @@ -18,7 +18,6 @@ struct myclass { } myobject; //define a type for the lexicographic index - class lex_index { public: //The tag IDs @@ -29,8 +28,11 @@ public: vector::iterator tagVectorIt; vector tag2Vector; vector::iterator tag2VectorIt; + void print(); }; +void lex_index::print(){printf("Print called\n");} + // class prefix_treeNode { // public: // std::map Children; @@ -134,6 +136,7 @@ ML_BINDING value caml_build_lex_index(value vtree, value vtag, value vtag2) //Uncomment the following and comment the failwith line //LEXINDEX(vindex) = ... return a lex_index* .... + LEXINDEX(vindex)=mylindex; } ML_BINDING value caml_print_lex_index(value vindex) @@ -142,6 +145,7 @@ ML_BINDING value caml_print_lex_index(value vindex) lex_index* index = LEXINDEX(vindex); //Print the index to the terminal - caml_failwith("print_lex_index not implemented"); + // caml_failwith("print_lex_index not implemented"); + index->print(); CAMLreturn (Val_unit); }