From 276f68ee4d55befa8922378199b4281c82d4fd93 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 18 Apr 2019 20:15:46 +0300 Subject: Add parse_manifest() and serialize_manifest() functions --- libbutl/manifest-serializer.mxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libbutl/manifest-serializer.mxx') diff --git a/libbutl/manifest-serializer.mxx b/libbutl/manifest-serializer.mxx index 1b3ace8..2a8d32e 100644 --- a/libbutl/manifest-serializer.mxx +++ b/libbutl/manifest-serializer.mxx @@ -10,6 +10,7 @@ #ifndef __cpp_lib_modules #include +#include #include #include // size_t #include // runtime_error @@ -24,6 +25,9 @@ export module butl.manifest_serializer; import std.core; import std.io; #endif +import butl.manifest_types; +#else +#include #endif #include @@ -136,6 +140,15 @@ LIBBUTL_MODEXPORT namespace butl bool long_lines_; const std::function filter_; }; + + // Serialize a manifest to a stream adding the leading format version pair + // and the trailing end-of-manifest pair. Unless eos is false, then also + // write the end-of-stream pair. + // + LIBBUTL_SYMEXPORT void + serialize_manifest (manifest_serializer&, + const std::vector&, + bool eos = true); } #include -- cgit v1.1