Registrar.cpp
Go to the documentation of this file.
1 #include "PointMatcher.h"
2 
3 #ifdef SYSTEM_YAML_CPP
4  #include "yaml-cpp/yaml.h"
5 #else
6  #include "yaml-cpp-pm/yaml.h"
7  namespace YAML = YAML_PM;
8 #endif // HAVE_YAML_CPP
9 
10 namespace PointMatcherSupport
11 {
13  {
14  if (module.size() != 1)
15  {
16  // parameter-less entry
17  name = module.to<std::string>();
18  }
19  else
20  {
21  // get parameters
22  YAML::Iterator mapIt(module.begin());
23  mapIt.first() >> name;
24  for(YAML::Iterator paramIt = mapIt.second().begin(); paramIt != mapIt.second().end(); ++paramIt)
25  {
26  std::string key, value;
27  paramIt.first() >> key;
28  paramIt.second() >> value;
29  params[key] = value;
30  }
31  }
32  }
33 }
YAML_PM::Node::begin
Iterator begin() const
Definition: node.cpp:141
YAML_PM
Definition: aliasmanager.h:11
YAML_PM::Node::end
Iterator end() const
Definition: node.cpp:159
testing::internal::string
::std::string string
Definition: gtest.h:1979
yaml.h
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:12
YAML_PM::Node::size
std::size_t size() const
Definition: node.cpp:178
YAML_PM::Node
Definition: node.h:33
YAML_PM::Node::to
const T to() const
Definition: nodeimpl.h:16
YAML_PM::Iterator
Definition: iterator.h:16
YAML_PM::Iterator::second
const Node & second() const
Definition: iterator.cpp:78
PointMatcherSupport
Functions and classes that are not dependant on scalar type are defined in this namespace.
Definition: Bibliography.cpp:45
PointMatcher.h
public interface
YAML_PM::Iterator::first
const Node & first() const
Definition: iterator.cpp:70
PointMatcherSupport::Parametrizable::Parameters
std::map< std::string, Parameter > Parameters
Parameters stored as a map of string->string.
Definition: Parametrizable.h:156


mp2p_icp
Author(s):
autogenerated on Fri Dec 20 2024 03:45:59