Go to the documentation of this file.00001 #include <ros_type_introspection/renamer.hpp>
00002
00003 int main( int argc, char** argv)
00004 {
00005 using namespace RosIntrospection;
00006
00007 StringTree tree;
00008 std::vector<SString> vect;
00009
00010 #if !STATIC_TREE
00011 vect = {"A", "B", "1", "C", "D"};
00012 tree.insert( vect );
00013 vect = {"A", "B", "1", "E", "F"};
00014 tree.insert( vect );
00015 vect = {"A", "B", "1", "E", "G"};
00016 tree.insert( vect );
00017 vect = {"A", "B", "Y", "ONE"};
00018 tree.insert( vect );
00019 vect = {"A", "B", "1", "C", "B", "1"};
00020 tree.insert( vect );
00021 vect = {"A", "Y", "B", "1", "C"};
00022 tree.insert( vect );
00023 vect = {"B", "1"};
00024 tree.insert( vect );
00025 #else
00026
00027 #endif
00028
00029
00030
00031
00032 std::cout << tree << std::endl;
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 std::vector<const StringTreeNode*> heads;
00043
00044 vect = { "B", "1"};
00045
00046
00047 std::cout << "Found: "<< heads.size() << std::endl;
00048
00049 for (auto head: heads)
00050 {
00051 std::cout << std::make_pair( tree.croot(), head) << std::endl;
00052 }
00053
00054 return 0;
00055 }