mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 13:01:18 +00:00
Started emitting events for Values
This commit is contained in:
22
src/value/valueevents.cpp
Normal file
22
src/value/valueevents.cpp
Normal 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) {
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user