diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-01 11:42:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-01 11:42:15 +0200 |
commit | 28caabebc778daa242eb8f188351c42edb93b5cb (patch) | |
tree | 710c598a54a88d4ae02718839b51ae100223b0ca /bpkg/manifest | |
parent | 2f80e1bebe371b2b71cc8f1fee4bb9f561e19eb2 (diff) |
Minor refactoring/renaming
Diffstat (limited to 'bpkg/manifest')
-rw-r--r-- | bpkg/manifest | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/bpkg/manifest b/bpkg/manifest index 17d3190..aab1c91 100644 --- a/bpkg/manifest +++ b/bpkg/manifest @@ -227,18 +227,30 @@ namespace bpkg // enum class comparison {eq, lt, gt, le, ge}; - struct version_comparison + std::string + to_string (comparison); + + comparison + to_comparison (const std::string&); // May throw invalid_argument. + + inline std::ostream& + operator<< (std::ostream& os, comparison c) {return os << to_string (c);} + + struct dependency_condition { - version value; comparison operation; + bpkg::version version; }; struct dependency { - std::string package; - butl::optional<version_comparison> version; + std::string name; + butl::optional<dependency_condition> condition; }; + std::ostream& + operator<< (std::ostream&, const dependency&); + class dependency_alternatives: public std::vector<dependency> { public: |