Copied all files from new-api branch of old repo

This commit is contained in:
Jesse Beder
2012-05-19 15:34:02 -05:00
parent c8a539f4f4
commit c22512649e
38 changed files with 4333 additions and 27 deletions

30
src/emit.cpp Normal file
View File

@@ -0,0 +1,30 @@
#include "yaml-cpp/node/emit.h"
#include "yaml-cpp/emitfromevents.h"
#include "yaml-cpp/emitter.h"
#include "nodeevents.h"
namespace YAML
{
Emitter& operator << (Emitter& out, const Node& node)
{
EmitFromEvents emitFromEvents(out);
NodeEvents events(node);
events.Emit(emitFromEvents);
return out;
}
std::ostream& operator << (std::ostream& out, const Node& node)
{
Emitter emitter;
emitter << node;
out << emitter.c_str();
return out;
}
std::string Dump(const Node& node)
{
Emitter emitter;
emitter << node;
return emitter.c_str();
}
}