scide: implement selectionLength for openDocument
[supercollider.git] / external_libraries / yaml-cpp-0.3.0 / src / aliasmanager.cpp
blobed4d3b5a47f3efe02cd44b9f5e0f0d714bb96522
1 #include "yaml-cpp/aliasmanager.h"
2 #include "yaml-cpp/node.h"
3 #include <cassert>
4 #include <sstream>
6 namespace YAML
8 AliasManager::AliasManager(): m_curAnchor(0)
12 void AliasManager::RegisterReference(const Node& node)
14 m_anchorByIdentity.insert(std::make_pair(&node, _CreateNewAnchor()));
17 anchor_t AliasManager::LookupAnchor(const Node& node) const
19 AnchorByIdentity::const_iterator it = m_anchorByIdentity.find(&node);
20 if(it == m_anchorByIdentity.end())
21 return 0;
22 return it->second;
25 anchor_t AliasManager::_CreateNewAnchor()
27 return ++m_curAnchor;