diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-11 18:12:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-11 18:12:09 +0200 |
commit | c552070230c4ad9c92b516c28658b5c74c57e46b (patch) | |
tree | bc78a4c9c5c9bfb21539e3e65f713a7f0daa766b /bpkg/manifest | |
parent | 294f8e8d3abebaaa976c7d21248a1a205c869b02 (diff) |
Outline of parsing and serialization for manifest object model
Diffstat (limited to 'bpkg/manifest')
-rw-r--r-- | bpkg/manifest | 23 |
1 files changed, 21 insertions, 2 deletions
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<std::string>; // 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<email_type> package_email; std::vector<dependency_alternatives> dependencies; std::vector<requirement_alternatives> requirements; + + public: + manifest (manifest_parser&); + manifest (manifest_parser&, const manifest_name_value& start); + + void + serialize (manifest_serializer&) const; }; - using manifests = std::vector<manifest>; + class manifests: public std::vector<manifest> + { + public: + manifests (manifest_parser&); + + void + serialize (manifest_serializer&) const; + }; } #endif // BPKG_MANIFEST |