nodeownership.cpp
Go to the documentation of this file.
00001 #include "nodeownership.h"
00002 #include "yaml-cpp-pm/node.h"
00003 
00004 namespace YAML_PM
00005 {
00006         NodeOwnership::NodeOwnership(NodeOwnership *pOwner): m_pOwner(pOwner)
00007         {
00008                 if(!m_pOwner)
00009                         m_pOwner = this;
00010         }
00011         
00012         NodeOwnership::~NodeOwnership()
00013         {
00014         }
00015 
00016         Node& NodeOwnership::_Create()
00017         {
00018                 m_nodes.push_back(std::auto_ptr<Node>(new Node));
00019                 return m_nodes.back();
00020         }
00021 
00022         void NodeOwnership::_MarkAsAliased(const Node& node)
00023         {
00024                 m_aliasedNodes.insert(&node);
00025         }
00026 
00027         bool NodeOwnership::_IsAliased(const Node& node) const
00028         {
00029                 return m_aliasedNodes.count(&node) > 0;
00030         }
00031 }


upstream_src
Author(s):
autogenerated on Mon Oct 6 2014 10:27:42