diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-18 21:29:36 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-18 21:29:36 +0100 |
commit | 5dfa2b6cba3e31d18e2cc23f05d330e387fc1a29 (patch) | |
tree | 2f97711bd12bfdb35425c0ffaca5af6a231b8076 /src/core/common/VariantWriter.hpp | |
parent | f6d3495b681e19227a5ea9ec081d36644be55d68 (diff) | |
parent | 19e3e43e80e413d297ca8970d018eeda57ee65e1 (diff) |
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/common/VariantWriter.hpp')
-rw-r--r-- | src/core/common/VariantWriter.hpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/common/VariantWriter.hpp b/src/core/common/VariantWriter.hpp index 7fe32fb..12f4bba 100644 --- a/src/core/common/VariantWriter.hpp +++ b/src/core/common/VariantWriter.hpp @@ -59,8 +59,28 @@ public: * @param var is the variant that should be serialized. * @param pretty if true, the resulting value is properly indented. */ - static std::string writeJsonToString(const Variant &var, bool pretty = true); + static std::string writeJsonToString(const Variant &var, + bool pretty = true); + /** + * Dumps the Variant as re-readable ousia data. Note that the resulting + * data is invalid if the Variant consists of function or object references. + * + * @param var is the variant that should be serialized. + * @param stream is the stream the result should be written to. + * @param pretty if true, the resulting value is properly indented. + */ + static void writeOusia(const Variant &var, std::ostream &stream, + bool pretty = true); + + /** + * Dumps the Variant as re-readable ousia data to a string. + * + * @param var is the variant that should be serialized. + * @param pretty if true, the resulting value is properly indented. + */ + static std::string writeOusiaToString(const Variant &var, + bool pretty = true); }; } |