Started emitting events for Values

This commit is contained in:
beder
2011-09-10 12:42:42 -05:00
parent b8e9b52af7
commit dcf9309ea8
4 changed files with 60 additions and 0 deletions

22
src/value/valueevents.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "valueevents.h"
namespace YAML
{
ValueEvents::ValueEvents(const Value& value): m_pMemory(value.m_pMemory), m_root(*value.m_pNode)
{
Visit(m_root);
}
void Visit(detail::node& node)
{
int& refCount = m_refCount[node.ref()];
refCount++;
if(refCount > 1)
return;
if(node.type() == ValueType::Sequence) {
} else if(node.type() == ValueType::Map) {
}
}
}