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 }
aliasmanager.h
YAML_PM
Definition: aliasmanager.h:11
YAML_PM::AliasManager::_CreateNewAnchor
anchor_t _CreateNewAnchor()
Definition: aliasmanager.cpp:25
YAML_PM::AliasManager::LookupAnchor
anchor_t LookupAnchor(const Node &node) const
Definition: aliasmanager.cpp:17
node.h
YAML_PM::AliasManager::AliasManager
AliasManager()
Definition: aliasmanager.cpp:8
YAML_PM::Node
Definition: node.h:33
YAML_PM::AliasManager::m_curAnchor
anchor_t m_curAnchor
Definition: aliasmanager.h:30
YAML_PM::AliasManager::RegisterReference
void RegisterReference(const Node &node)
Definition: aliasmanager.cpp:12
YAML_PM::anchor_t
std::size_t anchor_t
Definition: anchor.h:12
YAML_PM::AliasManager::m_anchorByIdentity
AnchorByIdentity m_anchorByIdentity
Definition: aliasmanager.h:28


mp2p_icp
Author(s):
autogenerated on Wed Oct 23 2024 02:45:38