Flattened the src directory, and added back yaml.h (since it used to be generated)

This commit is contained in:
beder
2012-01-21 00:06:32 -06:00
parent 90f48fd035
commit b0b0c191b9
12 changed files with 25 additions and 18 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();
}
}