mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Added Dump()
This commit is contained in:
@@ -15,6 +15,8 @@ namespace YAML
|
|||||||
|
|
||||||
Emitter& operator << (Emitter& out, const Node& node);
|
Emitter& operator << (Emitter& out, const Node& node);
|
||||||
std::ostream& operator << (std::ostream& 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
|
#endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
||||||
|
@@ -20,4 +20,11 @@ namespace YAML
|
|||||||
out << emitter.c_str();
|
out << emitter.c_str();
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string Dump(const Node& node)
|
||||||
|
{
|
||||||
|
Emitter emitter;
|
||||||
|
emitter << node;
|
||||||
|
return emitter.c_str();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user