Start of moving Value -> Node and Node -> old API Node (with a #define toggle)

This commit is contained in:
beder
2011-09-10 17:18:15 -05:00
parent 33a71151ca
commit 8fd372b0db
40 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include "yaml-cpp/value/detail/memory.h"
#include "yaml-cpp/value/detail/node.h"
namespace YAML
{
namespace detail
{
void memory_holder::merge(memory_holder& rhs)
{
if(m_pMemory == rhs.m_pMemory)
return;
m_pMemory->merge(*rhs.m_pMemory);
rhs.m_pMemory = m_pMemory;
}
node& memory::create_node()
{
shared_node pNode(new node);
m_nodes.insert(pNode);
return *pNode;
}
void memory::merge(const memory& rhs)
{
m_nodes.insert(rhs.m_nodes.begin(), rhs.m_nodes.end());
}
}
}