diff options
Diffstat (limited to 'bpkg/types-parsers.hxx')
-rw-r--r-- | bpkg/types-parsers.hxx | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/bpkg/types-parsers.hxx b/bpkg/types-parsers.hxx index 343714c..7bbb414 100644 --- a/bpkg/types-parsers.hxx +++ b/bpkg/types-parsers.hxx @@ -1,5 +1,4 @@ // file : bpkg/types-parsers.hxx -*- C++ -*- -// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file // CLI parsers, included into the generated source files. @@ -8,6 +7,8 @@ #ifndef BPKG_TYPES_PARSERS_HXX #define BPKG_TYPES_PARSERS_HXX +#include <libbutl/standard-version.hxx> + #include <libbpkg/manifest.hxx> #include <bpkg/types.hxx> @@ -20,6 +21,16 @@ namespace bpkg namespace cli { template <> + struct parser<url> + { + static void + parse (url&, bool&, scanner&); + + static void + merge (url& b, const url& a) {b = a;} + }; + + template <> struct parser<path> { static void @@ -40,6 +51,29 @@ namespace bpkg }; template <> + struct parser<uuid> + { + static void + parse (uuid&, bool&, scanner&); + + static void + merge (uuid& b, const uuid& a) {b = a;} + }; + + template <> + struct parser<butl::standard_version> + { + static void + parse (butl::standard_version&, bool&, scanner&); + + static void + merge (butl::standard_version& b, const butl::standard_version& a) + { + b = a; + } + }; + + template <> struct parser<auth> { static void @@ -50,6 +84,39 @@ namespace bpkg }; template <> + struct parser<git_protocol_capabilities> + { + static void + parse (git_protocol_capabilities&, bool&, scanner&); + + static void + merge (git_protocol_capabilities& b, const git_protocol_capabilities& a) + { + b = a; + } + }; + + template <> + struct parser<git_capabilities_map> + { + static void + parse (git_capabilities_map&, bool&, scanner&); + + static void + merge (git_capabilities_map&, const git_capabilities_map&); + }; + + template <> + struct parser<stdout_format> + { + static void + parse (stdout_format&, bool&, scanner&); + + static void + merge (stdout_format& b, const stdout_format& a) {b = a;} + }; + + template <> struct parser<repository_type> { static void |