stringtree_test.cpp
Go to the documentation of this file.
1 #include "ros_type_introspection/renamer.hpp>
2 
3 int main( int argc, char** argv)
4 {
5  using namespace RosIntrospection;
6 
7  StringTree tree;
8  std::vector<SString> vect;
9 
10 #if !STATIC_TREE
11  vect = {"A", "B", "1", "C", "D"};
12  tree.insert( vect );
13  vect = {"A", "B", "1", "E", "F"};
14  tree.insert( vect );
15  vect = {"A", "B", "1", "E", "G"};
16  tree.insert( vect );
17  vect = {"A", "B", "Y", "ONE"};
18  tree.insert( vect );
19  vect = {"A", "B", "1", "C", "B", "1"};
20  tree.insert( vect );
21  vect = {"A", "Y", "B", "1", "C"};
22  tree.insert( vect );
23  vect = {"B", "1"};
24  tree.insert( vect );
25 #else
26 
27 #endif
28 
29 
30  // bool ret = FindPatternHead(vect, 0, tree.croot(), head);
31 
32  std::cout << tree << std::endl;
33 
34  /* std::cout << ret << std::endl;
35  if(ret)
36  {
37 
38  }*/
39 
40 
41 
42  std::vector<const StringTreeNode*> heads;
43 
44  vect = { "B", "1"};
45 
46  //FindPattern(vect,0, tree.croot() ,heads);
47  std::cout << "Found: "<< heads.size() << std::endl;
48 
49  for (auto head: heads)
50  {
51  std::cout << std::make_pair( tree.croot(), head) << std::endl;
52  }
53 
54  return 0;
55 }
int main(int argc, char **argv)
const TreeNode< T > * croot() const


type_introspection_tests
Author(s): Davide Faconti
autogenerated on Fri Apr 13 2018 02:21:58