aliasmanager.cpp
Go to the documentation of this file.
2 #include "yaml-cpp-pm/node.h"
3 #include <cassert>
4 #include <sstream>
5 
6 namespace YAML_PM
7 {
8  AliasManager::AliasManager(): m_curAnchor(0)
9  {
10  }
11 
13  {
14  m_anchorByIdentity.insert(std::make_pair(&node, _CreateNewAnchor()));
15  }
16 
18  {
19  AnchorByIdentity::const_iterator it = m_anchorByIdentity.find(&node);
20  if(it == m_anchorByIdentity.end())
21  return 0;
22  return it->second;
23  }
24 
26  {
27  return ++m_curAnchor;
28  }
29 }
void RegisterReference(const Node &node)
AnchorByIdentity m_anchorByIdentity
Definition: aliasmanager.h:28
std::size_t anchor_t
Definition: anchor.h:12
anchor_t _CreateNewAnchor()
anchor_t LookupAnchor(const Node &node) const


libpointmatcher
Author(s):
autogenerated on Sat May 27 2023 02:36:30