Registrar.cpp
Go to the documentation of this file.
00001 #include "PointMatcher.h"
00002 
00003 #ifdef SYSTEM_YAML_CPP
00004     #include "yaml-cpp/yaml.h"
00005 #else
00006         #include "yaml-cpp-pm/yaml.h"
00007     namespace YAML = YAML_PM;
00008 #endif // HAVE_YAML_CPP
00009 
00010 namespace PointMatcherSupport
00011 {
00012         void getNameParamsFromYAML(const YAML::Node& module, std::string& name, Parametrizable::Parameters& params)
00013         {
00014                 if (module.size() != 1)
00015                 {
00016                         // parameter-less entry
00017                         name = module.to<std::string>();
00018                 }
00019                 else
00020                 {
00021                         // get parameters
00022       YAML::Iterator mapIt(module.begin());
00023                         mapIt.first() >> name;
00024       for(YAML::Iterator paramIt = mapIt.second().begin(); paramIt != mapIt.second().end(); ++paramIt)
00025                         {
00026                                 std::string key, value;
00027                                 paramIt.first() >> key;
00028                                 paramIt.second() >> value;
00029                                 params[key] = value;
00030                         }
00031                 }
00032         }
00033 }


libpointmatcher
Author(s):
autogenerated on Thu Jun 20 2019 19:51:32