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

This commit is contained in:
Jesse Beder
2011-09-10 17:18:15 -05:00
parent 78b7a1b8a9
commit ac81d7c883
40 changed files with 0 additions and 0 deletions

23
src/node/emit.cpp Normal file
View File

@@ -0,0 +1,23 @@
#include "yaml-cpp/value/emit.h"
#include "yaml-cpp/emitfromevents.h"
#include "yaml-cpp/emitter.h"
#include "valueevents.h"
namespace YAML
{
Emitter& operator << (Emitter& out, const Value& value)
{
EmitFromEvents emitFromEvents(out);
ValueEvents events(value);
events.Emit(emitFromEvents);
return out;
}
std::ostream& operator << (std::ostream& out, const Value& value)
{
Emitter emitter;
emitter << value;
out << emitter.c_str();
return out;
}
}