Registrar.cpp
Go to the documentation of this file.
1 #include "PointMatcher.h"
2 
3 #include <yaml-cpp/yaml.h>
4 
5 namespace PointMatcherSupport
6 {
8  {
9  if (module.size() != 1)
10  {
11  // parameter-less entry
12  name = module.as<std::string>();
13  }
14  else
15  {
16  // get parameters
17  YAML::const_iterator mapIt(module.begin());
18  name = mapIt->first.as<std::string>();
19  for(YAML::const_iterator paramIt = mapIt->second.begin(); paramIt != mapIt->second.end(); ++paramIt)
20  {
21  std::string key = paramIt->first.as<std::string>();
22  if (paramIt->second.IsSequence())
23  {
24  std::ostringstream oss;
25  oss << "[";
26  for(int i = 0; i < paramIt->second.size()-1; ++i)
27  {
28  oss << paramIt->second[i] << ", ";
29  }
30  oss << paramIt->second[paramIt->second.size()-1] << "]";
31  params[key] = oss.str();
32  }
33  else
34  {
35  params[key] = paramIt->second.as<std::string>();
36  }
37  }
38  }
39  }
40 }
icp_customized.name
string name
Definition: icp_customized.py:45
testing::internal::string
::std::string string
Definition: gtest.h:1979
align_sequence.params
params
Definition: align_sequence.py:13
PointMatcherSupport::getNameParamsFromYAML
void getNameParamsFromYAML(const YAML::Node &module, std::string &name, Parametrizable::Parameters &params)
Retrieve name and parameters from a yaml node.
Definition: Registrar.cpp:7
PointMatcherSupport
Functions and classes that are not dependant on scalar type are defined in this namespace.
Definition: Bibliography.cpp:45
PointMatcher.h
public interface
PointMatcherSupport::Parametrizable::Parameters
std::map< std::string, Parameter > Parameters
Parameters stored as a map of string->string.
Definition: Parametrizable.h:199


libpointmatcher
Author(s):
autogenerated on Mon Sep 16 2024 02:24:10