stlnode.h
Go to the documentation of this file.
1 #ifndef STLNODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
2 #define STLNODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
3 
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
5 #pragma once
6 #endif
7 
8 
9 #include <vector>
10 #include <map>
11 
12 namespace YAML_PM
13 {
14  template <typename T>
15  void operator >> (const Node& node, std::vector<T>& v)
16  {
17  v.clear();
18  v.resize(node.size());
19  for(unsigned i=0;i<node.size();++i)
20  node[i] >> v[i];
21  }
22 
23 
24  template <typename K, typename V>
25  void operator >> (const Node& node, std::map<K, V>& m)
26  {
27  m.clear();
28  for(Iterator it=node.begin();it!=node.end();++it) {
29  K k;
30  V v;
31  it.first() >> k;
32  it.second() >> v;
33  m[k] = v;
34  }
35  }
36 }
37 
38 #endif // STLNODE_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
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
YAML_PM::operator>>
void operator>>(const Node &node, Binary &binary)
Definition: binary.cpp:95
YAML_PM::Node::size
std::size_t size() const
Definition: node.cpp:178
YAML_PM::Node
Definition: node.h:33
YAML_PM::Iterator
Definition: iterator.h:16


mrpt_local_obstacles
Author(s): Jose-Luis Blanco-Claraco
autogenerated on Mon Aug 14 2023 02:09:04