From c552070230c4ad9c92b516c28658b5c74c57e46b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 11 Jun 2015 18:12:09 +0200 Subject: Outline of parsing and serialization for manifest object model --- bpkg/manifest | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'bpkg/manifest') diff --git a/bpkg/manifest b/bpkg/manifest index bf17a64..a02a4a0 100644 --- a/bpkg/manifest +++ b/bpkg/manifest @@ -12,6 +12,10 @@ namespace bpkg { + class manifest_parser; + class manifest_serializer; + class manifest_name_value; + using strings = std::vector; // priority @@ -101,8 +105,9 @@ namespace bpkg std::string comment; }; - struct manifest + class manifest { + public: using priority_type = bpkg::priority; using url_type = bpkg::url; using email_type = bpkg::email; @@ -121,9 +126,23 @@ namespace bpkg butl::optional package_email; std::vector dependencies; std::vector requirements; + + public: + manifest (manifest_parser&); + manifest (manifest_parser&, const manifest_name_value& start); + + void + serialize (manifest_serializer&) const; }; - using manifests = std::vector; + class manifests: public std::vector + { + public: + manifests (manifest_parser&); + + void + serialize (manifest_serializer&) const; + }; } #endif // BPKG_MANIFEST -- cgit v1.1