Added Dump()

This commit is contained in:
Jesse Beder
2011-09-13 14:49:00 -05:00
parent c3798d9bd4
commit e5d0366797
2 changed files with 9 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ namespace YAML
Emitter& operator << (Emitter& out, const Node& node);
std::ostream& operator << (std::ostream& out, const Node& node);
std::string Dump(const Node& node);
}
#endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66

View File

@@ -20,4 +20,11 @@ namespace YAML
out << emitter.c_str();
return out;
}
std::string Dump(const Node& node)
{
Emitter emitter;
emitter << node;
return emitter.c_str();
}
}