| 7 | #include <stdio.h> |
| 8 | |
| 9 | int main(int argc, char* argv[]) |
| 10 | { |
| 11 | if(argc != 2) |
| 12 | { |
| 13 | printf("Wrong number of command line arguments\nUsage: %s [filename]\n", argv[0]); |
| 14 | return 1; |
| 15 | } |
| 16 | |
| 17 | BT::BehaviorTreeFactory factory; |
| 18 | |
| 19 | std::unordered_set<std::string> default_nodes; |
| 20 | for(auto& it : factory.manifests()) |
| 21 | { |
| 22 | const auto& manifest = it.second; |
| 23 | default_nodes.insert(manifest.registration_ID); |
| 24 | } |
| 25 | |
| 26 | factory.registerFromPlugin(argv[1]); |
| 27 | |
| 28 | for(auto& it : factory.manifests()) |
| 29 | { |
| 30 | const auto& manifest = it.second; |
| 31 | if(default_nodes.count(manifest.registration_ID) > 0) |
| 32 | { |
| 33 | continue; |
| 34 | } |
| 35 | auto& params = manifest.ports; |
| 36 | std::cout << "---------------\n" |
| 37 | << manifest.registration_ID << " [" << manifest.type |
| 38 | << "]\n NodeConfig: " << params.size(); |
| 39 | |
| 40 | if(params.size() > 0) |
| 41 | { |
| 42 | std::cout << ":"; |
| 43 | } |
| 44 | |
| 45 | std::cout << std::endl; |
| 46 | |
| 47 | for(auto& param : params) |
| 48 | { |
| 49 | std::cout << " - [Key]: \"" << param.first << "\"" << std::endl; |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | return 0; |
| 54 | } |
nothing calls this directly
no test coverage detected