aboutsummaryrefslogtreecommitdiff
path: root/libbutl/manifest-serializer.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-11-23 19:24:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-11-24 13:59:15 +0300
commit405dfa3e28ab71d4f6b5210faba0e3600070a0f3 (patch)
treee2e1de8213968c8b299904b48a60d4914eb1487b /libbutl/manifest-serializer.hxx
parentb90126986fbeec6f42d469e99574096c3f6abc22 (diff)
Add support for new-fashioned multi-line manifest value introducer
Diffstat (limited to 'libbutl/manifest-serializer.hxx')
-rw-r--r--libbutl/manifest-serializer.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbutl/manifest-serializer.hxx b/libbutl/manifest-serializer.hxx
index 43924e7..2159901 100644
--- a/libbutl/manifest-serializer.hxx
+++ b/libbutl/manifest-serializer.hxx
@@ -45,14 +45,19 @@ namespace butl
// Unless long_lines is true, break lines in values (including multi-line)
// so that their length does not exceed 78 codepoints (including '\n').
//
+ // Note that the multiline_v2 flag is temporary and should not be used
+ // except by the implementation for testing.
+ //
manifest_serializer (std::ostream& os,
const std::string& name,
bool long_lines = false,
- std::function<filter_function> filter = {})
+ std::function<filter_function> filter = {},
+ bool multiline_v2 = false)
: os_ (os),
name_ (name),
long_lines_ (long_lines),
- filter_ (std::move (filter))
+ filter_ (std::move (filter)),
+ multiline_v2_ (multiline_v2)
{
}
@@ -123,6 +128,7 @@ namespace butl
const std::string name_;
bool long_lines_;
const std::function<filter_function> filter_;
+ bool multiline_v2_;
};
// Serialize a manifest to a stream adding the leading format version pair