print function.
[SXSI/xpathcomp.git] / src / lexindex_stub.cpp
index 2118e2e..bca2073 100644 (file)
@@ -28,10 +28,24 @@ public:
   vector<int32_t>::iterator tagVectorIt;
   vector<int32_t> tag2Vector;           
   vector<int32_t>::iterator tag2VectorIt;
+  void printVector(xml_tree::tag_t t, vector<int32_t> v);
   void print();
 };
 
-void lex_index::print(){printf("Print called\n");}
+void lex_index::printVector(xml_tree::tag_t t, vector<int32_t> v){
+  vector<int32_t>::iterator i=v.begin();
+  if (i!=v.end()) {
+      printf("%i-vector: [%i", t, *i);
+      for (++i; i!=v.end(); ++i)
+       printf(",%i",  *i);
+      printf("]\n");
+    }
+}
+
+void lex_index::print(){
+  printf("Print called\n");
+  printVector(tag, tagVector);
+}
 
 // class prefix_treeNode {
 // public: