From f01e037f65f4896d65979c5f25a7169ba3d696f9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 3 Dec 2021 15:13:15 +0300 Subject: Adjust types for future support of multiple dependencies in an alternative --- libbpkg/manifest.hxx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'libbpkg/manifest.hxx') diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx index f487a90..ef44fcb 100644 --- a/libbpkg/manifest.hxx +++ b/libbpkg/manifest.hxx @@ -455,7 +455,26 @@ namespace bpkg // depends // - class dependency_alternatives: public butl::small_vector + class dependency_alternative: public butl::small_vector + { + public: + butl::optional enable; + + dependency_alternative () = default; + dependency_alternative (butl::optional e) + : enable (std::move (e)) {} + + // Parse the dependency alternative string representation. + // + explicit LIBBPKG_EXPORT + dependency_alternative (const std::string&); + + LIBBPKG_EXPORT std::string + string () const; + }; + + class dependency_alternatives: + public butl::small_vector { public: bool conditional; @@ -468,7 +487,7 @@ namespace bpkg // Parse the dependency alternatives string representation in the // `[?][*] [ '|' ]* [; ]` form. Throw - // std::invalid_argument if the value is invalid. + // std::invalid_argument if the value is invalid. @@ DEP @@ TMP update. // explicit LIBBPKG_EXPORT dependency_alternatives (const std::string&); -- cgit v1.1