diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-21 11:08:50 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-21 11:08:50 +0300 |
commit | a51a5f81cabeb15fe8bf7fa6d02e287763758a69 (patch) | |
tree | 55e939e72deb11bbf7e0aad60000d2f3fa576ede /mod | |
parent | 57f6378aea619ceb07b935012772bd4698e6a2be (diff) |
Make changes required for CIci
Diffstat (limited to 'mod')
-rw-r--r-- | mod/module-options.cxx | 12576 | ||||
-rw-r--r-- | mod/module-options.hxx | 5543 | ||||
-rw-r--r-- | mod/module-options.ixx | 4062 |
3 files changed, 22181 insertions, 0 deletions
diff --git a/mod/module-options.cxx b/mod/module-options.cxx new file mode 100644 index 0000000..65f75a8 --- /dev/null +++ b/mod/module-options.cxx @@ -0,0 +1,12576 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +// Begin prologue. +// +#include <mod/types-parsers.hxx> +// +// End prologue. + +#include <mod/module-options.hxx> + +#include <map> +#include <set> +#include <string> +#include <vector> +#include <utility> +#include <ostream> +#include <sstream> +#include <cstring> +#include <fstream> + +namespace brep +{ + namespace cli + { + // unknown_option + // + unknown_option:: + ~unknown_option () noexcept + { + } + + void unknown_option:: + print (::std::ostream& os) const + { + os << "unknown option '" << option ().c_str () << "'"; + } + + const char* unknown_option:: + what () const noexcept + { + return "unknown option"; + } + + // unknown_argument + // + unknown_argument:: + ~unknown_argument () noexcept + { + } + + void unknown_argument:: + print (::std::ostream& os) const + { + os << "unknown argument '" << argument ().c_str () << "'"; + } + + const char* unknown_argument:: + what () const noexcept + { + return "unknown argument"; + } + + // missing_value + // + missing_value:: + ~missing_value () noexcept + { + } + + void missing_value:: + print (::std::ostream& os) const + { + os << "missing value for option '" << option ().c_str () << "'"; + } + + const char* missing_value:: + what () const noexcept + { + return "missing option value"; + } + + // invalid_value + // + invalid_value:: + ~invalid_value () noexcept + { + } + + void invalid_value:: + print (::std::ostream& os) const + { + os << "invalid value '" << value ().c_str () << "' for option '" + << option ().c_str () << "'"; + + if (!message ().empty ()) + os << ": " << message ().c_str (); + } + + const char* invalid_value:: + what () const noexcept + { + return "invalid option value"; + } + + // eos_reached + // + void eos_reached:: + print (::std::ostream& os) const + { + os << what (); + } + + const char* eos_reached:: + what () const noexcept + { + return "end of argument stream reached"; + } + + // file_io_failure + // + file_io_failure:: + ~file_io_failure () noexcept + { + } + + void file_io_failure:: + print (::std::ostream& os) const + { + os << "unable to open file '" << file ().c_str () << "' or read failure"; + } + + const char* file_io_failure:: + what () const noexcept + { + return "unable to open file or read failure"; + } + + // unmatched_quote + // + unmatched_quote:: + ~unmatched_quote () noexcept + { + } + + void unmatched_quote:: + print (::std::ostream& os) const + { + os << "unmatched quote in argument '" << argument ().c_str () << "'"; + } + + const char* unmatched_quote:: + what () const noexcept + { + return "unmatched quote"; + } + + // scanner + // + scanner:: + ~scanner () + { + } + + // argv_scanner + // + bool argv_scanner:: + more () + { + return i_ < argc_; + } + + const char* argv_scanner:: + peek () + { + if (i_ < argc_) + return argv_[i_]; + else + throw eos_reached (); + } + + const char* argv_scanner:: + next () + { + if (i_ < argc_) + { + const char* r (argv_[i_]); + + if (erase_) + { + for (int i (i_ + 1); i < argc_; ++i) + argv_[i - 1] = argv_[i]; + + --argc_; + argv_[argc_] = 0; + } + else + ++i_; + + ++start_position_; + return r; + } + else + throw eos_reached (); + } + + void argv_scanner:: + skip () + { + if (i_ < argc_) + { + ++i_; + ++start_position_; + } + else + throw eos_reached (); + } + + std::size_t argv_scanner:: + position () + { + return start_position_; + } + + // argv_file_scanner + // + int argv_file_scanner::zero_argc_ = 0; + std::string argv_file_scanner::empty_string_; + + bool argv_file_scanner:: + more () + { + if (!args_.empty ()) + return true; + + while (base::more ()) + { + // See if the next argument is the file option. + // + const char* a (base::peek ()); + const option_info* oi = 0; + const char* ov = 0; + + if (!skip_) + { + if ((oi = find (a)) != 0) + { + base::next (); + + if (!base::more ()) + throw missing_value (a); + + ov = base::next (); + } + } + + if (oi != 0) + { + if (oi->search_func != 0) + { + std::string f (oi->search_func (ov, oi->arg)); + + if (!f.empty ()) + load (f); + } + else + load (ov); + + if (!args_.empty ()) + return true; + } + else + { + if (!skip_) + skip_ = (std::strcmp (a, "--") == 0); + + return true; + } + } + + return false; + } + + const char* argv_file_scanner:: + peek () + { + if (!more ()) + throw eos_reached (); + + return args_.empty () ? base::peek () : args_.front ().value.c_str (); + } + + const std::string& argv_file_scanner:: + peek_file () + { + if (!more ()) + throw eos_reached (); + + return args_.empty () ? empty_string_ : *args_.front ().file; + } + + std::size_t argv_file_scanner:: + peek_line () + { + if (!more ()) + throw eos_reached (); + + return args_.empty () ? 0 : args_.front ().line; + } + + const char* argv_file_scanner:: + next () + { + if (!more ()) + throw eos_reached (); + + if (args_.empty ()) + return base::next (); + else + { + hold_[i_ == 0 ? ++i_ : --i_].swap (args_.front ().value); + args_.pop_front (); + ++start_position_; + return hold_[i_].c_str (); + } + } + + void argv_file_scanner:: + skip () + { + if (!more ()) + throw eos_reached (); + + if (args_.empty ()) + return base::skip (); + else + { + args_.pop_front (); + ++start_position_; + } + } + + const argv_file_scanner::option_info* argv_file_scanner:: + find (const char* a) const + { + for (std::size_t i (0); i < options_count_; ++i) + if (std::strcmp (a, options_[i].option) == 0) + return &options_[i]; + + return 0; + } + + std::size_t argv_file_scanner:: + position () + { + return start_position_; + } + + void argv_file_scanner:: + load (const std::string& file) + { + using namespace std; + + ifstream is (file.c_str ()); + + if (!is.is_open ()) + throw file_io_failure (file); + + files_.push_back (file); + + arg a; + a.file = &*files_.rbegin (); + + for (a.line = 1; !is.eof (); ++a.line) + { + string line; + getline (is, line); + + if (is.fail () && !is.eof ()) + throw file_io_failure (file); + + string::size_type n (line.size ()); + + // Trim the line from leading and trailing whitespaces. + // + if (n != 0) + { + const char* f (line.c_str ()); + const char* l (f + n); + + const char* of (f); + while (f < l && (*f == ' ' || *f == '\t' || *f == '\r')) + ++f; + + --l; + + const char* ol (l); + while (l > f && (*l == ' ' || *l == '\t' || *l == '\r')) + --l; + + if (f != of || l != ol) + line = f <= l ? string (f, l - f + 1) : string (); + } + + // Ignore empty lines, those that start with #. + // + if (line.empty () || line[0] == '#') + continue; + + string::size_type p (string::npos); + p = line.find (' '); + + string s1; + if (p != string::npos) + { + s1.assign (line, 0, p); + + // Skip leading whitespaces in the argument. + // + n = line.size (); + for (++p; p < n; ++p) + { + char c (line[p]); + if (c != ' ' && c != '\t' && c != '\r') + break; + } + } + else if (!skip_) + skip_ = (line == "--"); + + string s2 (line, p != string::npos ? p : 0); + + // If the string (which is an option value or argument) is + // wrapped in quotes, remove them. + // + n = s2.size (); + char cf (s2[0]), cl (s2[n - 1]); + + if (cf == '"' || cf == '\'' || cl == '"' || cl == '\'') + { + if (n == 1 || cf != cl) + throw unmatched_quote (s2); + + s2 = string (s2, 1, n - 2); + } + + if (!s1.empty ()) + { + // See if this is another file option. + // + const option_info* oi; + if (!skip_ && (oi = find (s1.c_str ()))) + { + if (s2.empty ()) + throw missing_value (oi->option); + + if (oi->search_func != 0) + { + string f (oi->search_func (s2.c_str (), oi->arg)); + if (!f.empty ()) + load (f); + } + else + { + // If the path of the file being parsed is not simple and the + // path of the file that needs to be loaded is relative, then + // complete the latter using the former as a base. + // +#ifndef _WIN32 + string::size_type p (file.find_last_of ('/')); + bool c (p != string::npos && s2[0] != '/'); +#else + string::size_type p (file.find_last_of ("/\\")); + bool c (p != string::npos && s2[1] != ':'); +#endif + if (c) + s2.insert (0, file, 0, p + 1); + + load (s2); + } + + continue; + } + + a.value = s1; + args_.push_back (a); + } + + a.value = s2; + args_.push_back (a); + } + } + + void options:: + push_back (const option& o) + { + container_type::size_type n (size ()); + container_type::push_back (o); + map_[o.name ()] = n; + + for (option_names::const_iterator i (o.aliases ().begin ()); + i != o.aliases ().end (); ++i) + map_[*i] = n; + } + + template <typename X> + struct parser + { + static void + parse (X& x, bool& xs, scanner& s) + { + using namespace std; + + const char* o (s.next ()); + if (s.more ()) + { + string v (s.next ()); + istringstream is (v); + if (!(is >> x && is.peek () == istringstream::traits_type::eof ())) + throw invalid_value (o, v); + } + else + throw missing_value (o); + + xs = true; + } + }; + + template <> + struct parser<bool> + { + static void + parse (bool& x, bool& xs, scanner& s) + { + const char* o (s.next ()); + + if (s.more ()) + { + const char* v (s.next ()); + + if (std::strcmp (v, "1") == 0 || + std::strcmp (v, "true") == 0 || + std::strcmp (v, "TRUE") == 0 || + std::strcmp (v, "True") == 0) + x = true; + else if (std::strcmp (v, "0") == 0 || + std::strcmp (v, "false") == 0 || + std::strcmp (v, "FALSE") == 0 || + std::strcmp (v, "False") == 0) + x = false; + else + throw invalid_value (o, v); + } + else + throw missing_value (o); + + xs = true; + } + }; + + template <> + struct parser<std::string> + { + static void + parse (std::string& x, bool& xs, scanner& s) + { + const char* o (s.next ()); + + if (s.more ()) + x = s.next (); + else + throw missing_value (o); + + xs = true; + } + }; + + template <typename X> + struct parser<std::pair<X, std::size_t> > + { + static void + parse (std::pair<X, std::size_t>& x, bool& xs, scanner& s) + { + x.second = s.position (); + parser<X>::parse (x.first, xs, s); + } + }; + + template <typename X> + struct parser<std::vector<X> > + { + static void + parse (std::vector<X>& c, bool& xs, scanner& s) + { + X x; + bool dummy; + parser<X>::parse (x, dummy, s); + c.push_back (x); + xs = true; + } + }; + + template <typename X, typename C> + struct parser<std::set<X, C> > + { + static void + parse (std::set<X, C>& c, bool& xs, scanner& s) + { + X x; + bool dummy; + parser<X>::parse (x, dummy, s); + c.insert (x); + xs = true; + } + }; + + template <typename K, typename V, typename C> + struct parser<std::map<K, V, C> > + { + static void + parse (std::map<K, V, C>& m, bool& xs, scanner& s) + { + const char* o (s.next ()); + + if (s.more ()) + { + std::size_t pos (s.position ()); + std::string ov (s.next ()); + std::string::size_type p = ov.find ('='); + + K k = K (); + V v = V (); + std::string kstr (ov, 0, p); + std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); + + int ac (2); + char* av[] = + { + const_cast<char*> (o), + 0 + }; + + bool dummy; + if (!kstr.empty ()) + { + av[1] = const_cast<char*> (kstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser<K>::parse (k, dummy, s); + } + + if (!vstr.empty ()) + { + av[1] = const_cast<char*> (vstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser<V>::parse (v, dummy, s); + } + + m[k] = v; + } + else + throw missing_value (o); + + xs = true; + } + }; + + template <typename K, typename V, typename C> + struct parser<std::multimap<K, V, C> > + { + static void + parse (std::multimap<K, V, C>& m, bool& xs, scanner& s) + { + const char* o (s.next ()); + + if (s.more ()) + { + std::size_t pos (s.position ()); + std::string ov (s.next ()); + std::string::size_type p = ov.find ('='); + + K k = K (); + V v = V (); + std::string kstr (ov, 0, p); + std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ())); + + int ac (2); + char* av[] = + { + const_cast<char*> (o), + 0 + }; + + bool dummy; + if (!kstr.empty ()) + { + av[1] = const_cast<char*> (kstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser<K>::parse (k, dummy, s); + } + + if (!vstr.empty ()) + { + av[1] = const_cast<char*> (vstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser<V>::parse (v, dummy, s); + } + + m.insert (typename std::multimap<K, V, C>::value_type (k, v)); + } + else + throw missing_value (o); + + xs = true; + } + }; + + template <typename X, typename T, T X::*M> + void + thunk (X& x, scanner& s) + { + parser<T>::parse (x.*M, s); + } + + template <typename X, bool X::*M> + void + thunk (X& x, scanner& s) + { + s.next (); + x.*M = true; + } + + template <typename X, typename T, T X::*M, bool X::*S> + void + thunk (X& x, scanner& s) + { + parser<T>::parse (x.*M, x.*S, s); + } + } +} + +#include <map> + +namespace brep +{ + namespace options + { + // repository_email + // + + repository_email:: + repository_email () + : email_ (), + email_specified_ (false) + { + } + + repository_email:: + repository_email (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : email_ (), + email_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + repository_email:: + repository_email (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : email_ (), + email_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + repository_email:: + repository_email (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : email_ (), + email_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_email:: + repository_email (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : email_ (), + email_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_email:: + repository_email (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : email_ (), + email_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para repository_email:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "email <email> Repository email." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_repository_email_desc_type: ::brep::cli::options + { + _cli_repository_email_desc_type () + { + ::brep::options::repository_email::fill (*this); + } + }; + + void repository_email:: + fill (::brep::cli::options& os) + { + // email + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("email", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& repository_email:: + description () + { + static _cli_repository_email_desc_type _cli_repository_email_desc_; + return _cli_repository_email_desc_; + } + + typedef + std::map<std::string, void (*) (repository_email&, ::brep::cli::scanner&)> + _cli_repository_email_map; + + static _cli_repository_email_map _cli_repository_email_map_; + + struct _cli_repository_email_map_init + { + _cli_repository_email_map_init () + { + _cli_repository_email_map_["email"] = + &::brep::cli::thunk< repository_email, string, &repository_email::email_, + &repository_email::email_specified_ >; + } + }; + + static _cli_repository_email_map_init _cli_repository_email_map_init_; + + bool repository_email:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_repository_email_map::const_iterator i (_cli_repository_email_map_.find (o)); + + if (i != _cli_repository_email_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool repository_email:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // repository_url + // + + repository_url:: + repository_url () + : host_ (), + host_specified_ (false), + root_ ("/"), + root_specified_ (false) + { + } + + repository_url:: + repository_url (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : host_ (), + host_specified_ (false), + root_ ("/"), + root_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + repository_url:: + repository_url (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : host_ (), + host_specified_ (false), + root_ ("/"), + root_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + repository_url:: + repository_url (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : host_ (), + host_specified_ (false), + root_ ("/"), + root_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_url:: + repository_url (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : host_ (), + host_specified_ (false), + root_ ("/"), + root_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_url:: + repository_url (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : host_ (), + host_specified_ (false), + root_ ("/"), + root_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para repository_url:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "host <host> Repository host." << ::std::endl; + + os << "root <path> Repository root." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_repository_url_desc_type: ::brep::cli::options + { + _cli_repository_url_desc_type () + { + ::brep::options::repository_url::fill (*this); + } + }; + + void repository_url:: + fill (::brep::cli::options& os) + { + // host + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("host", a, false, dv); + os.push_back (o); + } + + // root + // + { + ::brep::cli::option_names a; + std::string dv ("/"); + ::brep::cli::option o ("root", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& repository_url:: + description () + { + static _cli_repository_url_desc_type _cli_repository_url_desc_; + return _cli_repository_url_desc_; + } + + typedef + std::map<std::string, void (*) (repository_url&, ::brep::cli::scanner&)> + _cli_repository_url_map; + + static _cli_repository_url_map _cli_repository_url_map_; + + struct _cli_repository_url_map_init + { + _cli_repository_url_map_init () + { + _cli_repository_url_map_["host"] = + &::brep::cli::thunk< repository_url, string, &repository_url::host_, + &repository_url::host_specified_ >; + _cli_repository_url_map_["root"] = + &::brep::cli::thunk< repository_url, dir_path, &repository_url::root_, + &repository_url::root_specified_ >; + } + }; + + static _cli_repository_url_map_init _cli_repository_url_map_init_; + + bool repository_url:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_repository_url_map::const_iterator i (_cli_repository_url_map_.find (o)); + + if (i != _cli_repository_url_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool repository_url:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_email_notification + // + + build_email_notification:: + build_email_notification () + : build_toolchain_email_ (), + build_toolchain_email_specified_ (false) + { + } + + build_email_notification:: + build_email_notification (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_toolchain_email_ (), + build_toolchain_email_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_email_notification:: + build_email_notification (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_toolchain_email_ (), + build_toolchain_email_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_email_notification:: + build_email_notification (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_toolchain_email_ (), + build_toolchain_email_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_email_notification:: + build_email_notification (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_toolchain_email_ (), + build_toolchain_email_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_email_notification:: + build_email_notification (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_toolchain_email_ (), + build_toolchain_email_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_email_notification:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // repository_email base + // + p = ::brep::options::repository_email::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "build-toolchain-email <name>=<mode> Enable or disable package build" << ::std::endl + << " notification emails." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_email_notification_desc_type: ::brep::cli::options + { + _cli_build_email_notification_desc_type () + { + ::brep::options::build_email_notification::fill (*this); + } + }; + + void build_email_notification:: + fill (::brep::cli::options& os) + { + // repository_email base + // + ::brep::options::repository_email::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // build-toolchain-email + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-toolchain-email", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_email_notification:: + description () + { + static _cli_build_email_notification_desc_type _cli_build_email_notification_desc_; + return _cli_build_email_notification_desc_; + } + + typedef + std::map<std::string, void (*) (build_email_notification&, ::brep::cli::scanner&)> + _cli_build_email_notification_map; + + static _cli_build_email_notification_map _cli_build_email_notification_map_; + + struct _cli_build_email_notification_map_init + { + _cli_build_email_notification_map_init () + { + _cli_build_email_notification_map_["build-toolchain-email"] = + &::brep::cli::thunk< build_email_notification, std::map<string, build_email>, &build_email_notification::build_toolchain_email_, + &build_email_notification::build_toolchain_email_specified_ >; + } + }; + + static _cli_build_email_notification_map_init _cli_build_email_notification_map_init_; + + bool build_email_notification:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_email_notification_map::const_iterator i (_cli_build_email_notification_map_.find (o)); + + if (i != _cli_build_email_notification_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // repository_email base + // + if (::brep::options::repository_email::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + return false; + } + + bool build_email_notification:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // handler + // + + handler:: + handler () + : tenant_name_ ("tenant"), + tenant_name_specified_ (false), + verbosity_ (0), + verbosity_specified_ (false) + { + } + + handler:: + handler (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : tenant_name_ ("tenant"), + tenant_name_specified_ (false), + verbosity_ (0), + verbosity_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + handler:: + handler (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : tenant_name_ ("tenant"), + tenant_name_specified_ (false), + verbosity_ (0), + verbosity_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + handler:: + handler (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : tenant_name_ ("tenant"), + tenant_name_specified_ (false), + verbosity_ (0), + verbosity_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + handler:: + handler (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : tenant_name_ ("tenant"), + tenant_name_specified_ (false), + verbosity_ (0), + verbosity_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + handler:: + handler (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : tenant_name_ ("tenant"), + tenant_name_specified_ (false), + verbosity_ (0), + verbosity_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para handler:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "tenant-name <name> Name to call the tenant values" << ::std::endl + << " on web pages." << ::std::endl; + + os << "verbosity <level> Trace verbosity level." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_handler_desc_type: ::brep::cli::options + { + _cli_handler_desc_type () + { + ::brep::options::handler::fill (*this); + } + }; + + void handler:: + fill (::brep::cli::options& os) + { + // tenant-name + // + { + ::brep::cli::option_names a; + std::string dv ("tenant"); + ::brep::cli::option o ("tenant-name", a, false, dv); + os.push_back (o); + } + + // verbosity + // + { + ::brep::cli::option_names a; + std::string dv ("0"); + ::brep::cli::option o ("verbosity", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& handler:: + description () + { + static _cli_handler_desc_type _cli_handler_desc_; + return _cli_handler_desc_; + } + + typedef + std::map<std::string, void (*) (handler&, ::brep::cli::scanner&)> + _cli_handler_map; + + static _cli_handler_map _cli_handler_map_; + + struct _cli_handler_map_init + { + _cli_handler_map_init () + { + _cli_handler_map_["tenant-name"] = + &::brep::cli::thunk< handler, string, &handler::tenant_name_, + &handler::tenant_name_specified_ >; + _cli_handler_map_["verbosity"] = + &::brep::cli::thunk< handler, uint16_t, &handler::verbosity_, + &handler::verbosity_specified_ >; + } + }; + + static _cli_handler_map_init _cli_handler_map_init_; + + bool handler:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_handler_map::const_iterator i (_cli_handler_map_.find (o)); + + if (i != _cli_handler_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool handler:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // openssl_options + // + + openssl_options:: + openssl_options () + : openssl_ ("openssl"), + openssl_specified_ (false), + openssl_option_ (), + openssl_option_specified_ (false), + openssl_envvar_ (), + openssl_envvar_specified_ (false) + { + } + + openssl_options:: + openssl_options (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : openssl_ ("openssl"), + openssl_specified_ (false), + openssl_option_ (), + openssl_option_specified_ (false), + openssl_envvar_ (), + openssl_envvar_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + openssl_options:: + openssl_options (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : openssl_ ("openssl"), + openssl_specified_ (false), + openssl_option_ (), + openssl_option_specified_ (false), + openssl_envvar_ (), + openssl_envvar_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + openssl_options:: + openssl_options (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : openssl_ ("openssl"), + openssl_specified_ (false), + openssl_option_ (), + openssl_option_specified_ (false), + openssl_envvar_ (), + openssl_envvar_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + openssl_options:: + openssl_options (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : openssl_ ("openssl"), + openssl_specified_ (false), + openssl_option_ (), + openssl_option_specified_ (false), + openssl_envvar_ (), + openssl_envvar_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + openssl_options:: + openssl_options (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : openssl_ ("openssl"), + openssl_specified_ (false), + openssl_option_ (), + openssl_option_specified_ (false), + openssl_envvar_ (), + openssl_envvar_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para openssl_options:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "openssl <path> The openssl program to be used" << ::std::endl + << " for crypto operations." << ::std::endl; + + os << "openssl-option <opt> Additional option to be passed" << ::std::endl + << " to the openssl program (see" << ::std::endl + << " openssl for details)." << ::std::endl; + + os << "openssl-envvar <name>[=value] Environment variable to be set" << ::std::endl + << " (<name>=<value>) or unset (just" << ::std::endl + << " <name>) for the openssl program" << ::std::endl + << " (see openssl for details)." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_openssl_options_desc_type: ::brep::cli::options + { + _cli_openssl_options_desc_type () + { + ::brep::options::openssl_options::fill (*this); + } + }; + + void openssl_options:: + fill (::brep::cli::options& os) + { + // openssl + // + { + ::brep::cli::option_names a; + std::string dv ("openssl"); + ::brep::cli::option o ("openssl", a, false, dv); + os.push_back (o); + } + + // openssl-option + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("openssl-option", a, false, dv); + os.push_back (o); + } + + // openssl-envvar + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("openssl-envvar", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& openssl_options:: + description () + { + static _cli_openssl_options_desc_type _cli_openssl_options_desc_; + return _cli_openssl_options_desc_; + } + + typedef + std::map<std::string, void (*) (openssl_options&, ::brep::cli::scanner&)> + _cli_openssl_options_map; + + static _cli_openssl_options_map _cli_openssl_options_map_; + + struct _cli_openssl_options_map_init + { + _cli_openssl_options_map_init () + { + _cli_openssl_options_map_["openssl"] = + &::brep::cli::thunk< openssl_options, path, &openssl_options::openssl_, + &openssl_options::openssl_specified_ >; + _cli_openssl_options_map_["openssl-option"] = + &::brep::cli::thunk< openssl_options, strings, &openssl_options::openssl_option_, + &openssl_options::openssl_option_specified_ >; + _cli_openssl_options_map_["openssl-envvar"] = + &::brep::cli::thunk< openssl_options, strings, &openssl_options::openssl_envvar_, + &openssl_options::openssl_envvar_specified_ >; + } + }; + + static _cli_openssl_options_map_init _cli_openssl_options_map_init_; + + bool openssl_options:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_openssl_options_map::const_iterator i (_cli_openssl_options_map_.find (o)); + + if (i != _cli_openssl_options_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool openssl_options:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // package_db + // + + package_db:: + package_db () + : package_db_user_ (), + package_db_user_specified_ (false), + package_db_role_ ("brep"), + package_db_role_specified_ (false), + package_db_password_ (), + package_db_password_specified_ (false), + package_db_name_ ("brep_package"), + package_db_name_specified_ (false), + package_db_host_ (), + package_db_host_specified_ (false), + package_db_port_ (0), + package_db_port_specified_ (false), + package_db_max_connections_ (5), + package_db_max_connections_specified_ (false), + package_db_retry_ (10), + package_db_retry_specified_ (false) + { + } + + package_db:: + package_db (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_db_user_ (), + package_db_user_specified_ (false), + package_db_role_ ("brep"), + package_db_role_specified_ (false), + package_db_password_ (), + package_db_password_specified_ (false), + package_db_name_ ("brep_package"), + package_db_name_specified_ (false), + package_db_host_ (), + package_db_host_specified_ (false), + package_db_port_ (0), + package_db_port_specified_ (false), + package_db_max_connections_ (5), + package_db_max_connections_specified_ (false), + package_db_retry_ (10), + package_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + package_db:: + package_db (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_db_user_ (), + package_db_user_specified_ (false), + package_db_role_ ("brep"), + package_db_role_specified_ (false), + package_db_password_ (), + package_db_password_specified_ (false), + package_db_name_ ("brep_package"), + package_db_name_specified_ (false), + package_db_host_ (), + package_db_host_specified_ (false), + package_db_port_ (0), + package_db_port_specified_ (false), + package_db_max_connections_ (5), + package_db_max_connections_specified_ (false), + package_db_retry_ (10), + package_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + package_db:: + package_db (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_db_user_ (), + package_db_user_specified_ (false), + package_db_role_ ("brep"), + package_db_role_specified_ (false), + package_db_password_ (), + package_db_password_specified_ (false), + package_db_name_ ("brep_package"), + package_db_name_specified_ (false), + package_db_host_ (), + package_db_host_specified_ (false), + package_db_port_ (0), + package_db_port_specified_ (false), + package_db_max_connections_ (5), + package_db_max_connections_specified_ (false), + package_db_retry_ (10), + package_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_db:: + package_db (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_db_user_ (), + package_db_user_specified_ (false), + package_db_role_ ("brep"), + package_db_role_specified_ (false), + package_db_password_ (), + package_db_password_specified_ (false), + package_db_name_ ("brep_package"), + package_db_name_specified_ (false), + package_db_host_ (), + package_db_host_specified_ (false), + package_db_port_ (0), + package_db_port_specified_ (false), + package_db_max_connections_ (5), + package_db_max_connections_specified_ (false), + package_db_retry_ (10), + package_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_db:: + package_db (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_db_user_ (), + package_db_user_specified_ (false), + package_db_role_ ("brep"), + package_db_role_specified_ (false), + package_db_password_ (), + package_db_password_specified_ (false), + package_db_name_ ("brep_package"), + package_db_name_specified_ (false), + package_db_host_ (), + package_db_host_specified_ (false), + package_db_port_ (0), + package_db_port_specified_ (false), + package_db_max_connections_ (5), + package_db_max_connections_specified_ (false), + package_db_retry_ (10), + package_db_retry_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para package_db:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "package-db-user <user> Package database login user" << ::std::endl + << " name." << ::std::endl; + + os << "package-db-role <user> Package database execution user" << ::std::endl + << " name." << ::std::endl; + + os << "package-db-password <pass> Package database password." << ::std::endl; + + os << "package-db-name <name> Package database name." << ::std::endl; + + os << "package-db-host <host> Package database host name," << ::std::endl + << " address, or socket." << ::std::endl; + + os << "package-db-port <port> Package database port number." << ::std::endl; + + os << "package-db-max-connections <num> The maximum number of concurrent" << ::std::endl + << " package database connections per" << ::std::endl + << " web server process." << ::std::endl; + + os << "package-db-retry <num> The maximum number of times to" << ::std::endl + << " retry package database" << ::std::endl + << " transactions in the face of" << ::std::endl + << " recoverable failures (deadlock," << ::std::endl + << " loss of connection, etc)." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_package_db_desc_type: ::brep::cli::options + { + _cli_package_db_desc_type () + { + ::brep::options::package_db::fill (*this); + } + }; + + void package_db:: + fill (::brep::cli::options& os) + { + // package-db-user + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("package-db-user", a, false, dv); + os.push_back (o); + } + + // package-db-role + // + { + ::brep::cli::option_names a; + std::string dv ("brep"); + ::brep::cli::option o ("package-db-role", a, false, dv); + os.push_back (o); + } + + // package-db-password + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("package-db-password", a, false, dv); + os.push_back (o); + } + + // package-db-name + // + { + ::brep::cli::option_names a; + std::string dv ("brep_package"); + ::brep::cli::option o ("package-db-name", a, false, dv); + os.push_back (o); + } + + // package-db-host + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("package-db-host", a, false, dv); + os.push_back (o); + } + + // package-db-port + // + { + ::brep::cli::option_names a; + std::string dv ("0"); + ::brep::cli::option o ("package-db-port", a, false, dv); + os.push_back (o); + } + + // package-db-max-connections + // + { + ::brep::cli::option_names a; + std::string dv ("5"); + ::brep::cli::option o ("package-db-max-connections", a, false, dv); + os.push_back (o); + } + + // package-db-retry + // + { + ::brep::cli::option_names a; + std::string dv ("10"); + ::brep::cli::option o ("package-db-retry", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& package_db:: + description () + { + static _cli_package_db_desc_type _cli_package_db_desc_; + return _cli_package_db_desc_; + } + + typedef + std::map<std::string, void (*) (package_db&, ::brep::cli::scanner&)> + _cli_package_db_map; + + static _cli_package_db_map _cli_package_db_map_; + + struct _cli_package_db_map_init + { + _cli_package_db_map_init () + { + _cli_package_db_map_["package-db-user"] = + &::brep::cli::thunk< package_db, string, &package_db::package_db_user_, + &package_db::package_db_user_specified_ >; + _cli_package_db_map_["package-db-role"] = + &::brep::cli::thunk< package_db, string, &package_db::package_db_role_, + &package_db::package_db_role_specified_ >; + _cli_package_db_map_["package-db-password"] = + &::brep::cli::thunk< package_db, string, &package_db::package_db_password_, + &package_db::package_db_password_specified_ >; + _cli_package_db_map_["package-db-name"] = + &::brep::cli::thunk< package_db, string, &package_db::package_db_name_, + &package_db::package_db_name_specified_ >; + _cli_package_db_map_["package-db-host"] = + &::brep::cli::thunk< package_db, string, &package_db::package_db_host_, + &package_db::package_db_host_specified_ >; + _cli_package_db_map_["package-db-port"] = + &::brep::cli::thunk< package_db, uint16_t, &package_db::package_db_port_, + &package_db::package_db_port_specified_ >; + _cli_package_db_map_["package-db-max-connections"] = + &::brep::cli::thunk< package_db, size_t, &package_db::package_db_max_connections_, + &package_db::package_db_max_connections_specified_ >; + _cli_package_db_map_["package-db-retry"] = + &::brep::cli::thunk< package_db, size_t, &package_db::package_db_retry_, + &package_db::package_db_retry_specified_ >; + } + }; + + static _cli_package_db_map_init _cli_package_db_map_init_; + + bool package_db:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_package_db_map::const_iterator i (_cli_package_db_map_.find (o)); + + if (i != _cli_package_db_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool package_db:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build + // + + build:: + build () + : build_config_ (), + build_config_specified_ (false), + build_bot_agent_keys_ (), + build_bot_agent_keys_specified_ (false), + build_forced_rebuild_timeout_ (600), + build_forced_rebuild_timeout_specified_ (false), + build_soft_rebuild_timeout_ (86400), + build_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_timeout_ (), + build_alt_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_start_ (), + build_alt_soft_rebuild_start_specified_ (false), + build_alt_soft_rebuild_stop_ (), + build_alt_soft_rebuild_stop_specified_ (false), + build_hard_rebuild_timeout_ (604800), + build_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_timeout_ (), + build_alt_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_start_ (), + build_alt_hard_rebuild_start_specified_ (false), + build_alt_hard_rebuild_stop_ (), + build_alt_hard_rebuild_stop_specified_ (false), + build_queued_timeout_ (30), + build_queued_timeout_specified_ (false) + { + } + + build:: + build (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_ (), + build_config_specified_ (false), + build_bot_agent_keys_ (), + build_bot_agent_keys_specified_ (false), + build_forced_rebuild_timeout_ (600), + build_forced_rebuild_timeout_specified_ (false), + build_soft_rebuild_timeout_ (86400), + build_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_timeout_ (), + build_alt_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_start_ (), + build_alt_soft_rebuild_start_specified_ (false), + build_alt_soft_rebuild_stop_ (), + build_alt_soft_rebuild_stop_specified_ (false), + build_hard_rebuild_timeout_ (604800), + build_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_timeout_ (), + build_alt_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_start_ (), + build_alt_hard_rebuild_start_specified_ (false), + build_alt_hard_rebuild_stop_ (), + build_alt_hard_rebuild_stop_specified_ (false), + build_queued_timeout_ (30), + build_queued_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build:: + build (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_ (), + build_config_specified_ (false), + build_bot_agent_keys_ (), + build_bot_agent_keys_specified_ (false), + build_forced_rebuild_timeout_ (600), + build_forced_rebuild_timeout_specified_ (false), + build_soft_rebuild_timeout_ (86400), + build_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_timeout_ (), + build_alt_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_start_ (), + build_alt_soft_rebuild_start_specified_ (false), + build_alt_soft_rebuild_stop_ (), + build_alt_soft_rebuild_stop_specified_ (false), + build_hard_rebuild_timeout_ (604800), + build_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_timeout_ (), + build_alt_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_start_ (), + build_alt_hard_rebuild_start_specified_ (false), + build_alt_hard_rebuild_stop_ (), + build_alt_hard_rebuild_stop_specified_ (false), + build_queued_timeout_ (30), + build_queued_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build:: + build (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_ (), + build_config_specified_ (false), + build_bot_agent_keys_ (), + build_bot_agent_keys_specified_ (false), + build_forced_rebuild_timeout_ (600), + build_forced_rebuild_timeout_specified_ (false), + build_soft_rebuild_timeout_ (86400), + build_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_timeout_ (), + build_alt_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_start_ (), + build_alt_soft_rebuild_start_specified_ (false), + build_alt_soft_rebuild_stop_ (), + build_alt_soft_rebuild_stop_specified_ (false), + build_hard_rebuild_timeout_ (604800), + build_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_timeout_ (), + build_alt_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_start_ (), + build_alt_hard_rebuild_start_specified_ (false), + build_alt_hard_rebuild_stop_ (), + build_alt_hard_rebuild_stop_specified_ (false), + build_queued_timeout_ (30), + build_queued_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build:: + build (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_ (), + build_config_specified_ (false), + build_bot_agent_keys_ (), + build_bot_agent_keys_specified_ (false), + build_forced_rebuild_timeout_ (600), + build_forced_rebuild_timeout_specified_ (false), + build_soft_rebuild_timeout_ (86400), + build_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_timeout_ (), + build_alt_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_start_ (), + build_alt_soft_rebuild_start_specified_ (false), + build_alt_soft_rebuild_stop_ (), + build_alt_soft_rebuild_stop_specified_ (false), + build_hard_rebuild_timeout_ (604800), + build_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_timeout_ (), + build_alt_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_start_ (), + build_alt_hard_rebuild_start_specified_ (false), + build_alt_hard_rebuild_stop_ (), + build_alt_hard_rebuild_stop_specified_ (false), + build_queued_timeout_ (30), + build_queued_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build:: + build (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_ (), + build_config_specified_ (false), + build_bot_agent_keys_ (), + build_bot_agent_keys_specified_ (false), + build_forced_rebuild_timeout_ (600), + build_forced_rebuild_timeout_specified_ (false), + build_soft_rebuild_timeout_ (86400), + build_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_timeout_ (), + build_alt_soft_rebuild_timeout_specified_ (false), + build_alt_soft_rebuild_start_ (), + build_alt_soft_rebuild_start_specified_ (false), + build_alt_soft_rebuild_stop_ (), + build_alt_soft_rebuild_stop_specified_ (false), + build_hard_rebuild_timeout_ (604800), + build_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_timeout_ (), + build_alt_hard_rebuild_timeout_specified_ (false), + build_alt_hard_rebuild_start_ (), + build_alt_hard_rebuild_start_specified_ (false), + build_alt_hard_rebuild_stop_ (), + build_alt_hard_rebuild_stop_specified_ (false), + build_queued_timeout_ (30), + build_queued_timeout_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // openssl_options base + // + p = ::brep::options::openssl_options::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "build-config <buildtab> Build configuration file." << ::std::endl; + + os << "build-bot-agent-keys <dir> Directory containing build bot" << ::std::endl + << " agent public keys." << ::std::endl; + + os << "build-forced-rebuild-timeout <seconds> Time to wait before considering" << ::std::endl + << " a package for a forced rebuild." << ::std::endl; + + os << "build-soft-rebuild-timeout <seconds> Time to wait before considering" << ::std::endl + << " a package for a soft rebuild" << ::std::endl + << " (only to be performed if the" << ::std::endl + << " build environment or any of the" << ::std::endl + << " package dependencies have" << ::std::endl + << " changed)." << ::std::endl; + + os << "build-alt-soft-rebuild-timeout <seconds> Alternative package soft rebuild" << ::std::endl + << " timeout to use instead of the" << ::std::endl + << " soft rebuild timeout (see" << ::std::endl + << " build-soft-rebuild-timeout for" << ::std::endl + << " details) during the time" << ::std::endl + << " interval specified with the" << ::std::endl + << " build-alt-soft-rebuild-start and" << ::std::endl + << " build-alt-soft-rebuild-stop" << ::std::endl + << " options." << ::std::endl; + + os << "build-alt-soft-rebuild-start <hours>:<minutes> The start time of the" << ::std::endl + << " alternative package soft rebuild" << ::std::endl + << " timeout (see" << ::std::endl + << " build-alt-soft-rebuild-timeout" << ::std::endl + << " for details)." << ::std::endl; + + os << "build-alt-soft-rebuild-stop <hours>:<minutes> The end time of the alternative" << ::std::endl + << " package soft rebuild timeout" << ::std::endl + << " (see" << ::std::endl + << " build-alt-soft-rebuild-timeout" << ::std::endl + << " for details)." << ::std::endl; + + os << "build-hard-rebuild-timeout <seconds> Time to wait before considering" << ::std::endl + << " a package for a hard rebuild (to" << ::std::endl + << " be performed unconditionally)." << ::std::endl; + + os << "build-alt-hard-rebuild-timeout <seconds> Alternative package hard rebuild" << ::std::endl + << " timeout." << ::std::endl; + + os << "build-alt-hard-rebuild-start <hours>:<minutes> The start time of the" << ::std::endl + << " alternative package hard rebuild" << ::std::endl + << " timeout (see" << ::std::endl + << " build-alt-hard-rebuild-timeout" << ::std::endl + << " for details)." << ::std::endl; + + os << "build-alt-hard-rebuild-stop <hours>:<minutes> The end time of the alternative" << ::std::endl + << " package hard rebuild timeout" << ::std::endl + << " (see" << ::std::endl + << " build-alt-hard-rebuild-timeout" << ::std::endl + << " for details)." << ::std::endl; + + os << "build-queued-timeout <seconds> Time to wait before assuming the" << ::std::endl + << " queued notifications are" << ::std::endl + << " delivered for package CI" << ::std::endl + << " requests submitted via" << ::std::endl + << " third-party services (GitHub," << ::std::endl + << " etc)." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_desc_type: ::brep::cli::options + { + _cli_build_desc_type () + { + ::brep::options::build::fill (*this); + } + }; + + void build:: + fill (::brep::cli::options& os) + { + // openssl_options base + // + ::brep::options::openssl_options::fill (os); + + // build-config + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-config", a, false, dv); + os.push_back (o); + } + + // build-bot-agent-keys + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-bot-agent-keys", a, false, dv); + os.push_back (o); + } + + // build-forced-rebuild-timeout + // + { + ::brep::cli::option_names a; + std::string dv ("600"); + ::brep::cli::option o ("build-forced-rebuild-timeout", a, false, dv); + os.push_back (o); + } + + // build-soft-rebuild-timeout + // + { + ::brep::cli::option_names a; + std::string dv ("86400"); + ::brep::cli::option o ("build-soft-rebuild-timeout", a, false, dv); + os.push_back (o); + } + + // build-alt-soft-rebuild-timeout + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-alt-soft-rebuild-timeout", a, false, dv); + os.push_back (o); + } + + // build-alt-soft-rebuild-start + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-alt-soft-rebuild-start", a, false, dv); + os.push_back (o); + } + + // build-alt-soft-rebuild-stop + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-alt-soft-rebuild-stop", a, false, dv); + os.push_back (o); + } + + // build-hard-rebuild-timeout + // + { + ::brep::cli::option_names a; + std::string dv ("604800"); + ::brep::cli::option o ("build-hard-rebuild-timeout", a, false, dv); + os.push_back (o); + } + + // build-alt-hard-rebuild-timeout + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-alt-hard-rebuild-timeout", a, false, dv); + os.push_back (o); + } + + // build-alt-hard-rebuild-start + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-alt-hard-rebuild-start", a, false, dv); + os.push_back (o); + } + + // build-alt-hard-rebuild-stop + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-alt-hard-rebuild-stop", a, false, dv); + os.push_back (o); + } + + // build-queued-timeout + // + { + ::brep::cli::option_names a; + std::string dv ("30"); + ::brep::cli::option o ("build-queued-timeout", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build:: + description () + { + static _cli_build_desc_type _cli_build_desc_; + return _cli_build_desc_; + } + + typedef + std::map<std::string, void (*) (build&, ::brep::cli::scanner&)> + _cli_build_map; + + static _cli_build_map _cli_build_map_; + + struct _cli_build_map_init + { + _cli_build_map_init () + { + _cli_build_map_["build-config"] = + &::brep::cli::thunk< build, path, &build::build_config_, + &build::build_config_specified_ >; + _cli_build_map_["build-bot-agent-keys"] = + &::brep::cli::thunk< build, dir_path, &build::build_bot_agent_keys_, + &build::build_bot_agent_keys_specified_ >; + _cli_build_map_["build-forced-rebuild-timeout"] = + &::brep::cli::thunk< build, size_t, &build::build_forced_rebuild_timeout_, + &build::build_forced_rebuild_timeout_specified_ >; + _cli_build_map_["build-soft-rebuild-timeout"] = + &::brep::cli::thunk< build, size_t, &build::build_soft_rebuild_timeout_, + &build::build_soft_rebuild_timeout_specified_ >; + _cli_build_map_["build-alt-soft-rebuild-timeout"] = + &::brep::cli::thunk< build, size_t, &build::build_alt_soft_rebuild_timeout_, + &build::build_alt_soft_rebuild_timeout_specified_ >; + _cli_build_map_["build-alt-soft-rebuild-start"] = + &::brep::cli::thunk< build, duration, &build::build_alt_soft_rebuild_start_, + &build::build_alt_soft_rebuild_start_specified_ >; + _cli_build_map_["build-alt-soft-rebuild-stop"] = + &::brep::cli::thunk< build, duration, &build::build_alt_soft_rebuild_stop_, + &build::build_alt_soft_rebuild_stop_specified_ >; + _cli_build_map_["build-hard-rebuild-timeout"] = + &::brep::cli::thunk< build, size_t, &build::build_hard_rebuild_timeout_, + &build::build_hard_rebuild_timeout_specified_ >; + _cli_build_map_["build-alt-hard-rebuild-timeout"] = + &::brep::cli::thunk< build, size_t, &build::build_alt_hard_rebuild_timeout_, + &build::build_alt_hard_rebuild_timeout_specified_ >; + _cli_build_map_["build-alt-hard-rebuild-start"] = + &::brep::cli::thunk< build, duration, &build::build_alt_hard_rebuild_start_, + &build::build_alt_hard_rebuild_start_specified_ >; + _cli_build_map_["build-alt-hard-rebuild-stop"] = + &::brep::cli::thunk< build, duration, &build::build_alt_hard_rebuild_stop_, + &build::build_alt_hard_rebuild_stop_specified_ >; + _cli_build_map_["build-queued-timeout"] = + &::brep::cli::thunk< build, size_t, &build::build_queued_timeout_, + &build::build_queued_timeout_specified_ >; + } + }; + + static _cli_build_map_init _cli_build_map_init_; + + bool build:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_map::const_iterator i (_cli_build_map_.find (o)); + + if (i != _cli_build_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // openssl_options base + // + if (::brep::options::openssl_options::_parse (o, s)) + return true; + + return false; + } + + bool build:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_db + // + + build_db:: + build_db () + : build_db_user_ (), + build_db_user_specified_ (false), + build_db_role_ ("brep"), + build_db_role_specified_ (false), + build_db_password_ (), + build_db_password_specified_ (false), + build_db_name_ ("brep_build"), + build_db_name_specified_ (false), + build_db_host_ (), + build_db_host_specified_ (false), + build_db_port_ (0), + build_db_port_specified_ (false), + build_db_max_connections_ (5), + build_db_max_connections_specified_ (false), + build_db_retry_ (10), + build_db_retry_specified_ (false) + { + } + + build_db:: + build_db (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_db_user_ (), + build_db_user_specified_ (false), + build_db_role_ ("brep"), + build_db_role_specified_ (false), + build_db_password_ (), + build_db_password_specified_ (false), + build_db_name_ ("brep_build"), + build_db_name_specified_ (false), + build_db_host_ (), + build_db_host_specified_ (false), + build_db_port_ (0), + build_db_port_specified_ (false), + build_db_max_connections_ (5), + build_db_max_connections_specified_ (false), + build_db_retry_ (10), + build_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_db:: + build_db (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_db_user_ (), + build_db_user_specified_ (false), + build_db_role_ ("brep"), + build_db_role_specified_ (false), + build_db_password_ (), + build_db_password_specified_ (false), + build_db_name_ ("brep_build"), + build_db_name_specified_ (false), + build_db_host_ (), + build_db_host_specified_ (false), + build_db_port_ (0), + build_db_port_specified_ (false), + build_db_max_connections_ (5), + build_db_max_connections_specified_ (false), + build_db_retry_ (10), + build_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_db:: + build_db (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_db_user_ (), + build_db_user_specified_ (false), + build_db_role_ ("brep"), + build_db_role_specified_ (false), + build_db_password_ (), + build_db_password_specified_ (false), + build_db_name_ ("brep_build"), + build_db_name_specified_ (false), + build_db_host_ (), + build_db_host_specified_ (false), + build_db_port_ (0), + build_db_port_specified_ (false), + build_db_max_connections_ (5), + build_db_max_connections_specified_ (false), + build_db_retry_ (10), + build_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_db:: + build_db (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_db_user_ (), + build_db_user_specified_ (false), + build_db_role_ ("brep"), + build_db_role_specified_ (false), + build_db_password_ (), + build_db_password_specified_ (false), + build_db_name_ ("brep_build"), + build_db_name_specified_ (false), + build_db_host_ (), + build_db_host_specified_ (false), + build_db_port_ (0), + build_db_port_specified_ (false), + build_db_max_connections_ (5), + build_db_max_connections_specified_ (false), + build_db_retry_ (10), + build_db_retry_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_db:: + build_db (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_db_user_ (), + build_db_user_specified_ (false), + build_db_role_ ("brep"), + build_db_role_specified_ (false), + build_db_password_ (), + build_db_password_specified_ (false), + build_db_name_ ("brep_build"), + build_db_name_specified_ (false), + build_db_host_ (), + build_db_host_specified_ (false), + build_db_port_ (0), + build_db_port_specified_ (false), + build_db_max_connections_ (5), + build_db_max_connections_specified_ (false), + build_db_retry_ (10), + build_db_retry_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_db:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "build-db-user <user> Build database login user name." << ::std::endl; + + os << "build-db-role <user> Build database execution user" << ::std::endl + << " name." << ::std::endl; + + os << "build-db-password <pass> Build database password." << ::std::endl; + + os << "build-db-name <name> Build database name." << ::std::endl; + + os << "build-db-host <host> Build database host name," << ::std::endl + << " address, or socket." << ::std::endl; + + os << "build-db-port <port> Build database port number." << ::std::endl; + + os << "build-db-max-connections <num> The maximum number of concurrent" << ::std::endl + << " build database connections per" << ::std::endl + << " web server process." << ::std::endl; + + os << "build-db-retry <num> The maximum number of times to" << ::std::endl + << " retry build database" << ::std::endl + << " transactions in the face of" << ::std::endl + << " recoverable failures (deadlock," << ::std::endl + << " loss of connection, etc)." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_db_desc_type: ::brep::cli::options + { + _cli_build_db_desc_type () + { + ::brep::options::build_db::fill (*this); + } + }; + + void build_db:: + fill (::brep::cli::options& os) + { + // build-db-user + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-db-user", a, false, dv); + os.push_back (o); + } + + // build-db-role + // + { + ::brep::cli::option_names a; + std::string dv ("brep"); + ::brep::cli::option o ("build-db-role", a, false, dv); + os.push_back (o); + } + + // build-db-password + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-db-password", a, false, dv); + os.push_back (o); + } + + // build-db-name + // + { + ::brep::cli::option_names a; + std::string dv ("brep_build"); + ::brep::cli::option o ("build-db-name", a, false, dv); + os.push_back (o); + } + + // build-db-host + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-db-host", a, false, dv); + os.push_back (o); + } + + // build-db-port + // + { + ::brep::cli::option_names a; + std::string dv ("0"); + ::brep::cli::option o ("build-db-port", a, false, dv); + os.push_back (o); + } + + // build-db-max-connections + // + { + ::brep::cli::option_names a; + std::string dv ("5"); + ::brep::cli::option o ("build-db-max-connections", a, false, dv); + os.push_back (o); + } + + // build-db-retry + // + { + ::brep::cli::option_names a; + std::string dv ("10"); + ::brep::cli::option o ("build-db-retry", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_db:: + description () + { + static _cli_build_db_desc_type _cli_build_db_desc_; + return _cli_build_db_desc_; + } + + typedef + std::map<std::string, void (*) (build_db&, ::brep::cli::scanner&)> + _cli_build_db_map; + + static _cli_build_db_map _cli_build_db_map_; + + struct _cli_build_db_map_init + { + _cli_build_db_map_init () + { + _cli_build_db_map_["build-db-user"] = + &::brep::cli::thunk< build_db, string, &build_db::build_db_user_, + &build_db::build_db_user_specified_ >; + _cli_build_db_map_["build-db-role"] = + &::brep::cli::thunk< build_db, string, &build_db::build_db_role_, + &build_db::build_db_role_specified_ >; + _cli_build_db_map_["build-db-password"] = + &::brep::cli::thunk< build_db, string, &build_db::build_db_password_, + &build_db::build_db_password_specified_ >; + _cli_build_db_map_["build-db-name"] = + &::brep::cli::thunk< build_db, string, &build_db::build_db_name_, + &build_db::build_db_name_specified_ >; + _cli_build_db_map_["build-db-host"] = + &::brep::cli::thunk< build_db, string, &build_db::build_db_host_, + &build_db::build_db_host_specified_ >; + _cli_build_db_map_["build-db-port"] = + &::brep::cli::thunk< build_db, uint16_t, &build_db::build_db_port_, + &build_db::build_db_port_specified_ >; + _cli_build_db_map_["build-db-max-connections"] = + &::brep::cli::thunk< build_db, size_t, &build_db::build_db_max_connections_, + &build_db::build_db_max_connections_specified_ >; + _cli_build_db_map_["build-db-retry"] = + &::brep::cli::thunk< build_db, size_t, &build_db::build_db_retry_, + &build_db::build_db_retry_specified_ >; + } + }; + + static _cli_build_db_map_init _cli_build_db_map_init_; + + bool build_db:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_db_map::const_iterator i (_cli_build_db_map_.find (o)); + + if (i != _cli_build_db_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool build_db:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_upload + // + + build_upload:: + build_upload () + : upload_data_ (), + upload_data_specified_ (false), + upload_max_size_ (), + upload_max_size_specified_ (false), + upload_email_ (), + upload_email_specified_ (false), + upload_handler_ (), + upload_handler_specified_ (false), + upload_handler_argument_ (), + upload_handler_argument_specified_ (false), + upload_handler_timeout_ (), + upload_handler_timeout_specified_ (false), + upload_toolchain_exclude_ (), + upload_toolchain_exclude_specified_ (false), + upload_repository_exclude_ (), + upload_repository_exclude_specified_ (false) + { + } + + build_upload:: + build_upload (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : upload_data_ (), + upload_data_specified_ (false), + upload_max_size_ (), + upload_max_size_specified_ (false), + upload_email_ (), + upload_email_specified_ (false), + upload_handler_ (), + upload_handler_specified_ (false), + upload_handler_argument_ (), + upload_handler_argument_specified_ (false), + upload_handler_timeout_ (), + upload_handler_timeout_specified_ (false), + upload_toolchain_exclude_ (), + upload_toolchain_exclude_specified_ (false), + upload_repository_exclude_ (), + upload_repository_exclude_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_upload:: + build_upload (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : upload_data_ (), + upload_data_specified_ (false), + upload_max_size_ (), + upload_max_size_specified_ (false), + upload_email_ (), + upload_email_specified_ (false), + upload_handler_ (), + upload_handler_specified_ (false), + upload_handler_argument_ (), + upload_handler_argument_specified_ (false), + upload_handler_timeout_ (), + upload_handler_timeout_specified_ (false), + upload_toolchain_exclude_ (), + upload_toolchain_exclude_specified_ (false), + upload_repository_exclude_ (), + upload_repository_exclude_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_upload:: + build_upload (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : upload_data_ (), + upload_data_specified_ (false), + upload_max_size_ (), + upload_max_size_specified_ (false), + upload_email_ (), + upload_email_specified_ (false), + upload_handler_ (), + upload_handler_specified_ (false), + upload_handler_argument_ (), + upload_handler_argument_specified_ (false), + upload_handler_timeout_ (), + upload_handler_timeout_specified_ (false), + upload_toolchain_exclude_ (), + upload_toolchain_exclude_specified_ (false), + upload_repository_exclude_ (), + upload_repository_exclude_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_upload:: + build_upload (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : upload_data_ (), + upload_data_specified_ (false), + upload_max_size_ (), + upload_max_size_specified_ (false), + upload_email_ (), + upload_email_specified_ (false), + upload_handler_ (), + upload_handler_specified_ (false), + upload_handler_argument_ (), + upload_handler_argument_specified_ (false), + upload_handler_timeout_ (), + upload_handler_timeout_specified_ (false), + upload_toolchain_exclude_ (), + upload_toolchain_exclude_specified_ (false), + upload_repository_exclude_ (), + upload_repository_exclude_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_upload:: + build_upload (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : upload_data_ (), + upload_data_specified_ (false), + upload_max_size_ (), + upload_max_size_specified_ (false), + upload_email_ (), + upload_email_specified_ (false), + upload_handler_ (), + upload_handler_specified_ (false), + upload_handler_argument_ (), + upload_handler_argument_specified_ (false), + upload_handler_timeout_ (), + upload_handler_timeout_specified_ (false), + upload_toolchain_exclude_ (), + upload_toolchain_exclude_specified_ (false), + upload_repository_exclude_ (), + upload_repository_exclude_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_upload:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "upload-data <type>=<dir> The directory to save upload" << ::std::endl + << " data to for the specified upload" << ::std::endl + << " type." << ::std::endl; + + os << "upload-max-size <type>=<bytes> The maximum size of the upload" << ::std::endl + << " data accepted for the specified" << ::std::endl + << " upload type." << ::std::endl; + + os << "upload-email <type>=<email> The build artifacts upload" << ::std::endl + << " email." << ::std::endl; + + os << "upload-handler <type>=<path> The handler program to be" << ::std::endl + << " executed on build artifacts" << ::std::endl + << " upload of the specified type." << ::std::endl; + + os << "upload-handler-argument <type>=<arg> Additional arguments to be" << ::std::endl + << " passed to the upload handler" << ::std::endl + << " program for the specified upload" << ::std::endl + << " type (see upload-handler for" << ::std::endl + << " details)." << ::std::endl; + + os << "upload-handler-timeout <type>=<seconds> The upload handler program" << ::std::endl + << " timeout in seconds for the" << ::std::endl + << " specified upload type." << ::std::endl; + + os << "upload-toolchain-exclude <type>=<name> Disable upload of the specified" << ::std::endl + << " type for the specified toolchain" << ::std::endl + << " name." << ::std::endl; + + os << "upload-repository-exclude <type>=<name> Disable upload of the specified" << ::std::endl + << " type for packages from the" << ::std::endl + << " repository with the specified" << ::std::endl + << " canonical name." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_upload_desc_type: ::brep::cli::options + { + _cli_build_upload_desc_type () + { + ::brep::options::build_upload::fill (*this); + } + }; + + void build_upload:: + fill (::brep::cli::options& os) + { + // upload-data + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-data", a, false, dv); + os.push_back (o); + } + + // upload-max-size + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-max-size", a, false, dv); + os.push_back (o); + } + + // upload-email + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-email", a, false, dv); + os.push_back (o); + } + + // upload-handler + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-handler", a, false, dv); + os.push_back (o); + } + + // upload-handler-argument + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-handler-argument", a, false, dv); + os.push_back (o); + } + + // upload-handler-timeout + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-handler-timeout", a, false, dv); + os.push_back (o); + } + + // upload-toolchain-exclude + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-toolchain-exclude", a, false, dv); + os.push_back (o); + } + + // upload-repository-exclude + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("upload-repository-exclude", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_upload:: + description () + { + static _cli_build_upload_desc_type _cli_build_upload_desc_; + return _cli_build_upload_desc_; + } + + typedef + std::map<std::string, void (*) (build_upload&, ::brep::cli::scanner&)> + _cli_build_upload_map; + + static _cli_build_upload_map _cli_build_upload_map_; + + struct _cli_build_upload_map_init + { + _cli_build_upload_map_init () + { + _cli_build_upload_map_["upload-data"] = + &::brep::cli::thunk< build_upload, std::map<string, dir_path>, &build_upload::upload_data_, + &build_upload::upload_data_specified_ >; + _cli_build_upload_map_["upload-max-size"] = + &::brep::cli::thunk< build_upload, std::map<string, size_t>, &build_upload::upload_max_size_, + &build_upload::upload_max_size_specified_ >; + _cli_build_upload_map_["upload-email"] = + &::brep::cli::thunk< build_upload, std::map<string, string>, &build_upload::upload_email_, + &build_upload::upload_email_specified_ >; + _cli_build_upload_map_["upload-handler"] = + &::brep::cli::thunk< build_upload, std::map<string, path>, &build_upload::upload_handler_, + &build_upload::upload_handler_specified_ >; + _cli_build_upload_map_["upload-handler-argument"] = + &::brep::cli::thunk< build_upload, std::multimap<string, string>, &build_upload::upload_handler_argument_, + &build_upload::upload_handler_argument_specified_ >; + _cli_build_upload_map_["upload-handler-timeout"] = + &::brep::cli::thunk< build_upload, std::map<string, size_t>, &build_upload::upload_handler_timeout_, + &build_upload::upload_handler_timeout_specified_ >; + _cli_build_upload_map_["upload-toolchain-exclude"] = + &::brep::cli::thunk< build_upload, std::multimap<string, string>, &build_upload::upload_toolchain_exclude_, + &build_upload::upload_toolchain_exclude_specified_ >; + _cli_build_upload_map_["upload-repository-exclude"] = + &::brep::cli::thunk< build_upload, std::multimap<string, string>, &build_upload::upload_repository_exclude_, + &build_upload::upload_repository_exclude_specified_ >; + } + }; + + static _cli_build_upload_map_init _cli_build_upload_map_init_; + + bool build_upload:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_upload_map::const_iterator i (_cli_build_upload_map_.find (o)); + + if (i != _cli_build_upload_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool build_upload:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // page + // + + page:: + page () + : logo_ (), + logo_specified_ (false), + menu_ (), + menu_specified_ (false) + { + } + + page:: + page (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : logo_ (), + logo_specified_ (false), + menu_ (), + menu_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + page:: + page (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : logo_ (), + logo_specified_ (false), + menu_ (), + menu_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + page:: + page (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : logo_ (), + logo_specified_ (false), + menu_ (), + menu_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + page:: + page (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : logo_ (), + logo_specified_ (false), + menu_ (), + menu_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + page:: + page (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : logo_ (), + logo_specified_ (false), + menu_ (), + menu_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para page:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "logo <xhtml> Web page logo." << ::std::endl; + + os << "menu <label=link> Web page menu." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_page_desc_type: ::brep::cli::options + { + _cli_page_desc_type () + { + ::brep::options::page::fill (*this); + } + }; + + void page:: + fill (::brep::cli::options& os) + { + // logo + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("logo", a, false, dv); + os.push_back (o); + } + + // menu + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("menu", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& page:: + description () + { + static _cli_page_desc_type _cli_page_desc_; + return _cli_page_desc_; + } + + typedef + std::map<std::string, void (*) (page&, ::brep::cli::scanner&)> + _cli_page_map; + + static _cli_page_map _cli_page_map_; + + struct _cli_page_map_init + { + _cli_page_map_init () + { + _cli_page_map_["logo"] = + &::brep::cli::thunk< page, web::xhtml::fragment, &page::logo_, + &page::logo_specified_ >; + _cli_page_map_["menu"] = + &::brep::cli::thunk< page, vector<page_menu>, &page::menu_, + &page::menu_specified_ >; + } + }; + + static _cli_page_map_init _cli_page_map_init_; + + bool page:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_page_map::const_iterator i (_cli_page_map_.find (o)); + + if (i != _cli_page_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool page:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // search + // + + search:: + search () + : search_page_entries_ (20), + search_page_entries_specified_ (false), + search_pages_ (5), + search_pages_specified_ (false) + { + } + + search:: + search (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_page_entries_ (20), + search_page_entries_specified_ (false), + search_pages_ (5), + search_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + search:: + search (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_page_entries_ (20), + search_page_entries_specified_ (false), + search_pages_ (5), + search_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + search:: + search (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_page_entries_ (20), + search_page_entries_specified_ (false), + search_pages_ (5), + search_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + search:: + search (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_page_entries_ (20), + search_page_entries_specified_ (false), + search_pages_ (5), + search_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + search:: + search (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_page_entries_ (20), + search_page_entries_specified_ (false), + search_pages_ (5), + search_pages_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para search:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "search-page-entries <num> Number of packages per page." << ::std::endl; + + os << "search-pages <num> Number of pages in navigation" << ::std::endl + << " (pager)." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_search_desc_type: ::brep::cli::options + { + _cli_search_desc_type () + { + ::brep::options::search::fill (*this); + } + }; + + void search:: + fill (::brep::cli::options& os) + { + // search-page-entries + // + { + ::brep::cli::option_names a; + std::string dv ("20"); + ::brep::cli::option o ("search-page-entries", a, false, dv); + os.push_back (o); + } + + // search-pages + // + { + ::brep::cli::option_names a; + std::string dv ("5"); + ::brep::cli::option o ("search-pages", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& search:: + description () + { + static _cli_search_desc_type _cli_search_desc_; + return _cli_search_desc_; + } + + typedef + std::map<std::string, void (*) (search&, ::brep::cli::scanner&)> + _cli_search_map; + + static _cli_search_map _cli_search_map_; + + struct _cli_search_map_init + { + _cli_search_map_init () + { + _cli_search_map_["search-page-entries"] = + &::brep::cli::thunk< search, uint16_t, &search::search_page_entries_, + &search::search_page_entries_specified_ >; + _cli_search_map_["search-pages"] = + &::brep::cli::thunk< search, uint16_t, &search::search_pages_, + &search::search_pages_specified_ >; + } + }; + + static _cli_search_map_init _cli_search_map_init_; + + bool search:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_search_map::const_iterator i (_cli_search_map_.find (o)); + + if (i != _cli_search_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool search:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // package + // + + package:: + package () + : package_description_ (500), + package_description_specified_ (false), + package_changes_ (5000), + package_changes_specified_ (false) + { + } + + package:: + package (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_description_ (500), + package_description_specified_ (false), + package_changes_ (5000), + package_changes_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + package:: + package (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_description_ (500), + package_description_specified_ (false), + package_changes_ (5000), + package_changes_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + package:: + package (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_description_ (500), + package_description_specified_ (false), + package_changes_ (5000), + package_changes_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package:: + package (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_description_ (500), + package_description_specified_ (false), + package_changes_ (5000), + package_changes_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package:: + package (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_description_ (500), + package_description_specified_ (false), + package_changes_ (5000), + package_changes_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para package:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "package-description <len> Number of package description" << ::std::endl + << " characters to display in brief" << ::std::endl + << " pages." << ::std::endl; + + os << "package-changes <len> Number of package changes" << ::std::endl + << " characters to display in brief" << ::std::endl + << " pages." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_package_desc_type: ::brep::cli::options + { + _cli_package_desc_type () + { + ::brep::options::package::fill (*this); + } + }; + + void package:: + fill (::brep::cli::options& os) + { + // package-description + // + { + ::brep::cli::option_names a; + std::string dv ("500"); + ::brep::cli::option o ("package-description", a, false, dv); + os.push_back (o); + } + + // package-changes + // + { + ::brep::cli::option_names a; + std::string dv ("5000"); + ::brep::cli::option o ("package-changes", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& package:: + description () + { + static _cli_package_desc_type _cli_package_desc_; + return _cli_package_desc_; + } + + typedef + std::map<std::string, void (*) (package&, ::brep::cli::scanner&)> + _cli_package_map; + + static _cli_package_map _cli_package_map_; + + struct _cli_package_map_init + { + _cli_package_map_init () + { + _cli_package_map_["package-description"] = + &::brep::cli::thunk< package, uint16_t, &package::package_description_, + &package::package_description_specified_ >; + _cli_package_map_["package-changes"] = + &::brep::cli::thunk< package, uint16_t, &package::package_changes_, + &package::package_changes_specified_ >; + } + }; + + static _cli_package_map_init _cli_package_map_init_; + + bool package:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_package_map::const_iterator i (_cli_package_map_.find (o)); + + if (i != _cli_package_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool package:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // packages + // + + packages:: + packages () + : search_title_ ("Packages"), + search_title_specified_ (false), + search_description_ (), + search_description_specified_ (false) + { + } + + packages:: + packages (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_title_ ("Packages"), + search_title_specified_ (false), + search_description_ (), + search_description_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + packages:: + packages (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_title_ ("Packages"), + search_title_specified_ (false), + search_description_ (), + search_description_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + packages:: + packages (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_title_ ("Packages"), + search_title_specified_ (false), + search_description_ (), + search_description_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + packages:: + packages (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_title_ ("Packages"), + search_title_specified_ (false), + search_description_ (), + search_description_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + packages:: + packages (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : search_title_ ("Packages"), + search_title_specified_ (false), + search_description_ (), + search_description_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para packages:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // search base + // + p = ::brep::options::search::print_usage (os, p); + + // package_db base + // + p = ::brep::options::package_db::print_usage (os, p); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "search-title <text> Package search page title." << ::std::endl; + + os << "search-description <xhtml> Package search page description." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_packages_desc_type: ::brep::cli::options + { + _cli_packages_desc_type () + { + ::brep::options::packages::fill (*this); + } + }; + + void packages:: + fill (::brep::cli::options& os) + { + // search base + // + ::brep::options::search::fill (os); + + // package_db base + // + ::brep::options::package_db::fill (os); + + // page base + // + ::brep::options::page::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // search-title + // + { + ::brep::cli::option_names a; + std::string dv ("Packages"); + ::brep::cli::option o ("search-title", a, false, dv); + os.push_back (o); + } + + // search-description + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("search-description", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& packages:: + description () + { + static _cli_packages_desc_type _cli_packages_desc_; + return _cli_packages_desc_; + } + + typedef + std::map<std::string, void (*) (packages&, ::brep::cli::scanner&)> + _cli_packages_map; + + static _cli_packages_map _cli_packages_map_; + + struct _cli_packages_map_init + { + _cli_packages_map_init () + { + _cli_packages_map_["search-title"] = + &::brep::cli::thunk< packages, string, &packages::search_title_, + &packages::search_title_specified_ >; + _cli_packages_map_["search-description"] = + &::brep::cli::thunk< packages, web::xhtml::fragment, &packages::search_description_, + &packages::search_description_specified_ >; + } + }; + + static _cli_packages_map_init _cli_packages_map_init_; + + bool packages:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_packages_map::const_iterator i (_cli_packages_map_.find (o)); + + if (i != _cli_packages_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // search base + // + if (::brep::options::search::_parse (o, s)) + return true; + + // package_db base + // + if (::brep::options::package_db::_parse (o, s)) + return true; + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool packages:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // package_details + // + + package_details:: + package_details () + { + } + + package_details:: + package_details (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + package_details:: + package_details (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + package_details:: + package_details (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_details:: + package_details (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_details:: + package_details (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para package_details:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // package base + // + p = ::brep::options::package::print_usage (os, p); + + // package_db base + // + p = ::brep::options::package_db::print_usage (os, p); + + // search base + // + p = ::brep::options::search::print_usage (os, p); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + return p; + } + + struct _cli_package_details_desc_type: ::brep::cli::options + { + _cli_package_details_desc_type () + { + ::brep::options::package_details::fill (*this); + } + }; + + void package_details:: + fill (::brep::cli::options& os) + { + // package base + // + ::brep::options::package::fill (os); + + // package_db base + // + ::brep::options::package_db::fill (os); + + // search base + // + ::brep::options::search::fill (os); + + // page base + // + ::brep::options::page::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + } + + const ::brep::cli::options& package_details:: + description () + { + static _cli_package_details_desc_type _cli_package_details_desc_; + return _cli_package_details_desc_; + } + + typedef + std::map<std::string, void (*) (package_details&, ::brep::cli::scanner&)> + _cli_package_details_map; + + static _cli_package_details_map _cli_package_details_map_; + + struct _cli_package_details_map_init + { + _cli_package_details_map_init () + { + } + }; + + static _cli_package_details_map_init _cli_package_details_map_init_; + + bool package_details:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_package_details_map::const_iterator i (_cli_package_details_map_.find (o)); + + if (i != _cli_package_details_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // package base + // + if (::brep::options::package::_parse (o, s)) + return true; + + // package_db base + // + if (::brep::options::package_db::_parse (o, s)) + return true; + + // search base + // + if (::brep::options::search::_parse (o, s)) + return true; + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool package_details:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // package_version_details + // + + package_version_details:: + package_version_details () + : bindist_root_ (), + bindist_root_specified_ (false), + bindist_url_ (), + bindist_url_specified_ (false) + { + } + + package_version_details:: + package_version_details (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : bindist_root_ (), + bindist_root_specified_ (false), + bindist_url_ (), + bindist_url_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + package_version_details:: + package_version_details (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : bindist_root_ (), + bindist_root_specified_ (false), + bindist_url_ (), + bindist_url_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + package_version_details:: + package_version_details (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : bindist_root_ (), + bindist_root_specified_ (false), + bindist_url_ (), + bindist_url_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_version_details:: + package_version_details (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : bindist_root_ (), + bindist_root_specified_ (false), + bindist_url_ (), + bindist_url_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_version_details:: + package_version_details (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : bindist_root_ (), + bindist_root_specified_ (false), + bindist_url_ (), + bindist_url_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para package_version_details:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // package base + // + p = ::brep::options::package::print_usage (os, p); + + // package_db base + // + p = ::brep::options::package_db::print_usage (os, p); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "bindist-root <dir> The root directory where the" << ::std::endl + << " uploaded binary distribution" << ::std::endl + << " packages are saved to under the" << ::std::endl + << " following directory hierarchy:" << ::std::endl + << ::std::endl + << " [<tenant>/]<distribution>/<os-re" << ::std::endl + << " ease>/<project>/<package>/<versi" << ::std::endl + << " n>/<package-config>" << ::std::endl + << ::std::endl + << " The package configuration" << ::std::endl + << " directory symlinks that match" << ::std::endl + << " these paths are mapped to web" << ::std::endl + << " URLs based on the bindist-url" << ::std::endl + << " value and displayed on the" << ::std::endl + << " package version details page." << ::std::endl; + + os << "bindist-url <url> The root URL of the directory" << ::std::endl + << " specified with the bindist-root" << ::std::endl + << " option." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_package_version_details_desc_type: ::brep::cli::options + { + _cli_package_version_details_desc_type () + { + ::brep::options::package_version_details::fill (*this); + } + }; + + void package_version_details:: + fill (::brep::cli::options& os) + { + // package base + // + ::brep::options::package::fill (os); + + // package_db base + // + ::brep::options::package_db::fill (os); + + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // page base + // + ::brep::options::page::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // bindist-root + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("bindist-root", a, false, dv); + os.push_back (o); + } + + // bindist-url + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("bindist-url", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& package_version_details:: + description () + { + static _cli_package_version_details_desc_type _cli_package_version_details_desc_; + return _cli_package_version_details_desc_; + } + + typedef + std::map<std::string, void (*) (package_version_details&, ::brep::cli::scanner&)> + _cli_package_version_details_map; + + static _cli_package_version_details_map _cli_package_version_details_map_; + + struct _cli_package_version_details_map_init + { + _cli_package_version_details_map_init () + { + _cli_package_version_details_map_["bindist-root"] = + &::brep::cli::thunk< package_version_details, dir_path, &package_version_details::bindist_root_, + &package_version_details::bindist_root_specified_ >; + _cli_package_version_details_map_["bindist-url"] = + &::brep::cli::thunk< package_version_details, string, &package_version_details::bindist_url_, + &package_version_details::bindist_url_specified_ >; + } + }; + + static _cli_package_version_details_map_init _cli_package_version_details_map_init_; + + bool package_version_details:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_package_version_details_map::const_iterator i (_cli_package_version_details_map_.find (o)); + + if (i != _cli_package_version_details_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // package base + // + if (::brep::options::package::_parse (o, s)) + return true; + + // package_db base + // + if (::brep::options::package_db::_parse (o, s)) + return true; + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool package_version_details:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // repository_details + // + + repository_details:: + repository_details () + { + } + + repository_details:: + repository_details (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + repository_details:: + repository_details (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + repository_details:: + repository_details (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_details:: + repository_details (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_details:: + repository_details (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para repository_details:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // package_db base + // + p = ::brep::options::package_db::print_usage (os, p); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + return p; + } + + struct _cli_repository_details_desc_type: ::brep::cli::options + { + _cli_repository_details_desc_type () + { + ::brep::options::repository_details::fill (*this); + } + }; + + void repository_details:: + fill (::brep::cli::options& os) + { + // package_db base + // + ::brep::options::package_db::fill (os); + + // page base + // + ::brep::options::page::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + } + + const ::brep::cli::options& repository_details:: + description () + { + static _cli_repository_details_desc_type _cli_repository_details_desc_; + return _cli_repository_details_desc_; + } + + typedef + std::map<std::string, void (*) (repository_details&, ::brep::cli::scanner&)> + _cli_repository_details_map; + + static _cli_repository_details_map _cli_repository_details_map_; + + struct _cli_repository_details_map_init + { + _cli_repository_details_map_init () + { + } + }; + + static _cli_repository_details_map_init _cli_repository_details_map_init_; + + bool repository_details:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_repository_details_map::const_iterator i (_cli_repository_details_map_.find (o)); + + if (i != _cli_repository_details_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // package_db base + // + if (::brep::options::package_db::_parse (o, s)) + return true; + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool repository_details:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_task + // + + build_task:: + build_task () + : build_task_request_max_size_ (102400), + build_task_request_max_size_specified_ (false), + build_result_timeout_ (10800), + build_result_timeout_specified_ (false), + build_interactive_login_ (), + build_interactive_login_specified_ (false), + build_package_order_ (build_order::stable), + build_package_order_specified_ (false) + { + } + + build_task:: + build_task (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_task_request_max_size_ (102400), + build_task_request_max_size_specified_ (false), + build_result_timeout_ (10800), + build_result_timeout_specified_ (false), + build_interactive_login_ (), + build_interactive_login_specified_ (false), + build_package_order_ (build_order::stable), + build_package_order_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_task:: + build_task (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_task_request_max_size_ (102400), + build_task_request_max_size_specified_ (false), + build_result_timeout_ (10800), + build_result_timeout_specified_ (false), + build_interactive_login_ (), + build_interactive_login_specified_ (false), + build_package_order_ (build_order::stable), + build_package_order_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_task:: + build_task (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_task_request_max_size_ (102400), + build_task_request_max_size_specified_ (false), + build_result_timeout_ (10800), + build_result_timeout_specified_ (false), + build_interactive_login_ (), + build_interactive_login_specified_ (false), + build_package_order_ (build_order::stable), + build_package_order_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_task:: + build_task (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_task_request_max_size_ (102400), + build_task_request_max_size_specified_ (false), + build_result_timeout_ (10800), + build_result_timeout_specified_ (false), + build_interactive_login_ (), + build_interactive_login_specified_ (false), + build_package_order_ (build_order::stable), + build_package_order_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_task:: + build_task (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_task_request_max_size_ (102400), + build_task_request_max_size_specified_ (false), + build_result_timeout_ (10800), + build_result_timeout_specified_ (false), + build_interactive_login_ (), + build_interactive_login_specified_ (false), + build_package_order_ (build_order::stable), + build_package_order_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_task:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // build_upload base + // + p = ::brep::options::build_upload::print_usage (os, p); + + // build_email_notification base + // + p = ::brep::options::build_email_notification::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "build-task-request-max-size <bytes> The maximum size of the build" << ::std::endl + << " task request manifest accepted." << ::std::endl; + + os << "build-result-timeout <seconds> Time to wait before considering" << ::std::endl + << " the expected task result lost." << ::std::endl; + + os << "build-interactive-login </regex/replacement/> Regular expressions for" << ::std::endl + << " transforming the interactive" << ::std::endl + << " build login information, for" << ::std::endl + << " example, into the actual command" << ::std::endl + << " that can be used by the user." << ::std::endl; + + os << "build-package-order <order> Order in which packages are" << ::std::endl + << " considered for build." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_task_desc_type: ::brep::cli::options + { + _cli_build_task_desc_type () + { + ::brep::options::build_task::fill (*this); + } + }; + + void build_task:: + fill (::brep::cli::options& os) + { + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // build_upload base + // + ::brep::options::build_upload::fill (os); + + // build_email_notification base + // + ::brep::options::build_email_notification::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // build-task-request-max-size + // + { + ::brep::cli::option_names a; + std::string dv ("102400"); + ::brep::cli::option o ("build-task-request-max-size", a, false, dv); + os.push_back (o); + } + + // build-result-timeout + // + { + ::brep::cli::option_names a; + std::string dv ("10800"); + ::brep::cli::option o ("build-result-timeout", a, false, dv); + os.push_back (o); + } + + // build-interactive-login + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-interactive-login", a, false, dv); + os.push_back (o); + } + + // build-package-order + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("build-package-order", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_task:: + description () + { + static _cli_build_task_desc_type _cli_build_task_desc_; + return _cli_build_task_desc_; + } + + typedef + std::map<std::string, void (*) (build_task&, ::brep::cli::scanner&)> + _cli_build_task_map; + + static _cli_build_task_map _cli_build_task_map_; + + struct _cli_build_task_map_init + { + _cli_build_task_map_init () + { + _cli_build_task_map_["build-task-request-max-size"] = + &::brep::cli::thunk< build_task, size_t, &build_task::build_task_request_max_size_, + &build_task::build_task_request_max_size_specified_ >; + _cli_build_task_map_["build-result-timeout"] = + &::brep::cli::thunk< build_task, size_t, &build_task::build_result_timeout_, + &build_task::build_result_timeout_specified_ >; + _cli_build_task_map_["build-interactive-login"] = + &::brep::cli::thunk< build_task, vector<pair<std::regex, string>>, &build_task::build_interactive_login_, + &build_task::build_interactive_login_specified_ >; + _cli_build_task_map_["build-package-order"] = + &::brep::cli::thunk< build_task, build_order, &build_task::build_package_order_, + &build_task::build_package_order_specified_ >; + } + }; + + static _cli_build_task_map_init _cli_build_task_map_init_; + + bool build_task:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_task_map::const_iterator i (_cli_build_task_map_.find (o)); + + if (i != _cli_build_task_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // build_upload base + // + if (::brep::options::build_upload::_parse (o, s)) + return true; + + // build_email_notification base + // + if (::brep::options::build_email_notification::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool build_task:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_result + // + + build_result:: + build_result () + : build_result_request_max_size_ (10485760), + build_result_request_max_size_specified_ (false) + { + } + + build_result:: + build_result (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_result_request_max_size_ (10485760), + build_result_request_max_size_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_result:: + build_result (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_result_request_max_size_ (10485760), + build_result_request_max_size_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_result:: + build_result (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_result_request_max_size_ (10485760), + build_result_request_max_size_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_result:: + build_result (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_result_request_max_size_ (10485760), + build_result_request_max_size_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_result:: + build_result (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_result_request_max_size_ (10485760), + build_result_request_max_size_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_result:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // build_email_notification base + // + p = ::brep::options::build_email_notification::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "build-result-request-max-size <bytes> The maximum size of the build" << ::std::endl + << " result manifest accepted." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_result_desc_type: ::brep::cli::options + { + _cli_build_result_desc_type () + { + ::brep::options::build_result::fill (*this); + } + }; + + void build_result:: + fill (::brep::cli::options& os) + { + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // build_email_notification base + // + ::brep::options::build_email_notification::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // build-result-request-max-size + // + { + ::brep::cli::option_names a; + std::string dv ("10485760"); + ::brep::cli::option o ("build-result-request-max-size", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_result:: + description () + { + static _cli_build_result_desc_type _cli_build_result_desc_; + return _cli_build_result_desc_; + } + + typedef + std::map<std::string, void (*) (build_result&, ::brep::cli::scanner&)> + _cli_build_result_map; + + static _cli_build_result_map _cli_build_result_map_; + + struct _cli_build_result_map_init + { + _cli_build_result_map_init () + { + _cli_build_result_map_["build-result-request-max-size"] = + &::brep::cli::thunk< build_result, size_t, &build_result::build_result_request_max_size_, + &build_result::build_result_request_max_size_specified_ >; + } + }; + + static _cli_build_result_map_init _cli_build_result_map_init_; + + bool build_result:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_result_map::const_iterator i (_cli_build_result_map_.find (o)); + + if (i != _cli_build_result_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // build_email_notification base + // + if (::brep::options::build_email_notification::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool build_result:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_log + // + + build_log:: + build_log () + { + } + + build_log:: + build_log (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_log:: + build_log (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_log:: + build_log (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_log:: + build_log (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_log:: + build_log (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_log:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + return p; + } + + struct _cli_build_log_desc_type: ::brep::cli::options + { + _cli_build_log_desc_type () + { + ::brep::options::build_log::fill (*this); + } + }; + + void build_log:: + fill (::brep::cli::options& os) + { + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + } + + const ::brep::cli::options& build_log:: + description () + { + static _cli_build_log_desc_type _cli_build_log_desc_; + return _cli_build_log_desc_; + } + + typedef + std::map<std::string, void (*) (build_log&, ::brep::cli::scanner&)> + _cli_build_log_map; + + static _cli_build_log_map _cli_build_log_map_; + + struct _cli_build_log_map_init + { + _cli_build_log_map_init () + { + } + }; + + static _cli_build_log_map_init _cli_build_log_map_init_; + + bool build_log:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_log_map::const_iterator i (_cli_build_log_map_.find (o)); + + if (i != _cli_build_log_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool build_log:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_force + // + + build_force:: + build_force () + { + } + + build_force:: + build_force (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_force:: + build_force (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_force:: + build_force (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_force:: + build_force (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_force:: + build_force (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_force:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + return p; + } + + struct _cli_build_force_desc_type: ::brep::cli::options + { + _cli_build_force_desc_type () + { + ::brep::options::build_force::fill (*this); + } + }; + + void build_force:: + fill (::brep::cli::options& os) + { + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + } + + const ::brep::cli::options& build_force:: + description () + { + static _cli_build_force_desc_type _cli_build_force_desc_; + return _cli_build_force_desc_; + } + + typedef + std::map<std::string, void (*) (build_force&, ::brep::cli::scanner&)> + _cli_build_force_map; + + static _cli_build_force_map _cli_build_force_map_; + + struct _cli_build_force_map_init + { + _cli_build_force_map_init () + { + } + }; + + static _cli_build_force_map_init _cli_build_force_map_init_; + + bool build_force:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_force_map::const_iterator i (_cli_build_force_map_.find (o)); + + if (i != _cli_build_force_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool build_force:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // builds + // + + builds:: + builds () + : build_page_entries_ (20), + build_page_entries_specified_ (false), + build_pages_ (5), + build_pages_specified_ (false) + { + } + + builds:: + builds (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_page_entries_ (20), + build_page_entries_specified_ (false), + build_pages_ (5), + build_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + builds:: + builds (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_page_entries_ (20), + build_page_entries_specified_ (false), + build_pages_ (5), + build_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + builds:: + builds (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_page_entries_ (20), + build_page_entries_specified_ (false), + build_pages_ (5), + build_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + builds:: + builds (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_page_entries_ (20), + build_page_entries_specified_ (false), + build_pages_ (5), + build_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + builds:: + builds (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_page_entries_ (20), + build_page_entries_specified_ (false), + build_pages_ (5), + build_pages_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para builds:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "build-page-entries <num> Number of builds per page." << ::std::endl; + + os << "build-pages <num> Number of pages in navigation" << ::std::endl + << " (pager)." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_builds_desc_type: ::brep::cli::options + { + _cli_builds_desc_type () + { + ::brep::options::builds::fill (*this); + } + }; + + void builds:: + fill (::brep::cli::options& os) + { + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // page base + // + ::brep::options::page::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // build-page-entries + // + { + ::brep::cli::option_names a; + std::string dv ("20"); + ::brep::cli::option o ("build-page-entries", a, false, dv); + os.push_back (o); + } + + // build-pages + // + { + ::brep::cli::option_names a; + std::string dv ("5"); + ::brep::cli::option o ("build-pages", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& builds:: + description () + { + static _cli_builds_desc_type _cli_builds_desc_; + return _cli_builds_desc_; + } + + typedef + std::map<std::string, void (*) (builds&, ::brep::cli::scanner&)> + _cli_builds_map; + + static _cli_builds_map _cli_builds_map_; + + struct _cli_builds_map_init + { + _cli_builds_map_init () + { + _cli_builds_map_["build-page-entries"] = + &::brep::cli::thunk< builds, uint16_t, &builds::build_page_entries_, + &builds::build_page_entries_specified_ >; + _cli_builds_map_["build-pages"] = + &::brep::cli::thunk< builds, uint16_t, &builds::build_pages_, + &builds::build_pages_specified_ >; + } + }; + + static _cli_builds_map_init _cli_builds_map_init_; + + bool builds:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_builds_map::const_iterator i (_cli_builds_map_.find (o)); + + if (i != _cli_builds_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool builds:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_configs + // + + build_configs:: + build_configs () + : build_config_page_entries_ (20), + build_config_page_entries_specified_ (false), + build_config_pages_ (5), + build_config_pages_specified_ (false) + { + } + + build_configs:: + build_configs (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_page_entries_ (20), + build_config_page_entries_specified_ (false), + build_config_pages_ (5), + build_config_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_configs:: + build_configs (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_page_entries_ (20), + build_config_page_entries_specified_ (false), + build_config_pages_ (5), + build_config_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_configs:: + build_configs (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_page_entries_ (20), + build_config_page_entries_specified_ (false), + build_config_pages_ (5), + build_config_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_configs:: + build_configs (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_page_entries_ (20), + build_config_page_entries_specified_ (false), + build_config_pages_ (5), + build_config_pages_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_configs:: + build_configs (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : build_config_page_entries_ (20), + build_config_page_entries_specified_ (false), + build_config_pages_ (5), + build_config_pages_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_configs:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "build-config-page-entries <num> Number of build configurations" << ::std::endl + << " per page." << ::std::endl; + + os << "build-config-pages <num> Number of pages in navigation" << ::std::endl + << " (pager)." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_configs_desc_type: ::brep::cli::options + { + _cli_build_configs_desc_type () + { + ::brep::options::build_configs::fill (*this); + } + }; + + void build_configs:: + fill (::brep::cli::options& os) + { + // build base + // + ::brep::options::build::fill (os); + + // page base + // + ::brep::options::page::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // build-config-page-entries + // + { + ::brep::cli::option_names a; + std::string dv ("20"); + ::brep::cli::option o ("build-config-page-entries", a, false, dv); + os.push_back (o); + } + + // build-config-pages + // + { + ::brep::cli::option_names a; + std::string dv ("5"); + ::brep::cli::option o ("build-config-pages", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_configs:: + description () + { + static _cli_build_configs_desc_type _cli_build_configs_desc_; + return _cli_build_configs_desc_; + } + + typedef + std::map<std::string, void (*) (build_configs&, ::brep::cli::scanner&)> + _cli_build_configs_map; + + static _cli_build_configs_map _cli_build_configs_map_; + + struct _cli_build_configs_map_init + { + _cli_build_configs_map_init () + { + _cli_build_configs_map_["build-config-page-entries"] = + &::brep::cli::thunk< build_configs, uint16_t, &build_configs::build_config_page_entries_, + &build_configs::build_config_page_entries_specified_ >; + _cli_build_configs_map_["build-config-pages"] = + &::brep::cli::thunk< build_configs, uint16_t, &build_configs::build_config_pages_, + &build_configs::build_config_pages_specified_ >; + } + }; + + static _cli_build_configs_map_init _cli_build_configs_map_init_; + + bool build_configs:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_configs_map::const_iterator i (_cli_build_configs_map_.find (o)); + + if (i != _cli_build_configs_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool build_configs:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // submit + // + + submit:: + submit () + : submit_data_ (), + submit_data_specified_ (false), + submit_temp_ (), + submit_temp_specified_ (false), + submit_max_size_ (10485760), + submit_max_size_specified_ (false), + submit_form_ (), + submit_form_specified_ (false), + submit_email_ (), + submit_email_specified_ (false), + submit_handler_ (), + submit_handler_specified_ (false), + submit_handler_argument_ (), + submit_handler_argument_specified_ (false), + submit_handler_timeout_ (), + submit_handler_timeout_specified_ (false) + { + } + + submit:: + submit (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : submit_data_ (), + submit_data_specified_ (false), + submit_temp_ (), + submit_temp_specified_ (false), + submit_max_size_ (10485760), + submit_max_size_specified_ (false), + submit_form_ (), + submit_form_specified_ (false), + submit_email_ (), + submit_email_specified_ (false), + submit_handler_ (), + submit_handler_specified_ (false), + submit_handler_argument_ (), + submit_handler_argument_specified_ (false), + submit_handler_timeout_ (), + submit_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + submit:: + submit (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : submit_data_ (), + submit_data_specified_ (false), + submit_temp_ (), + submit_temp_specified_ (false), + submit_max_size_ (10485760), + submit_max_size_specified_ (false), + submit_form_ (), + submit_form_specified_ (false), + submit_email_ (), + submit_email_specified_ (false), + submit_handler_ (), + submit_handler_specified_ (false), + submit_handler_argument_ (), + submit_handler_argument_specified_ (false), + submit_handler_timeout_ (), + submit_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + submit:: + submit (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : submit_data_ (), + submit_data_specified_ (false), + submit_temp_ (), + submit_temp_specified_ (false), + submit_max_size_ (10485760), + submit_max_size_specified_ (false), + submit_form_ (), + submit_form_specified_ (false), + submit_email_ (), + submit_email_specified_ (false), + submit_handler_ (), + submit_handler_specified_ (false), + submit_handler_argument_ (), + submit_handler_argument_specified_ (false), + submit_handler_timeout_ (), + submit_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + submit:: + submit (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : submit_data_ (), + submit_data_specified_ (false), + submit_temp_ (), + submit_temp_specified_ (false), + submit_max_size_ (10485760), + submit_max_size_specified_ (false), + submit_form_ (), + submit_form_specified_ (false), + submit_email_ (), + submit_email_specified_ (false), + submit_handler_ (), + submit_handler_specified_ (false), + submit_handler_argument_ (), + submit_handler_argument_specified_ (false), + submit_handler_timeout_ (), + submit_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + submit:: + submit (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : submit_data_ (), + submit_data_specified_ (false), + submit_temp_ (), + submit_temp_specified_ (false), + submit_max_size_ (10485760), + submit_max_size_specified_ (false), + submit_form_ (), + submit_form_specified_ (false), + submit_email_ (), + submit_email_specified_ (false), + submit_handler_ (), + submit_handler_specified_ (false), + submit_handler_argument_ (), + submit_handler_argument_specified_ (false), + submit_handler_timeout_ (), + submit_handler_timeout_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para submit:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_email base + // + p = ::brep::options::repository_email::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "submit-data <dir> The directory to save final" << ::std::endl + << " submission data to." << ::std::endl; + + os << "submit-temp <dir> The directory to save temporary" << ::std::endl + << " submission data to." << ::std::endl; + + os << "submit-max-size <bytes> The maximum size of the" << ::std::endl + << " submission data accepted." << ::std::endl; + + os << "submit-form <file> The package submission form" << ::std::endl + << " fragment." << ::std::endl; + + os << "submit-email <email> The package submission email." << ::std::endl; + + os << "submit-handler <path> The handler program to be" << ::std::endl + << " executed on package submission." << ::std::endl; + + os << "submit-handler-argument <arg> Additional arguments to be" << ::std::endl + << " passed to the submission handler" << ::std::endl + << " program (see submit-handler for" << ::std::endl + << " details)." << ::std::endl; + + os << "submit-handler-timeout <seconds> The submission handler program" << ::std::endl + << " timeout in seconds." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_submit_desc_type: ::brep::cli::options + { + _cli_submit_desc_type () + { + ::brep::options::submit::fill (*this); + } + }; + + void submit:: + fill (::brep::cli::options& os) + { + // page base + // + ::brep::options::page::fill (os); + + // repository_email base + // + ::brep::options::repository_email::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // submit-data + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("submit-data", a, false, dv); + os.push_back (o); + } + + // submit-temp + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("submit-temp", a, false, dv); + os.push_back (o); + } + + // submit-max-size + // + { + ::brep::cli::option_names a; + std::string dv ("10485760"); + ::brep::cli::option o ("submit-max-size", a, false, dv); + os.push_back (o); + } + + // submit-form + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("submit-form", a, false, dv); + os.push_back (o); + } + + // submit-email + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("submit-email", a, false, dv); + os.push_back (o); + } + + // submit-handler + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("submit-handler", a, false, dv); + os.push_back (o); + } + + // submit-handler-argument + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("submit-handler-argument", a, false, dv); + os.push_back (o); + } + + // submit-handler-timeout + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("submit-handler-timeout", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& submit:: + description () + { + static _cli_submit_desc_type _cli_submit_desc_; + return _cli_submit_desc_; + } + + typedef + std::map<std::string, void (*) (submit&, ::brep::cli::scanner&)> + _cli_submit_map; + + static _cli_submit_map _cli_submit_map_; + + struct _cli_submit_map_init + { + _cli_submit_map_init () + { + _cli_submit_map_["submit-data"] = + &::brep::cli::thunk< submit, dir_path, &submit::submit_data_, + &submit::submit_data_specified_ >; + _cli_submit_map_["submit-temp"] = + &::brep::cli::thunk< submit, dir_path, &submit::submit_temp_, + &submit::submit_temp_specified_ >; + _cli_submit_map_["submit-max-size"] = + &::brep::cli::thunk< submit, size_t, &submit::submit_max_size_, + &submit::submit_max_size_specified_ >; + _cli_submit_map_["submit-form"] = + &::brep::cli::thunk< submit, path, &submit::submit_form_, + &submit::submit_form_specified_ >; + _cli_submit_map_["submit-email"] = + &::brep::cli::thunk< submit, string, &submit::submit_email_, + &submit::submit_email_specified_ >; + _cli_submit_map_["submit-handler"] = + &::brep::cli::thunk< submit, path, &submit::submit_handler_, + &submit::submit_handler_specified_ >; + _cli_submit_map_["submit-handler-argument"] = + &::brep::cli::thunk< submit, strings, &submit::submit_handler_argument_, + &submit::submit_handler_argument_specified_ >; + _cli_submit_map_["submit-handler-timeout"] = + &::brep::cli::thunk< submit, size_t, &submit::submit_handler_timeout_, + &submit::submit_handler_timeout_specified_ >; + } + }; + + static _cli_submit_map_init _cli_submit_map_init_; + + bool submit:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_submit_map::const_iterator i (_cli_submit_map_.find (o)); + + if (i != _cli_submit_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_email base + // + if (::brep::options::repository_email::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool submit:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // ci_start + // + + ci_start:: + ci_start () + : ci_data_ (), + ci_data_specified_ (false), + ci_email_ (), + ci_email_specified_ (false), + ci_handler_ (), + ci_handler_specified_ (false), + ci_handler_argument_ (), + ci_handler_argument_specified_ (false), + ci_handler_timeout_ (), + ci_handler_timeout_specified_ (false) + { + } + + ci_start:: + ci_start (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_data_ (), + ci_data_specified_ (false), + ci_email_ (), + ci_email_specified_ (false), + ci_handler_ (), + ci_handler_specified_ (false), + ci_handler_argument_ (), + ci_handler_argument_specified_ (false), + ci_handler_timeout_ (), + ci_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + ci_start:: + ci_start (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_data_ (), + ci_data_specified_ (false), + ci_email_ (), + ci_email_specified_ (false), + ci_handler_ (), + ci_handler_specified_ (false), + ci_handler_argument_ (), + ci_handler_argument_specified_ (false), + ci_handler_timeout_ (), + ci_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + ci_start:: + ci_start (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_data_ (), + ci_data_specified_ (false), + ci_email_ (), + ci_email_specified_ (false), + ci_handler_ (), + ci_handler_specified_ (false), + ci_handler_argument_ (), + ci_handler_argument_specified_ (false), + ci_handler_timeout_ (), + ci_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci_start:: + ci_start (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_data_ (), + ci_data_specified_ (false), + ci_email_ (), + ci_email_specified_ (false), + ci_handler_ (), + ci_handler_specified_ (false), + ci_handler_argument_ (), + ci_handler_argument_specified_ (false), + ci_handler_timeout_ (), + ci_handler_timeout_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci_start:: + ci_start (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_data_ (), + ci_data_specified_ (false), + ci_email_ (), + ci_email_specified_ (false), + ci_handler_ (), + ci_handler_specified_ (false), + ci_handler_argument_ (), + ci_handler_argument_specified_ (false), + ci_handler_timeout_ (), + ci_handler_timeout_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para ci_start:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // repository_email base + // + p = ::brep::options::repository_email::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "ci-data <dir> The directory to save CI request" << ::std::endl + << " data to." << ::std::endl; + + os << "ci-email <email> The package CI email." << ::std::endl; + + os << "ci-handler <path> The handler program to be" << ::std::endl + << " executed on CI request." << ::std::endl; + + os << "ci-handler-argument <arg> Additional arguments to be" << ::std::endl + << " passed to the CI handler program" << ::std::endl + << " (see ci-handler for details)." << ::std::endl; + + os << "ci-handler-timeout <seconds> The CI handler program timeout" << ::std::endl + << " in seconds." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_ci_start_desc_type: ::brep::cli::options + { + _cli_ci_start_desc_type () + { + ::brep::options::ci_start::fill (*this); + } + }; + + void ci_start:: + fill (::brep::cli::options& os) + { + // repository_email base + // + ::brep::options::repository_email::fill (os); + + // ci-data + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("ci-data", a, false, dv); + os.push_back (o); + } + + // ci-email + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("ci-email", a, false, dv); + os.push_back (o); + } + + // ci-handler + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("ci-handler", a, false, dv); + os.push_back (o); + } + + // ci-handler-argument + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("ci-handler-argument", a, false, dv); + os.push_back (o); + } + + // ci-handler-timeout + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("ci-handler-timeout", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& ci_start:: + description () + { + static _cli_ci_start_desc_type _cli_ci_start_desc_; + return _cli_ci_start_desc_; + } + + typedef + std::map<std::string, void (*) (ci_start&, ::brep::cli::scanner&)> + _cli_ci_start_map; + + static _cli_ci_start_map _cli_ci_start_map_; + + struct _cli_ci_start_map_init + { + _cli_ci_start_map_init () + { + _cli_ci_start_map_["ci-data"] = + &::brep::cli::thunk< ci_start, dir_path, &ci_start::ci_data_, + &ci_start::ci_data_specified_ >; + _cli_ci_start_map_["ci-email"] = + &::brep::cli::thunk< ci_start, string, &ci_start::ci_email_, + &ci_start::ci_email_specified_ >; + _cli_ci_start_map_["ci-handler"] = + &::brep::cli::thunk< ci_start, path, &ci_start::ci_handler_, + &ci_start::ci_handler_specified_ >; + _cli_ci_start_map_["ci-handler-argument"] = + &::brep::cli::thunk< ci_start, strings, &ci_start::ci_handler_argument_, + &ci_start::ci_handler_argument_specified_ >; + _cli_ci_start_map_["ci-handler-timeout"] = + &::brep::cli::thunk< ci_start, size_t, &ci_start::ci_handler_timeout_, + &ci_start::ci_handler_timeout_specified_ >; + } + }; + + static _cli_ci_start_map_init _cli_ci_start_map_init_; + + bool ci_start:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_ci_start_map::const_iterator i (_cli_ci_start_map_.find (o)); + + if (i != _cli_ci_start_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // repository_email base + // + if (::brep::options::repository_email::_parse (o, s)) + return true; + + return false; + } + + bool ci_start:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // ci_cancel + // + + ci_cancel:: + ci_cancel () + { + } + + ci_cancel:: + ci_cancel (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + ci_cancel:: + ci_cancel (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + ci_cancel:: + ci_cancel (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci_cancel:: + ci_cancel (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci_cancel:: + ci_cancel (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para ci_cancel:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + return p; + } + + struct _cli_ci_cancel_desc_type: ::brep::cli::options + { + _cli_ci_cancel_desc_type () + { + ::brep::options::ci_cancel::fill (*this); + } + }; + + void ci_cancel:: + fill (::brep::cli::options&) + { + } + + const ::brep::cli::options& ci_cancel:: + description () + { + static _cli_ci_cancel_desc_type _cli_ci_cancel_desc_; + return _cli_ci_cancel_desc_; + } + + typedef + std::map<std::string, void (*) (ci_cancel&, ::brep::cli::scanner&)> + _cli_ci_cancel_map; + + static _cli_ci_cancel_map _cli_ci_cancel_map_; + + struct _cli_ci_cancel_map_init + { + _cli_ci_cancel_map_init () + { + } + }; + + static _cli_ci_cancel_map_init _cli_ci_cancel_map_init_; + + bool ci_cancel:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_ci_cancel_map::const_iterator i (_cli_ci_cancel_map_.find (o)); + + if (i != _cli_ci_cancel_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool ci_cancel:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // ci + // + + ci:: + ci () + : ci_form_ (), + ci_form_specified_ (false) + { + } + + ci:: + ci (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_form_ (), + ci_form_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + ci:: + ci (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_form_ (), + ci_form_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + ci:: + ci (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_form_ (), + ci_form_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci:: + ci (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_form_ (), + ci_form_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci:: + ci (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : ci_form_ (), + ci_form_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para ci:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // ci_start base + // + p = ::brep::options::ci_start::print_usage (os, p); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // page base + // + p = ::brep::options::page::print_usage (os, p); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "ci-form <file> The package CI form fragment." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_ci_desc_type: ::brep::cli::options + { + _cli_ci_desc_type () + { + ::brep::options::ci::fill (*this); + } + }; + + void ci:: + fill (::brep::cli::options& os) + { + // ci_start base + // + ::brep::options::ci_start::fill (os); + + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // page base + // + ::brep::options::page::fill (os); + + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // ci-form + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("ci-form", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& ci:: + description () + { + static _cli_ci_desc_type _cli_ci_desc_; + return _cli_ci_desc_; + } + + typedef + std::map<std::string, void (*) (ci&, ::brep::cli::scanner&)> + _cli_ci_map; + + static _cli_ci_map _cli_ci_map_; + + struct _cli_ci_map_init + { + _cli_ci_map_init () + { + _cli_ci_map_["ci-form"] = + &::brep::cli::thunk< ci, path, &ci::ci_form_, + &ci::ci_form_specified_ >; + } + }; + + static _cli_ci_map_init _cli_ci_map_init_; + + bool ci:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_ci_map::const_iterator i (_cli_ci_map_.find (o)); + + if (i != _cli_ci_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // ci_start base + // + if (::brep::options::ci_start::_parse (o, s)) + return true; + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // page base + // + if (::brep::options::page::_parse (o, s)) + return true; + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool ci:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // ci_github + // + + ci_github:: + ci_github () + { + } + + ci_github:: + ci_github (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + ci_github:: + ci_github (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + ci_github:: + ci_github (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci_github:: + ci_github (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci_github:: + ci_github (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para ci_github:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // ci_start base + // + p = ::brep::options::ci_start::print_usage (os, p); + + // ci_cancel base + // + p = ::brep::options::ci_cancel::print_usage (os, p); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + return p; + } + + struct _cli_ci_github_desc_type: ::brep::cli::options + { + _cli_ci_github_desc_type () + { + ::brep::options::ci_github::fill (*this); + } + }; + + void ci_github:: + fill (::brep::cli::options& os) + { + // ci_start base + // + ::brep::options::ci_start::fill (os); + + // ci_cancel base + // + ::brep::options::ci_cancel::fill (os); + + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + } + + const ::brep::cli::options& ci_github:: + description () + { + static _cli_ci_github_desc_type _cli_ci_github_desc_; + return _cli_ci_github_desc_; + } + + typedef + std::map<std::string, void (*) (ci_github&, ::brep::cli::scanner&)> + _cli_ci_github_map; + + static _cli_ci_github_map _cli_ci_github_map_; + + struct _cli_ci_github_map_init + { + _cli_ci_github_map_init () + { + } + }; + + static _cli_ci_github_map_init _cli_ci_github_map_init_; + + bool ci_github:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_ci_github_map::const_iterator i (_cli_ci_github_map_.find (o)); + + if (i != _cli_ci_github_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // ci_start base + // + if (::brep::options::ci_start::_parse (o, s)) + return true; + + // ci_cancel base + // + if (::brep::options::ci_cancel::_parse (o, s)) + return true; + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool ci_github:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // upload + // + + upload:: + upload () + { + } + + upload:: + upload (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + upload:: + upload (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + upload:: + upload (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + upload:: + upload (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + upload:: + upload (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para upload:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // build base + // + p = ::brep::options::build::print_usage (os, p); + + // build_db base + // + p = ::brep::options::build_db::print_usage (os, p); + + // build_upload base + // + p = ::brep::options::build_upload::print_usage (os, p); + + // repository_email base + // + p = ::brep::options::repository_email::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + return p; + } + + struct _cli_upload_desc_type: ::brep::cli::options + { + _cli_upload_desc_type () + { + ::brep::options::upload::fill (*this); + } + }; + + void upload:: + fill (::brep::cli::options& os) + { + // build base + // + ::brep::options::build::fill (os); + + // build_db base + // + ::brep::options::build_db::fill (os); + + // build_upload base + // + ::brep::options::build_upload::fill (os); + + // repository_email base + // + ::brep::options::repository_email::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + } + + const ::brep::cli::options& upload:: + description () + { + static _cli_upload_desc_type _cli_upload_desc_; + return _cli_upload_desc_; + } + + typedef + std::map<std::string, void (*) (upload&, ::brep::cli::scanner&)> + _cli_upload_map; + + static _cli_upload_map _cli_upload_map_; + + struct _cli_upload_map_init + { + _cli_upload_map_init () + { + } + }; + + static _cli_upload_map_init _cli_upload_map_init_; + + bool upload:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_upload_map::const_iterator i (_cli_upload_map_.find (o)); + + if (i != _cli_upload_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // build base + // + if (::brep::options::build::_parse (o, s)) + return true; + + // build_db base + // + if (::brep::options::build_db::_parse (o, s)) + return true; + + // build_upload base + // + if (::brep::options::build_upload::_parse (o, s)) + return true; + + // repository_email base + // + if (::brep::options::repository_email::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool upload:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // repository_root + // + + repository_root:: + repository_root () + : root_global_view_ ("packages"), + root_global_view_specified_ (false), + root_tenant_view_ ("packages"), + root_tenant_view_specified_ (false) + { + } + + repository_root:: + repository_root (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : root_global_view_ ("packages"), + root_global_view_specified_ (false), + root_tenant_view_ ("packages"), + root_tenant_view_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + repository_root:: + repository_root (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : root_global_view_ ("packages"), + root_global_view_specified_ (false), + root_tenant_view_ ("packages"), + root_tenant_view_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + repository_root:: + repository_root (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : root_global_view_ ("packages"), + root_global_view_specified_ (false), + root_tenant_view_ ("packages"), + root_tenant_view_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_root:: + repository_root (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : root_global_view_ ("packages"), + root_global_view_specified_ (false), + root_tenant_view_ ("packages"), + root_tenant_view_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_root:: + repository_root (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : root_global_view_ ("packages"), + root_global_view_specified_ (false), + root_tenant_view_ ("packages"), + root_tenant_view_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para repository_root:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + // repository_url base + // + p = ::brep::options::repository_url::print_usage (os, p); + + // handler base + // + p = ::brep::options::handler::print_usage (os, p); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "root-global-view <service> The default view to display for" << ::std::endl + << " the global repository root." << ::std::endl; + + os << "root-tenant-view <service> The default view to display for" << ::std::endl + << " the tenant repository root." << ::std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_repository_root_desc_type: ::brep::cli::options + { + _cli_repository_root_desc_type () + { + ::brep::options::repository_root::fill (*this); + } + }; + + void repository_root:: + fill (::brep::cli::options& os) + { + // repository_url base + // + ::brep::options::repository_url::fill (os); + + // handler base + // + ::brep::options::handler::fill (os); + + // root-global-view + // + { + ::brep::cli::option_names a; + std::string dv ("packages"); + ::brep::cli::option o ("root-global-view", a, false, dv); + os.push_back (o); + } + + // root-tenant-view + // + { + ::brep::cli::option_names a; + std::string dv ("packages"); + ::brep::cli::option o ("root-tenant-view", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& repository_root:: + description () + { + static _cli_repository_root_desc_type _cli_repository_root_desc_; + return _cli_repository_root_desc_; + } + + typedef + std::map<std::string, void (*) (repository_root&, ::brep::cli::scanner&)> + _cli_repository_root_map; + + static _cli_repository_root_map _cli_repository_root_map_; + + struct _cli_repository_root_map_init + { + _cli_repository_root_map_init () + { + _cli_repository_root_map_["root-global-view"] = + &::brep::cli::thunk< repository_root, string, &repository_root::root_global_view_, + &repository_root::root_global_view_specified_ >; + _cli_repository_root_map_["root-tenant-view"] = + &::brep::cli::thunk< repository_root, string, &repository_root::root_tenant_view_, + &repository_root::root_tenant_view_specified_ >; + } + }; + + static _cli_repository_root_map_init _cli_repository_root_map_init_; + + bool repository_root:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_repository_root_map::const_iterator i (_cli_repository_root_map_.find (o)); + + if (i != _cli_repository_root_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + // repository_url base + // + if (::brep::options::repository_url::_parse (o, s)) + return true; + + // handler base + // + if (::brep::options::handler::_parse (o, s)) + return true; + + return false; + } + + bool repository_root:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + } + + namespace params + { + // packages + // + + packages:: + packages () + : page_ (), + page_specified_ (false), + q_ (), + q_specified_ (false) + { + } + + packages:: + packages (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + q_ (), + q_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + packages:: + packages (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + q_ (), + q_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + packages:: + packages (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + q_ (), + q_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + packages:: + packages (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + q_ (), + q_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + packages:: + packages (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + q_ (), + q_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para packages:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "page|p <arg>" << std::endl; + + os << "q|_ <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_packages_desc_type: ::brep::cli::options + { + _cli_packages_desc_type () + { + ::brep::params::packages::fill (*this); + } + }; + + void packages:: + fill (::brep::cli::options& os) + { + // page + // + { + ::brep::cli::option_names a; + a.push_back ("p"); + std::string dv; + ::brep::cli::option o ("page", a, false, dv); + os.push_back (o); + } + + // q + // + { + ::brep::cli::option_names a; + a.push_back ("_"); + std::string dv; + ::brep::cli::option o ("q", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& packages:: + description () + { + static _cli_packages_desc_type _cli_packages_desc_; + return _cli_packages_desc_; + } + + typedef + std::map<std::string, void (*) (packages&, ::brep::cli::scanner&)> + _cli_packages_map; + + static _cli_packages_map _cli_packages_map_; + + struct _cli_packages_map_init + { + _cli_packages_map_init () + { + _cli_packages_map_["page"] = + &::brep::cli::thunk< packages, uint16_t, &packages::page_, + &packages::page_specified_ >; + _cli_packages_map_["p"] = + &::brep::cli::thunk< packages, uint16_t, &packages::page_, + &packages::page_specified_ >; + _cli_packages_map_["q"] = + &::brep::cli::thunk< packages, string, &packages::q_, + &packages::q_specified_ >; + _cli_packages_map_["_"] = + &::brep::cli::thunk< packages, string, &packages::q_, + &packages::q_specified_ >; + } + }; + + static _cli_packages_map_init _cli_packages_map_init_; + + bool packages:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_packages_map::const_iterator i (_cli_packages_map_.find (o)); + + if (i != _cli_packages_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool packages:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // package_details + // + + package_details:: + package_details () + : page_ (), + page_specified_ (false), + query_ (), + query_specified_ (false), + form_ (page_form::brief), + form_specified_ (false) + { + } + + package_details:: + package_details (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + query_ (), + query_specified_ (false), + form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + package_details:: + package_details (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + query_ (), + query_specified_ (false), + form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + package_details:: + package_details (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + query_ (), + query_specified_ (false), + form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_details:: + package_details (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + query_ (), + query_specified_ (false), + form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_details:: + package_details (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + query_ (), + query_specified_ (false), + form_ (page_form::brief), + form_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para package_details:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "page|p <arg>" << std::endl; + + os << "query|q <arg>" << std::endl; + + os << "form|f <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_package_details_desc_type: ::brep::cli::options + { + _cli_package_details_desc_type () + { + ::brep::params::package_details::fill (*this); + } + }; + + void package_details:: + fill (::brep::cli::options& os) + { + // page + // + { + ::brep::cli::option_names a; + a.push_back ("p"); + std::string dv; + ::brep::cli::option o ("page", a, false, dv); + os.push_back (o); + } + + // query + // + { + ::brep::cli::option_names a; + a.push_back ("q"); + std::string dv; + ::brep::cli::option o ("query", a, false, dv); + os.push_back (o); + } + + // form + // + { + ::brep::cli::option_names a; + a.push_back ("f"); + std::string dv; + ::brep::cli::option o ("form", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& package_details:: + description () + { + static _cli_package_details_desc_type _cli_package_details_desc_; + return _cli_package_details_desc_; + } + + typedef + std::map<std::string, void (*) (package_details&, ::brep::cli::scanner&)> + _cli_package_details_map; + + static _cli_package_details_map _cli_package_details_map_; + + struct _cli_package_details_map_init + { + _cli_package_details_map_init () + { + _cli_package_details_map_["page"] = + &::brep::cli::thunk< package_details, uint16_t, &package_details::page_, + &package_details::page_specified_ >; + _cli_package_details_map_["p"] = + &::brep::cli::thunk< package_details, uint16_t, &package_details::page_, + &package_details::page_specified_ >; + _cli_package_details_map_["query"] = + &::brep::cli::thunk< package_details, string, &package_details::query_, + &package_details::query_specified_ >; + _cli_package_details_map_["q"] = + &::brep::cli::thunk< package_details, string, &package_details::query_, + &package_details::query_specified_ >; + _cli_package_details_map_["form"] = + &::brep::cli::thunk< package_details, page_form, &package_details::form_, + &package_details::form_specified_ >; + _cli_package_details_map_["f"] = + &::brep::cli::thunk< package_details, page_form, &package_details::form_, + &package_details::form_specified_ >; + } + }; + + static _cli_package_details_map_init _cli_package_details_map_init_; + + bool package_details:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_package_details_map::const_iterator i (_cli_package_details_map_.find (o)); + + if (i != _cli_package_details_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool package_details:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // package_version_details + // + + package_version_details:: + package_version_details () + : form_ (page_form::brief), + form_specified_ (false) + { + } + + package_version_details:: + package_version_details (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + package_version_details:: + package_version_details (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + package_version_details:: + package_version_details (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_version_details:: + package_version_details (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : form_ (page_form::brief), + form_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + package_version_details:: + package_version_details (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : form_ (page_form::brief), + form_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para package_version_details:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "form|f <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_package_version_details_desc_type: ::brep::cli::options + { + _cli_package_version_details_desc_type () + { + ::brep::params::package_version_details::fill (*this); + } + }; + + void package_version_details:: + fill (::brep::cli::options& os) + { + // form + // + { + ::brep::cli::option_names a; + a.push_back ("f"); + std::string dv; + ::brep::cli::option o ("form", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& package_version_details:: + description () + { + static _cli_package_version_details_desc_type _cli_package_version_details_desc_; + return _cli_package_version_details_desc_; + } + + typedef + std::map<std::string, void (*) (package_version_details&, ::brep::cli::scanner&)> + _cli_package_version_details_map; + + static _cli_package_version_details_map _cli_package_version_details_map_; + + struct _cli_package_version_details_map_init + { + _cli_package_version_details_map_init () + { + _cli_package_version_details_map_["form"] = + &::brep::cli::thunk< package_version_details, page_form, &package_version_details::form_, + &package_version_details::form_specified_ >; + _cli_package_version_details_map_["f"] = + &::brep::cli::thunk< package_version_details, page_form, &package_version_details::form_, + &package_version_details::form_specified_ >; + } + }; + + static _cli_package_version_details_map_init _cli_package_version_details_map_init_; + + bool package_version_details:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_package_version_details_map::const_iterator i (_cli_package_version_details_map_.find (o)); + + if (i != _cli_package_version_details_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool package_version_details:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // repository_details + // + + repository_details:: + repository_details () + { + } + + repository_details:: + repository_details (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + repository_details:: + repository_details (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + repository_details:: + repository_details (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_details:: + repository_details (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + repository_details:: + repository_details (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para repository_details:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + return p; + } + + struct _cli_repository_details_desc_type: ::brep::cli::options + { + _cli_repository_details_desc_type () + { + ::brep::params::repository_details::fill (*this); + } + }; + + void repository_details:: + fill (::brep::cli::options&) + { + } + + const ::brep::cli::options& repository_details:: + description () + { + static _cli_repository_details_desc_type _cli_repository_details_desc_; + return _cli_repository_details_desc_; + } + + typedef + std::map<std::string, void (*) (repository_details&, ::brep::cli::scanner&)> + _cli_repository_details_map; + + static _cli_repository_details_map _cli_repository_details_map_; + + struct _cli_repository_details_map_init + { + _cli_repository_details_map_init () + { + } + }; + + static _cli_repository_details_map_init _cli_repository_details_map_init_; + + bool repository_details:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_repository_details_map::const_iterator i (_cli_repository_details_map_.find (o)); + + if (i != _cli_repository_details_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool repository_details:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_task + // + + build_task:: + build_task () + : repository_ (), + repository_specified_ (false), + interactive_ (bbot::interactive_mode::both), + interactive_specified_ (false) + { + } + + build_task:: + build_task (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + interactive_ (bbot::interactive_mode::both), + interactive_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_task:: + build_task (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + interactive_ (bbot::interactive_mode::both), + interactive_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_task:: + build_task (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + interactive_ (bbot::interactive_mode::both), + interactive_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_task:: + build_task (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + interactive_ (bbot::interactive_mode::both), + interactive_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_task:: + build_task (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + interactive_ (bbot::interactive_mode::both), + interactive_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_task:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "repository|r <arg>" << std::endl; + + os << "interactive <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_task_desc_type: ::brep::cli::options + { + _cli_build_task_desc_type () + { + ::brep::params::build_task::fill (*this); + } + }; + + void build_task:: + fill (::brep::cli::options& os) + { + // repository + // + { + ::brep::cli::option_names a; + a.push_back ("r"); + std::string dv; + ::brep::cli::option o ("repository", a, false, dv); + os.push_back (o); + } + + // interactive + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("interactive", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_task:: + description () + { + static _cli_build_task_desc_type _cli_build_task_desc_; + return _cli_build_task_desc_; + } + + typedef + std::map<std::string, void (*) (build_task&, ::brep::cli::scanner&)> + _cli_build_task_map; + + static _cli_build_task_map _cli_build_task_map_; + + struct _cli_build_task_map_init + { + _cli_build_task_map_init () + { + _cli_build_task_map_["repository"] = + &::brep::cli::thunk< build_task, vector<string>, &build_task::repository_, + &build_task::repository_specified_ >; + _cli_build_task_map_["r"] = + &::brep::cli::thunk< build_task, vector<string>, &build_task::repository_, + &build_task::repository_specified_ >; + _cli_build_task_map_["interactive"] = + &::brep::cli::thunk< build_task, bbot::interactive_mode, &build_task::interactive_, + &build_task::interactive_specified_ >; + } + }; + + static _cli_build_task_map_init _cli_build_task_map_init_; + + bool build_task:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_task_map::const_iterator i (_cli_build_task_map_.find (o)); + + if (i != _cli_build_task_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool build_task:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_result + // + + build_result:: + build_result () + { + } + + build_result:: + build_result (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_result:: + build_result (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_result:: + build_result (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_result:: + build_result (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_result:: + build_result (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_result:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + return p; + } + + struct _cli_build_result_desc_type: ::brep::cli::options + { + _cli_build_result_desc_type () + { + ::brep::params::build_result::fill (*this); + } + }; + + void build_result:: + fill (::brep::cli::options&) + { + } + + const ::brep::cli::options& build_result:: + description () + { + static _cli_build_result_desc_type _cli_build_result_desc_; + return _cli_build_result_desc_; + } + + typedef + std::map<std::string, void (*) (build_result&, ::brep::cli::scanner&)> + _cli_build_result_map; + + static _cli_build_result_map _cli_build_result_map_; + + struct _cli_build_result_map_init + { + _cli_build_result_map_init () + { + } + }; + + static _cli_build_result_map_init _cli_build_result_map_init_; + + bool build_result:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_result_map::const_iterator i (_cli_build_result_map_.find (o)); + + if (i != _cli_build_result_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool build_result:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_log + // + + build_log:: + build_log () + { + } + + build_log:: + build_log (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_log:: + build_log (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_log:: + build_log (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_log:: + build_log (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_log:: + build_log (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_log:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + return p; + } + + struct _cli_build_log_desc_type: ::brep::cli::options + { + _cli_build_log_desc_type () + { + ::brep::params::build_log::fill (*this); + } + }; + + void build_log:: + fill (::brep::cli::options&) + { + } + + const ::brep::cli::options& build_log:: + description () + { + static _cli_build_log_desc_type _cli_build_log_desc_; + return _cli_build_log_desc_; + } + + typedef + std::map<std::string, void (*) (build_log&, ::brep::cli::scanner&)> + _cli_build_log_map; + + static _cli_build_log_map _cli_build_log_map_; + + struct _cli_build_log_map_init + { + _cli_build_log_map_init () + { + } + }; + + static _cli_build_log_map_init _cli_build_log_map_init_; + + bool build_log:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_log_map::const_iterator i (_cli_build_log_map_.find (o)); + + if (i != _cli_build_log_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool build_log:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_force + // + + build_force:: + build_force () + : package_ (), + package_specified_ (false), + version_ (), + version_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + toolchain_name_ (), + toolchain_name_specified_ (false), + toolchain_version_ (), + toolchain_version_specified_ (false), + reason_ (), + reason_specified_ (false) + { + } + + build_force:: + build_force (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_ (), + package_specified_ (false), + version_ (), + version_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + toolchain_name_ (), + toolchain_name_specified_ (false), + toolchain_version_ (), + toolchain_version_specified_ (false), + reason_ (), + reason_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_force:: + build_force (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_ (), + package_specified_ (false), + version_ (), + version_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + toolchain_name_ (), + toolchain_name_specified_ (false), + toolchain_version_ (), + toolchain_version_specified_ (false), + reason_ (), + reason_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_force:: + build_force (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_ (), + package_specified_ (false), + version_ (), + version_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + toolchain_name_ (), + toolchain_name_specified_ (false), + toolchain_version_ (), + toolchain_version_specified_ (false), + reason_ (), + reason_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_force:: + build_force (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_ (), + package_specified_ (false), + version_ (), + version_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + toolchain_name_ (), + toolchain_name_specified_ (false), + toolchain_version_ (), + toolchain_version_specified_ (false), + reason_ (), + reason_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_force:: + build_force (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : package_ (), + package_specified_ (false), + version_ (), + version_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + toolchain_name_ (), + toolchain_name_specified_ (false), + toolchain_version_ (), + toolchain_version_specified_ (false), + reason_ (), + reason_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_force:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "package|pn <arg>" << std::endl; + + os << "version|pv <arg>" << std::endl; + + os << "target|tg <arg>" << std::endl; + + os << "target_config|tc <arg>" << std::endl; + + os << "package_config|pc <arg>" << std::endl; + + os << "toolchain_name|tn <arg>" << std::endl; + + os << "toolchain_version|tv <arg>" << std::endl; + + os << "reason <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_force_desc_type: ::brep::cli::options + { + _cli_build_force_desc_type () + { + ::brep::params::build_force::fill (*this); + } + }; + + void build_force:: + fill (::brep::cli::options& os) + { + // package + // + { + ::brep::cli::option_names a; + a.push_back ("pn"); + std::string dv; + ::brep::cli::option o ("package", a, false, dv); + os.push_back (o); + } + + // version + // + { + ::brep::cli::option_names a; + a.push_back ("pv"); + std::string dv; + ::brep::cli::option o ("version", a, false, dv); + os.push_back (o); + } + + // target + // + { + ::brep::cli::option_names a; + a.push_back ("tg"); + std::string dv; + ::brep::cli::option o ("target", a, false, dv); + os.push_back (o); + } + + // target_config + // + { + ::brep::cli::option_names a; + a.push_back ("tc"); + std::string dv; + ::brep::cli::option o ("target_config", a, false, dv); + os.push_back (o); + } + + // package_config + // + { + ::brep::cli::option_names a; + a.push_back ("pc"); + std::string dv; + ::brep::cli::option o ("package_config", a, false, dv); + os.push_back (o); + } + + // toolchain_name + // + { + ::brep::cli::option_names a; + a.push_back ("tn"); + std::string dv; + ::brep::cli::option o ("toolchain_name", a, false, dv); + os.push_back (o); + } + + // toolchain_version + // + { + ::brep::cli::option_names a; + a.push_back ("tv"); + std::string dv; + ::brep::cli::option o ("toolchain_version", a, false, dv); + os.push_back (o); + } + + // reason + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("reason", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_force:: + description () + { + static _cli_build_force_desc_type _cli_build_force_desc_; + return _cli_build_force_desc_; + } + + typedef + std::map<std::string, void (*) (build_force&, ::brep::cli::scanner&)> + _cli_build_force_map; + + static _cli_build_force_map _cli_build_force_map_; + + struct _cli_build_force_map_init + { + _cli_build_force_map_init () + { + _cli_build_force_map_["package"] = + &::brep::cli::thunk< build_force, string, &build_force::package_, + &build_force::package_specified_ >; + _cli_build_force_map_["pn"] = + &::brep::cli::thunk< build_force, string, &build_force::package_, + &build_force::package_specified_ >; + _cli_build_force_map_["version"] = + &::brep::cli::thunk< build_force, string, &build_force::version_, + &build_force::version_specified_ >; + _cli_build_force_map_["pv"] = + &::brep::cli::thunk< build_force, string, &build_force::version_, + &build_force::version_specified_ >; + _cli_build_force_map_["target"] = + &::brep::cli::thunk< build_force, string, &build_force::target_, + &build_force::target_specified_ >; + _cli_build_force_map_["tg"] = + &::brep::cli::thunk< build_force, string, &build_force::target_, + &build_force::target_specified_ >; + _cli_build_force_map_["target_config"] = + &::brep::cli::thunk< build_force, string, &build_force::target_config_, + &build_force::target_config_specified_ >; + _cli_build_force_map_["tc"] = + &::brep::cli::thunk< build_force, string, &build_force::target_config_, + &build_force::target_config_specified_ >; + _cli_build_force_map_["package_config"] = + &::brep::cli::thunk< build_force, string, &build_force::package_config_, + &build_force::package_config_specified_ >; + _cli_build_force_map_["pc"] = + &::brep::cli::thunk< build_force, string, &build_force::package_config_, + &build_force::package_config_specified_ >; + _cli_build_force_map_["toolchain_name"] = + &::brep::cli::thunk< build_force, string, &build_force::toolchain_name_, + &build_force::toolchain_name_specified_ >; + _cli_build_force_map_["tn"] = + &::brep::cli::thunk< build_force, string, &build_force::toolchain_name_, + &build_force::toolchain_name_specified_ >; + _cli_build_force_map_["toolchain_version"] = + &::brep::cli::thunk< build_force, string, &build_force::toolchain_version_, + &build_force::toolchain_version_specified_ >; + _cli_build_force_map_["tv"] = + &::brep::cli::thunk< build_force, string, &build_force::toolchain_version_, + &build_force::toolchain_version_specified_ >; + _cli_build_force_map_["reason"] = + &::brep::cli::thunk< build_force, string, &build_force::reason_, + &build_force::reason_specified_ >; + } + }; + + static _cli_build_force_map_init _cli_build_force_map_init_; + + bool build_force:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_force_map::const_iterator i (_cli_build_force_map_.find (o)); + + if (i != _cli_build_force_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool build_force:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // builds + // + + builds:: + builds () + : page_ (), + page_specified_ (false), + name_ (), + name_specified_ (false), + version_ (), + version_specified_ (false), + toolchain_ ("*"), + toolchain_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + result_ ("*"), + result_specified_ (false) + { + } + + builds:: + builds (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + name_ (), + name_specified_ (false), + version_ (), + version_specified_ (false), + toolchain_ ("*"), + toolchain_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + result_ ("*"), + result_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + builds:: + builds (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + name_ (), + name_specified_ (false), + version_ (), + version_specified_ (false), + toolchain_ ("*"), + toolchain_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + result_ ("*"), + result_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + builds:: + builds (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + name_ (), + name_specified_ (false), + version_ (), + version_specified_ (false), + toolchain_ ("*"), + toolchain_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + result_ ("*"), + result_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + builds:: + builds (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + name_ (), + name_specified_ (false), + version_ (), + version_specified_ (false), + toolchain_ ("*"), + toolchain_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + result_ ("*"), + result_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + builds:: + builds (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : page_ (), + page_specified_ (false), + name_ (), + name_specified_ (false), + version_ (), + version_specified_ (false), + toolchain_ ("*"), + toolchain_specified_ (false), + target_ (), + target_specified_ (false), + target_config_ (), + target_config_specified_ (false), + package_config_ (), + package_config_specified_ (false), + result_ ("*"), + result_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para builds:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "page|p <arg>" << std::endl; + + os << "name|_ <arg>" << std::endl; + + os << "version|pv <arg>" << std::endl; + + os << "toolchain|th <arg>" << std::endl; + + os << "target|tg <arg>" << std::endl; + + os << "target_config|tc <arg>" << std::endl; + + os << "package_config|pc <arg>" << std::endl; + + os << "result|rs <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_builds_desc_type: ::brep::cli::options + { + _cli_builds_desc_type () + { + ::brep::params::builds::fill (*this); + } + }; + + void builds:: + fill (::brep::cli::options& os) + { + // page + // + { + ::brep::cli::option_names a; + a.push_back ("p"); + std::string dv; + ::brep::cli::option o ("page", a, false, dv); + os.push_back (o); + } + + // name + // + { + ::brep::cli::option_names a; + a.push_back ("_"); + std::string dv; + ::brep::cli::option o ("name", a, false, dv); + os.push_back (o); + } + + // version + // + { + ::brep::cli::option_names a; + a.push_back ("pv"); + std::string dv; + ::brep::cli::option o ("version", a, false, dv); + os.push_back (o); + } + + // toolchain + // + { + ::brep::cli::option_names a; + a.push_back ("th"); + std::string dv ("*"); + ::brep::cli::option o ("toolchain", a, false, dv); + os.push_back (o); + } + + // target + // + { + ::brep::cli::option_names a; + a.push_back ("tg"); + std::string dv; + ::brep::cli::option o ("target", a, false, dv); + os.push_back (o); + } + + // target_config + // + { + ::brep::cli::option_names a; + a.push_back ("tc"); + std::string dv; + ::brep::cli::option o ("target_config", a, false, dv); + os.push_back (o); + } + + // package_config + // + { + ::brep::cli::option_names a; + a.push_back ("pc"); + std::string dv; + ::brep::cli::option o ("package_config", a, false, dv); + os.push_back (o); + } + + // result + // + { + ::brep::cli::option_names a; + a.push_back ("rs"); + std::string dv ("*"); + ::brep::cli::option o ("result", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& builds:: + description () + { + static _cli_builds_desc_type _cli_builds_desc_; + return _cli_builds_desc_; + } + + typedef + std::map<std::string, void (*) (builds&, ::brep::cli::scanner&)> + _cli_builds_map; + + static _cli_builds_map _cli_builds_map_; + + struct _cli_builds_map_init + { + _cli_builds_map_init () + { + _cli_builds_map_["page"] = + &::brep::cli::thunk< builds, uint16_t, &builds::page_, + &builds::page_specified_ >; + _cli_builds_map_["p"] = + &::brep::cli::thunk< builds, uint16_t, &builds::page_, + &builds::page_specified_ >; + _cli_builds_map_["name"] = + &::brep::cli::thunk< builds, string, &builds::name_, + &builds::name_specified_ >; + _cli_builds_map_["_"] = + &::brep::cli::thunk< builds, string, &builds::name_, + &builds::name_specified_ >; + _cli_builds_map_["version"] = + &::brep::cli::thunk< builds, string, &builds::version_, + &builds::version_specified_ >; + _cli_builds_map_["pv"] = + &::brep::cli::thunk< builds, string, &builds::version_, + &builds::version_specified_ >; + _cli_builds_map_["toolchain"] = + &::brep::cli::thunk< builds, string, &builds::toolchain_, + &builds::toolchain_specified_ >; + _cli_builds_map_["th"] = + &::brep::cli::thunk< builds, string, &builds::toolchain_, + &builds::toolchain_specified_ >; + _cli_builds_map_["target"] = + &::brep::cli::thunk< builds, string, &builds::target_, + &builds::target_specified_ >; + _cli_builds_map_["tg"] = + &::brep::cli::thunk< builds, string, &builds::target_, + &builds::target_specified_ >; + _cli_builds_map_["target_config"] = + &::brep::cli::thunk< builds, string, &builds::target_config_, + &builds::target_config_specified_ >; + _cli_builds_map_["tc"] = + &::brep::cli::thunk< builds, string, &builds::target_config_, + &builds::target_config_specified_ >; + _cli_builds_map_["package_config"] = + &::brep::cli::thunk< builds, string, &builds::package_config_, + &builds::package_config_specified_ >; + _cli_builds_map_["pc"] = + &::brep::cli::thunk< builds, string, &builds::package_config_, + &builds::package_config_specified_ >; + _cli_builds_map_["result"] = + &::brep::cli::thunk< builds, string, &builds::result_, + &builds::result_specified_ >; + _cli_builds_map_["rs"] = + &::brep::cli::thunk< builds, string, &builds::result_, + &builds::result_specified_ >; + } + }; + + static _cli_builds_map_init _cli_builds_map_init_; + + bool builds:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_builds_map::const_iterator i (_cli_builds_map_.find (o)); + + if (i != _cli_builds_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool builds:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // build_configs + // + + build_configs:: + build_configs () + : class_name_ (), + class_name_specified_ (false), + page_ (), + page_specified_ (false) + { + } + + build_configs:: + build_configs (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : class_name_ (), + class_name_specified_ (false), + page_ (), + page_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + build_configs:: + build_configs (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : class_name_ (), + class_name_specified_ (false), + page_ (), + page_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + build_configs:: + build_configs (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : class_name_ (), + class_name_specified_ (false), + page_ (), + page_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_configs:: + build_configs (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : class_name_ (), + class_name_specified_ (false), + page_ (), + page_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + build_configs:: + build_configs (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : class_name_ (), + class_name_specified_ (false), + page_ (), + page_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para build_configs:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "class_name|_ <arg>" << std::endl; + + os << "page|p <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_build_configs_desc_type: ::brep::cli::options + { + _cli_build_configs_desc_type () + { + ::brep::params::build_configs::fill (*this); + } + }; + + void build_configs:: + fill (::brep::cli::options& os) + { + // class_name + // + { + ::brep::cli::option_names a; + a.push_back ("_"); + std::string dv; + ::brep::cli::option o ("class_name", a, false, dv); + os.push_back (o); + } + + // page + // + { + ::brep::cli::option_names a; + a.push_back ("p"); + std::string dv; + ::brep::cli::option o ("page", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& build_configs:: + description () + { + static _cli_build_configs_desc_type _cli_build_configs_desc_; + return _cli_build_configs_desc_; + } + + typedef + std::map<std::string, void (*) (build_configs&, ::brep::cli::scanner&)> + _cli_build_configs_map; + + static _cli_build_configs_map _cli_build_configs_map_; + + struct _cli_build_configs_map_init + { + _cli_build_configs_map_init () + { + _cli_build_configs_map_["class_name"] = + &::brep::cli::thunk< build_configs, string, &build_configs::class_name_, + &build_configs::class_name_specified_ >; + _cli_build_configs_map_["_"] = + &::brep::cli::thunk< build_configs, string, &build_configs::class_name_, + &build_configs::class_name_specified_ >; + _cli_build_configs_map_["page"] = + &::brep::cli::thunk< build_configs, uint16_t, &build_configs::page_, + &build_configs::page_specified_ >; + _cli_build_configs_map_["p"] = + &::brep::cli::thunk< build_configs, uint16_t, &build_configs::page_, + &build_configs::page_specified_ >; + } + }; + + static _cli_build_configs_map_init _cli_build_configs_map_init_; + + bool build_configs:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_build_configs_map::const_iterator i (_cli_build_configs_map_.find (o)); + + if (i != _cli_build_configs_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool build_configs:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // submit + // + + submit:: + submit () + : archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + } + + submit:: + submit (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + submit:: + submit (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + submit:: + submit (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + submit:: + submit (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + submit:: + submit (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para submit:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "archive <arg>" << std::endl; + + os << "sha256sum <arg>" << std::endl; + + os << "simulate <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_submit_desc_type: ::brep::cli::options + { + _cli_submit_desc_type () + { + ::brep::params::submit::fill (*this); + } + }; + + void submit:: + fill (::brep::cli::options& os) + { + // archive + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("archive", a, false, dv); + os.push_back (o); + } + + // sha256sum + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("sha256sum", a, false, dv); + os.push_back (o); + } + + // simulate + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("simulate", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& submit:: + description () + { + static _cli_submit_desc_type _cli_submit_desc_; + return _cli_submit_desc_; + } + + typedef + std::map<std::string, void (*) (submit&, ::brep::cli::scanner&)> + _cli_submit_map; + + static _cli_submit_map _cli_submit_map_; + + struct _cli_submit_map_init + { + _cli_submit_map_init () + { + _cli_submit_map_["archive"] = + &::brep::cli::thunk< submit, string, &submit::archive_, + &submit::archive_specified_ >; + _cli_submit_map_["sha256sum"] = + &::brep::cli::thunk< submit, string, &submit::sha256sum_, + &submit::sha256sum_specified_ >; + _cli_submit_map_["simulate"] = + &::brep::cli::thunk< submit, string, &submit::simulate_, + &submit::simulate_specified_ >; + } + }; + + static _cli_submit_map_init _cli_submit_map_init_; + + bool submit:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_submit_map::const_iterator i (_cli_submit_map_.find (o)); + + if (i != _cli_submit_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool submit:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // ci + // + + ci:: + ci () + : repository_ (), + repository_specified_ (false), + package_ (), + package_specified_ (false), + overrides_ (), + overrides_specified_ (false), + interactive_ (), + interactive_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + } + + ci:: + ci (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + package_ (), + package_specified_ (false), + overrides_ (), + overrides_specified_ (false), + interactive_ (), + interactive_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + ci:: + ci (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + package_ (), + package_specified_ (false), + overrides_ (), + overrides_specified_ (false), + interactive_ (), + interactive_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + ci:: + ci (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + package_ (), + package_specified_ (false), + overrides_ (), + overrides_specified_ (false), + interactive_ (), + interactive_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci:: + ci (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + package_ (), + package_specified_ (false), + overrides_ (), + overrides_specified_ (false), + interactive_ (), + interactive_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + ci:: + ci (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : repository_ (), + repository_specified_ (false), + package_ (), + package_specified_ (false), + overrides_ (), + overrides_specified_ (false), + interactive_ (), + interactive_specified_ (false), + simulate_ (), + simulate_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para ci:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "repository|_ <arg>" << std::endl; + + os << "package <arg>" << std::endl; + + os << "overrides <arg>" << std::endl; + + os << "interactive <arg>" << std::endl; + + os << "simulate <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_ci_desc_type: ::brep::cli::options + { + _cli_ci_desc_type () + { + ::brep::params::ci::fill (*this); + } + }; + + void ci:: + fill (::brep::cli::options& os) + { + // repository + // + { + ::brep::cli::option_names a; + a.push_back ("_"); + std::string dv; + ::brep::cli::option o ("repository", a, false, dv); + os.push_back (o); + } + + // package + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("package", a, false, dv); + os.push_back (o); + } + + // overrides + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("overrides", a, false, dv); + os.push_back (o); + } + + // interactive + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("interactive", a, false, dv); + os.push_back (o); + } + + // simulate + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("simulate", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& ci:: + description () + { + static _cli_ci_desc_type _cli_ci_desc_; + return _cli_ci_desc_; + } + + typedef + std::map<std::string, void (*) (ci&, ::brep::cli::scanner&)> + _cli_ci_map; + + static _cli_ci_map _cli_ci_map_; + + struct _cli_ci_map_init + { + _cli_ci_map_init () + { + _cli_ci_map_["repository"] = + &::brep::cli::thunk< ci, bpkg::repository_location, &ci::repository_, + &ci::repository_specified_ >; + _cli_ci_map_["_"] = + &::brep::cli::thunk< ci, bpkg::repository_location, &ci::repository_, + &ci::repository_specified_ >; + _cli_ci_map_["package"] = + &::brep::cli::thunk< ci, strings, &ci::package_, + &ci::package_specified_ >; + _cli_ci_map_["overrides"] = + &::brep::cli::thunk< ci, string, &ci::overrides_, + &ci::overrides_specified_ >; + _cli_ci_map_["interactive"] = + &::brep::cli::thunk< ci, string, &ci::interactive_, + &ci::interactive_specified_ >; + _cli_ci_map_["simulate"] = + &::brep::cli::thunk< ci, string, &ci::simulate_, + &ci::simulate_specified_ >; + } + }; + + static _cli_ci_map_init _cli_ci_map_init_; + + bool ci:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_ci_map::const_iterator i (_cli_ci_map_.find (o)); + + if (i != _cli_ci_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool ci:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + + // upload + // + + upload:: + upload () + : type_ (), + type_specified_ (false), + session_ (), + session_specified_ (false), + challenge_ (), + challenge_specified_ (false), + instance_ (), + instance_specified_ (false), + archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false) + { + } + + upload:: + upload (int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : type_ (), + type_specified_ (false), + session_ (), + session_specified_ (false), + challenge_ (), + challenge_specified_ (false), + instance_ (), + instance_specified_ (false), + archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + } + + upload:: + upload (int start, + int& argc, + char** argv, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : type_ (), + type_specified_ (false), + session_ (), + session_specified_ (false), + challenge_ (), + challenge_specified_ (false), + instance_ (), + instance_specified_ (false), + archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + } + + upload:: + upload (int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : type_ (), + type_specified_ (false), + session_ (), + session_specified_ (false), + challenge_ (), + challenge_specified_ (false), + instance_ (), + instance_specified_ (false), + archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false) + { + ::brep::cli::argv_scanner s (argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + upload:: + upload (int start, + int& argc, + char** argv, + int& end, + bool erase, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : type_ (), + type_specified_ (false), + session_ (), + session_specified_ (false), + challenge_ (), + challenge_specified_ (false), + instance_ (), + instance_specified_ (false), + archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false) + { + ::brep::cli::argv_scanner s (start, argc, argv, erase); + _parse (s, opt, arg); + end = s.end (); + } + + upload:: + upload (::brep::cli::scanner& s, + ::brep::cli::unknown_mode opt, + ::brep::cli::unknown_mode arg) + : type_ (), + type_specified_ (false), + session_ (), + session_specified_ (false), + challenge_ (), + challenge_specified_ (false), + instance_ (), + instance_specified_ (false), + archive_ (), + archive_specified_ (false), + sha256sum_ (), + sha256sum_specified_ (false) + { + _parse (s, opt, arg); + } + + ::brep::cli::usage_para upload:: + print_usage (::std::ostream& os, ::brep::cli::usage_para p) + { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::brep::cli::usage_para::text) + os << ::std::endl; + + os << "type|_ <arg>" << std::endl; + + os << "session <arg>" << std::endl; + + os << "challenge <arg>" << std::endl; + + os << "instance <arg>" << std::endl; + + os << "archive <arg>" << std::endl; + + os << "sha256sum <arg>" << std::endl; + + p = ::brep::cli::usage_para::option; + + return p; + } + + struct _cli_upload_desc_type: ::brep::cli::options + { + _cli_upload_desc_type () + { + ::brep::params::upload::fill (*this); + } + }; + + void upload:: + fill (::brep::cli::options& os) + { + // type + // + { + ::brep::cli::option_names a; + a.push_back ("_"); + std::string dv; + ::brep::cli::option o ("type", a, false, dv); + os.push_back (o); + } + + // session + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("session", a, false, dv); + os.push_back (o); + } + + // challenge + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("challenge", a, false, dv); + os.push_back (o); + } + + // instance + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("instance", a, false, dv); + os.push_back (o); + } + + // archive + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("archive", a, false, dv); + os.push_back (o); + } + + // sha256sum + // + { + ::brep::cli::option_names a; + std::string dv; + ::brep::cli::option o ("sha256sum", a, false, dv); + os.push_back (o); + } + } + + const ::brep::cli::options& upload:: + description () + { + static _cli_upload_desc_type _cli_upload_desc_; + return _cli_upload_desc_; + } + + typedef + std::map<std::string, void (*) (upload&, ::brep::cli::scanner&)> + _cli_upload_map; + + static _cli_upload_map _cli_upload_map_; + + struct _cli_upload_map_init + { + _cli_upload_map_init () + { + _cli_upload_map_["type"] = + &::brep::cli::thunk< upload, string, &upload::type_, + &upload::type_specified_ >; + _cli_upload_map_["_"] = + &::brep::cli::thunk< upload, string, &upload::type_, + &upload::type_specified_ >; + _cli_upload_map_["session"] = + &::brep::cli::thunk< upload, string, &upload::session_, + &upload::session_specified_ >; + _cli_upload_map_["challenge"] = + &::brep::cli::thunk< upload, string, &upload::challenge_, + &upload::challenge_specified_ >; + _cli_upload_map_["instance"] = + &::brep::cli::thunk< upload, string, &upload::instance_, + &upload::instance_specified_ >; + _cli_upload_map_["archive"] = + &::brep::cli::thunk< upload, string, &upload::archive_, + &upload::archive_specified_ >; + _cli_upload_map_["sha256sum"] = + &::brep::cli::thunk< upload, string, &upload::sha256sum_, + &upload::sha256sum_specified_ >; + } + }; + + static _cli_upload_map_init _cli_upload_map_init_; + + bool upload:: + _parse (const char* o, ::brep::cli::scanner& s) + { + _cli_upload_map::const_iterator i (_cli_upload_map_.find (o)); + + if (i != _cli_upload_map_.end ()) + { + (*(i->second)) (*this, s); + return true; + } + + return false; + } + + bool upload:: + _parse (::brep::cli::scanner& s, + ::brep::cli::unknown_mode, + ::brep::cli::unknown_mode arg_mode) + { + bool r = false; + bool opt = true; + + while (s.more ()) + { + const char* o = s.peek (); + + if (std::strcmp (o, "--") == 0) + { + opt = false; + s.skip (); + r = true; + continue; + } + + if (opt) + { + if (_parse (o, s)) + { + r = true; + continue; + } + } + + switch (arg_mode) + { + case ::brep::cli::unknown_mode::skip: + { + s.skip (); + r = true; + continue; + } + case ::brep::cli::unknown_mode::stop: + { + break; + } + case ::brep::cli::unknown_mode::fail: + { + throw ::brep::cli::unknown_argument (o); + } + } + + break; + } + + return r; + } + } +} + +// Begin epilogue. +// +// +// End epilogue. + diff --git a/mod/module-options.hxx b/mod/module-options.hxx new file mode 100644 index 0000000..f321bf3 --- /dev/null +++ b/mod/module-options.hxx @@ -0,0 +1,5543 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +#ifndef MOD_MODULE_OPTIONS_HXX +#define MOD_MODULE_OPTIONS_HXX + +// Begin prologue. +// +// +// End prologue. + +#include <list> +#include <deque> +#include <map> +#include <vector> +#include <iosfwd> +#include <string> +#include <cstddef> +#include <exception> + +#ifndef CLI_POTENTIALLY_UNUSED +# if defined(_MSC_VER) || defined(__xlC__) +# define CLI_POTENTIALLY_UNUSED(x) (void*)&x +# else +# define CLI_POTENTIALLY_UNUSED(x) (void)x +# endif +#endif + +namespace brep +{ + namespace cli + { + class usage_para + { + public: + enum value + { + none, + text, + option + }; + + usage_para (value); + + operator value () const + { + return v_; + } + + private: + value v_; + }; + + class unknown_mode + { + public: + enum value + { + skip, + stop, + fail + }; + + unknown_mode (value); + + operator value () const + { + return v_; + } + + private: + value v_; + }; + + // Exceptions. + // + + class exception: public std::exception + { + public: + virtual void + print (::std::ostream&) const = 0; + }; + + ::std::ostream& + operator<< (::std::ostream&, const exception&); + + class unknown_option: public exception + { + public: + virtual + ~unknown_option () noexcept; + + unknown_option (const std::string& option); + + const std::string& + option () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const noexcept; + + private: + std::string option_; + }; + + class unknown_argument: public exception + { + public: + virtual + ~unknown_argument () noexcept; + + unknown_argument (const std::string& argument); + + const std::string& + argument () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const noexcept; + + private: + std::string argument_; + }; + + class missing_value: public exception + { + public: + virtual + ~missing_value () noexcept; + + missing_value (const std::string& option); + + const std::string& + option () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const noexcept; + + private: + std::string option_; + }; + + class invalid_value: public exception + { + public: + virtual + ~invalid_value () noexcept; + + invalid_value (const std::string& option, + const std::string& value, + const std::string& message = std::string ()); + + const std::string& + option () const; + + const std::string& + value () const; + + const std::string& + message () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const noexcept; + + private: + std::string option_; + std::string value_; + std::string message_; + }; + + class eos_reached: public exception + { + public: + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const noexcept; + }; + + class file_io_failure: public exception + { + public: + virtual + ~file_io_failure () noexcept; + + file_io_failure (const std::string& file); + + const std::string& + file () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const noexcept; + + private: + std::string file_; + }; + + class unmatched_quote: public exception + { + public: + virtual + ~unmatched_quote () noexcept; + + unmatched_quote (const std::string& argument); + + const std::string& + argument () const; + + virtual void + print (::std::ostream&) const; + + virtual const char* + what () const noexcept; + + private: + std::string argument_; + }; + + // Command line argument scanner interface. + // + // The values returned by next() are guaranteed to be valid + // for the two previous arguments up until a call to a third + // peek() or next(). + // + // The position() function returns a monotonically-increasing + // number which, if stored, can later be used to determine the + // relative position of the argument returned by the following + // call to next(). Note that if multiple scanners are used to + // extract arguments from multiple sources, then the end + // position of the previous scanner should be used as the + // start position of the next. + // + class scanner + { + public: + virtual + ~scanner (); + + virtual bool + more () = 0; + + virtual const char* + peek () = 0; + + virtual const char* + next () = 0; + + virtual void + skip () = 0; + + virtual std::size_t + position () = 0; + }; + + class argv_scanner: public scanner + { + public: + argv_scanner (int& argc, + char** argv, + bool erase = false, + std::size_t start_position = 0); + + argv_scanner (int start, + int& argc, + char** argv, + bool erase = false, + std::size_t start_position = 0); + + int + end () const; + + virtual bool + more (); + + virtual const char* + peek (); + + virtual const char* + next (); + + virtual void + skip (); + + virtual std::size_t + position (); + + protected: + std::size_t start_position_; + int i_; + int& argc_; + char** argv_; + bool erase_; + }; + + class argv_file_scanner: public argv_scanner + { + public: + argv_file_scanner (int& argc, + char** argv, + const std::string& option, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (int start, + int& argc, + char** argv, + const std::string& option, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (const std::string& file, + const std::string& option, + std::size_t start_position = 0); + + struct option_info + { + // If search_func is not NULL, it is called, with the arg + // value as the second argument, to locate the options file. + // If it returns an empty string, then the file is ignored. + // + const char* option; + std::string (*search_func) (const char*, void* arg); + void* arg; + }; + + argv_file_scanner (int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (int start, + int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase = false, + std::size_t start_position = 0); + + argv_file_scanner (const std::string& file, + const option_info* options = 0, + std::size_t options_count = 0, + std::size_t start_position = 0); + + virtual bool + more (); + + virtual const char* + peek (); + + virtual const char* + next (); + + virtual void + skip (); + + virtual std::size_t + position (); + + // Return the file path if the peeked at argument came from a file and + // the empty string otherwise. The reference is guaranteed to be valid + // till the end of the scanner lifetime. + // + const std::string& + peek_file (); + + // Return the 1-based line number if the peeked at argument came from + // a file and zero otherwise. + // + std::size_t + peek_line (); + + private: + const option_info* + find (const char*) const; + + void + load (const std::string& file); + + typedef argv_scanner base; + + const std::string option_; + option_info option_info_; + const option_info* options_; + std::size_t options_count_; + + struct arg + { + std::string value; + const std::string* file; + std::size_t line; + }; + + std::deque<arg> args_; + std::list<std::string> files_; + + // Circular buffer of two arguments. + // + std::string hold_[2]; + std::size_t i_; + + bool skip_; + + static int zero_argc_; + static std::string empty_string_; + }; + + typedef std::vector<std::string> option_names; + + class option + { + public: + + const std::string& + name () const; + + const option_names& + aliases () const; + + bool + flag () const; + + const std::string& + default_value () const; + + public:option (); + option (const std::string& name, + const option_names& aliases, + bool flag, + const std::string& default_value); + + private: + std::string name_; + option_names aliases_; + bool flag_; + std::string default_value_; + }; + + class options: public std::vector<option> + { + public: + typedef std::vector<option> container_type; + + container_type::const_iterator + find (const std::string& name) const; + + void + push_back (const option&); + private: + typedef std::map<std::string, container_type::size_type> map_type; + map_type map_; + }; + + template <typename X> + struct parser; + } +} + +#include <map> + +#include <regex> + +#include <libbpkg/manifest.hxx> + +#include <libbbot/manifest.hxx> + +#include <web/xhtml/fragment.hxx> + +#include <libbrep/types.hxx> + +#include <mod/options-types.hxx> + +namespace brep +{ + namespace options + { + class repository_email + { + public: + repository_email (); + + repository_email (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_email (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_email (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_email (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_email (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + email () const; + + string& + email (); + + void + email (const string&); + + bool + email_specified () const; + + void + email_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_repository_email_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string email_; + bool email_specified_; + }; + + class repository_url + { + public: + repository_url (); + + repository_url (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_url (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_url (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_url (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_url (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + host () const; + + string& + host (); + + void + host (const string&); + + bool + host_specified () const; + + void + host_specified (bool); + + const dir_path& + root () const; + + dir_path& + root (); + + void + root (const dir_path&); + + bool + root_specified () const; + + void + root_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_repository_url_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string host_; + bool host_specified_; + dir_path root_; + bool root_specified_; + }; + + class build_email_notification: public ::brep::options::repository_email, + public ::brep::options::repository_url + { + public: + build_email_notification (); + + build_email_notification (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_email_notification (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_email_notification (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_email_notification (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_email_notification (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const std::map<string, build_email>& + build_toolchain_email () const; + + std::map<string, build_email>& + build_toolchain_email (); + + void + build_toolchain_email (const std::map<string, build_email>&); + + bool + build_toolchain_email_specified () const; + + void + build_toolchain_email_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_email_notification_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + std::map<string, build_email> build_toolchain_email_; + bool build_toolchain_email_specified_; + }; + + class handler + { + public: + handler (); + + handler (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + handler (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + handler (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + handler (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + handler (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + tenant_name () const; + + string& + tenant_name (); + + void + tenant_name (const string&); + + bool + tenant_name_specified () const; + + void + tenant_name_specified (bool); + + const uint16_t& + verbosity () const; + + uint16_t& + verbosity (); + + void + verbosity (const uint16_t&); + + bool + verbosity_specified () const; + + void + verbosity_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_handler_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string tenant_name_; + bool tenant_name_specified_; + uint16_t verbosity_; + bool verbosity_specified_; + }; + + class openssl_options + { + public: + openssl_options (); + + openssl_options (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + openssl_options (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + openssl_options (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + openssl_options (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + openssl_options (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const path& + openssl () const; + + path& + openssl (); + + void + openssl (const path&); + + bool + openssl_specified () const; + + void + openssl_specified (bool); + + const strings& + openssl_option () const; + + strings& + openssl_option (); + + void + openssl_option (const strings&); + + bool + openssl_option_specified () const; + + void + openssl_option_specified (bool); + + const strings& + openssl_envvar () const; + + strings& + openssl_envvar (); + + void + openssl_envvar (const strings&); + + bool + openssl_envvar_specified () const; + + void + openssl_envvar_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_openssl_options_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + path openssl_; + bool openssl_specified_; + strings openssl_option_; + bool openssl_option_specified_; + strings openssl_envvar_; + bool openssl_envvar_specified_; + }; + + class package_db + { + public: + package_db (); + + package_db (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_db (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_db (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_db (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_db (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + package_db_user () const; + + string& + package_db_user (); + + void + package_db_user (const string&); + + bool + package_db_user_specified () const; + + void + package_db_user_specified (bool); + + const string& + package_db_role () const; + + string& + package_db_role (); + + void + package_db_role (const string&); + + bool + package_db_role_specified () const; + + void + package_db_role_specified (bool); + + const string& + package_db_password () const; + + string& + package_db_password (); + + void + package_db_password (const string&); + + bool + package_db_password_specified () const; + + void + package_db_password_specified (bool); + + const string& + package_db_name () const; + + string& + package_db_name (); + + void + package_db_name (const string&); + + bool + package_db_name_specified () const; + + void + package_db_name_specified (bool); + + const string& + package_db_host () const; + + string& + package_db_host (); + + void + package_db_host (const string&); + + bool + package_db_host_specified () const; + + void + package_db_host_specified (bool); + + const uint16_t& + package_db_port () const; + + uint16_t& + package_db_port (); + + void + package_db_port (const uint16_t&); + + bool + package_db_port_specified () const; + + void + package_db_port_specified (bool); + + const size_t& + package_db_max_connections () const; + + size_t& + package_db_max_connections (); + + void + package_db_max_connections (const size_t&); + + bool + package_db_max_connections_specified () const; + + void + package_db_max_connections_specified (bool); + + const size_t& + package_db_retry () const; + + size_t& + package_db_retry (); + + void + package_db_retry (const size_t&); + + bool + package_db_retry_specified () const; + + void + package_db_retry_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_package_db_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string package_db_user_; + bool package_db_user_specified_; + string package_db_role_; + bool package_db_role_specified_; + string package_db_password_; + bool package_db_password_specified_; + string package_db_name_; + bool package_db_name_specified_; + string package_db_host_; + bool package_db_host_specified_; + uint16_t package_db_port_; + bool package_db_port_specified_; + size_t package_db_max_connections_; + bool package_db_max_connections_specified_; + size_t package_db_retry_; + bool package_db_retry_specified_; + }; + + class build: public ::brep::options::openssl_options + { + public: + build (); + + build (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const path& + build_config () const; + + path& + build_config (); + + void + build_config (const path&); + + bool + build_config_specified () const; + + void + build_config_specified (bool); + + const dir_path& + build_bot_agent_keys () const; + + dir_path& + build_bot_agent_keys (); + + void + build_bot_agent_keys (const dir_path&); + + bool + build_bot_agent_keys_specified () const; + + void + build_bot_agent_keys_specified (bool); + + const size_t& + build_forced_rebuild_timeout () const; + + size_t& + build_forced_rebuild_timeout (); + + void + build_forced_rebuild_timeout (const size_t&); + + bool + build_forced_rebuild_timeout_specified () const; + + void + build_forced_rebuild_timeout_specified (bool); + + const size_t& + build_soft_rebuild_timeout () const; + + size_t& + build_soft_rebuild_timeout (); + + void + build_soft_rebuild_timeout (const size_t&); + + bool + build_soft_rebuild_timeout_specified () const; + + void + build_soft_rebuild_timeout_specified (bool); + + const size_t& + build_alt_soft_rebuild_timeout () const; + + size_t& + build_alt_soft_rebuild_timeout (); + + void + build_alt_soft_rebuild_timeout (const size_t&); + + bool + build_alt_soft_rebuild_timeout_specified () const; + + void + build_alt_soft_rebuild_timeout_specified (bool); + + const duration& + build_alt_soft_rebuild_start () const; + + duration& + build_alt_soft_rebuild_start (); + + void + build_alt_soft_rebuild_start (const duration&); + + bool + build_alt_soft_rebuild_start_specified () const; + + void + build_alt_soft_rebuild_start_specified (bool); + + const duration& + build_alt_soft_rebuild_stop () const; + + duration& + build_alt_soft_rebuild_stop (); + + void + build_alt_soft_rebuild_stop (const duration&); + + bool + build_alt_soft_rebuild_stop_specified () const; + + void + build_alt_soft_rebuild_stop_specified (bool); + + const size_t& + build_hard_rebuild_timeout () const; + + size_t& + build_hard_rebuild_timeout (); + + void + build_hard_rebuild_timeout (const size_t&); + + bool + build_hard_rebuild_timeout_specified () const; + + void + build_hard_rebuild_timeout_specified (bool); + + const size_t& + build_alt_hard_rebuild_timeout () const; + + size_t& + build_alt_hard_rebuild_timeout (); + + void + build_alt_hard_rebuild_timeout (const size_t&); + + bool + build_alt_hard_rebuild_timeout_specified () const; + + void + build_alt_hard_rebuild_timeout_specified (bool); + + const duration& + build_alt_hard_rebuild_start () const; + + duration& + build_alt_hard_rebuild_start (); + + void + build_alt_hard_rebuild_start (const duration&); + + bool + build_alt_hard_rebuild_start_specified () const; + + void + build_alt_hard_rebuild_start_specified (bool); + + const duration& + build_alt_hard_rebuild_stop () const; + + duration& + build_alt_hard_rebuild_stop (); + + void + build_alt_hard_rebuild_stop (const duration&); + + bool + build_alt_hard_rebuild_stop_specified () const; + + void + build_alt_hard_rebuild_stop_specified (bool); + + const size_t& + build_queued_timeout () const; + + size_t& + build_queued_timeout (); + + void + build_queued_timeout (const size_t&); + + bool + build_queued_timeout_specified () const; + + void + build_queued_timeout_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + path build_config_; + bool build_config_specified_; + dir_path build_bot_agent_keys_; + bool build_bot_agent_keys_specified_; + size_t build_forced_rebuild_timeout_; + bool build_forced_rebuild_timeout_specified_; + size_t build_soft_rebuild_timeout_; + bool build_soft_rebuild_timeout_specified_; + size_t build_alt_soft_rebuild_timeout_; + bool build_alt_soft_rebuild_timeout_specified_; + duration build_alt_soft_rebuild_start_; + bool build_alt_soft_rebuild_start_specified_; + duration build_alt_soft_rebuild_stop_; + bool build_alt_soft_rebuild_stop_specified_; + size_t build_hard_rebuild_timeout_; + bool build_hard_rebuild_timeout_specified_; + size_t build_alt_hard_rebuild_timeout_; + bool build_alt_hard_rebuild_timeout_specified_; + duration build_alt_hard_rebuild_start_; + bool build_alt_hard_rebuild_start_specified_; + duration build_alt_hard_rebuild_stop_; + bool build_alt_hard_rebuild_stop_specified_; + size_t build_queued_timeout_; + bool build_queued_timeout_specified_; + }; + + class build_db + { + public: + build_db (); + + build_db (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_db (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_db (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_db (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_db (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + build_db_user () const; + + string& + build_db_user (); + + void + build_db_user (const string&); + + bool + build_db_user_specified () const; + + void + build_db_user_specified (bool); + + const string& + build_db_role () const; + + string& + build_db_role (); + + void + build_db_role (const string&); + + bool + build_db_role_specified () const; + + void + build_db_role_specified (bool); + + const string& + build_db_password () const; + + string& + build_db_password (); + + void + build_db_password (const string&); + + bool + build_db_password_specified () const; + + void + build_db_password_specified (bool); + + const string& + build_db_name () const; + + string& + build_db_name (); + + void + build_db_name (const string&); + + bool + build_db_name_specified () const; + + void + build_db_name_specified (bool); + + const string& + build_db_host () const; + + string& + build_db_host (); + + void + build_db_host (const string&); + + bool + build_db_host_specified () const; + + void + build_db_host_specified (bool); + + const uint16_t& + build_db_port () const; + + uint16_t& + build_db_port (); + + void + build_db_port (const uint16_t&); + + bool + build_db_port_specified () const; + + void + build_db_port_specified (bool); + + const size_t& + build_db_max_connections () const; + + size_t& + build_db_max_connections (); + + void + build_db_max_connections (const size_t&); + + bool + build_db_max_connections_specified () const; + + void + build_db_max_connections_specified (bool); + + const size_t& + build_db_retry () const; + + size_t& + build_db_retry (); + + void + build_db_retry (const size_t&); + + bool + build_db_retry_specified () const; + + void + build_db_retry_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_db_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string build_db_user_; + bool build_db_user_specified_; + string build_db_role_; + bool build_db_role_specified_; + string build_db_password_; + bool build_db_password_specified_; + string build_db_name_; + bool build_db_name_specified_; + string build_db_host_; + bool build_db_host_specified_; + uint16_t build_db_port_; + bool build_db_port_specified_; + size_t build_db_max_connections_; + bool build_db_max_connections_specified_; + size_t build_db_retry_; + bool build_db_retry_specified_; + }; + + class build_upload + { + public: + build_upload (); + + build_upload (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_upload (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_upload (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_upload (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_upload (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const std::map<string, dir_path>& + upload_data () const; + + std::map<string, dir_path>& + upload_data (); + + void + upload_data (const std::map<string, dir_path>&); + + bool + upload_data_specified () const; + + void + upload_data_specified (bool); + + const std::map<string, size_t>& + upload_max_size () const; + + std::map<string, size_t>& + upload_max_size (); + + void + upload_max_size (const std::map<string, size_t>&); + + bool + upload_max_size_specified () const; + + void + upload_max_size_specified (bool); + + const std::map<string, string>& + upload_email () const; + + std::map<string, string>& + upload_email (); + + void + upload_email (const std::map<string, string>&); + + bool + upload_email_specified () const; + + void + upload_email_specified (bool); + + const std::map<string, path>& + upload_handler () const; + + std::map<string, path>& + upload_handler (); + + void + upload_handler (const std::map<string, path>&); + + bool + upload_handler_specified () const; + + void + upload_handler_specified (bool); + + const std::multimap<string, string>& + upload_handler_argument () const; + + std::multimap<string, string>& + upload_handler_argument (); + + void + upload_handler_argument (const std::multimap<string, string>&); + + bool + upload_handler_argument_specified () const; + + void + upload_handler_argument_specified (bool); + + const std::map<string, size_t>& + upload_handler_timeout () const; + + std::map<string, size_t>& + upload_handler_timeout (); + + void + upload_handler_timeout (const std::map<string, size_t>&); + + bool + upload_handler_timeout_specified () const; + + void + upload_handler_timeout_specified (bool); + + const std::multimap<string, string>& + upload_toolchain_exclude () const; + + std::multimap<string, string>& + upload_toolchain_exclude (); + + void + upload_toolchain_exclude (const std::multimap<string, string>&); + + bool + upload_toolchain_exclude_specified () const; + + void + upload_toolchain_exclude_specified (bool); + + const std::multimap<string, string>& + upload_repository_exclude () const; + + std::multimap<string, string>& + upload_repository_exclude (); + + void + upload_repository_exclude (const std::multimap<string, string>&); + + bool + upload_repository_exclude_specified () const; + + void + upload_repository_exclude_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_upload_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + std::map<string, dir_path> upload_data_; + bool upload_data_specified_; + std::map<string, size_t> upload_max_size_; + bool upload_max_size_specified_; + std::map<string, string> upload_email_; + bool upload_email_specified_; + std::map<string, path> upload_handler_; + bool upload_handler_specified_; + std::multimap<string, string> upload_handler_argument_; + bool upload_handler_argument_specified_; + std::map<string, size_t> upload_handler_timeout_; + bool upload_handler_timeout_specified_; + std::multimap<string, string> upload_toolchain_exclude_; + bool upload_toolchain_exclude_specified_; + std::multimap<string, string> upload_repository_exclude_; + bool upload_repository_exclude_specified_; + }; + + class page + { + public: + page (); + + page (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + page (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + page (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + page (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + page (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const web::xhtml::fragment& + logo () const; + + web::xhtml::fragment& + logo (); + + void + logo (const web::xhtml::fragment&); + + bool + logo_specified () const; + + void + logo_specified (bool); + + const vector<page_menu>& + menu () const; + + vector<page_menu>& + menu (); + + void + menu (const vector<page_menu>&); + + bool + menu_specified () const; + + void + menu_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_page_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + web::xhtml::fragment logo_; + bool logo_specified_; + vector<page_menu> menu_; + bool menu_specified_; + }; + + class search + { + public: + search (); + + search (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + search (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + search (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + search (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + search (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const uint16_t& + search_page_entries () const; + + uint16_t& + search_page_entries (); + + void + search_page_entries (const uint16_t&); + + bool + search_page_entries_specified () const; + + void + search_page_entries_specified (bool); + + const uint16_t& + search_pages () const; + + uint16_t& + search_pages (); + + void + search_pages (const uint16_t&); + + bool + search_pages_specified () const; + + void + search_pages_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_search_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + uint16_t search_page_entries_; + bool search_page_entries_specified_; + uint16_t search_pages_; + bool search_pages_specified_; + }; + + class package + { + public: + package (); + + package (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const uint16_t& + package_description () const; + + uint16_t& + package_description (); + + void + package_description (const uint16_t&); + + bool + package_description_specified () const; + + void + package_description_specified (bool); + + const uint16_t& + package_changes () const; + + uint16_t& + package_changes (); + + void + package_changes (const uint16_t&); + + bool + package_changes_specified () const; + + void + package_changes_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_package_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + uint16_t package_description_; + bool package_description_specified_; + uint16_t package_changes_; + bool package_changes_specified_; + }; + + class packages: public ::brep::options::search, + public ::brep::options::package_db, + public ::brep::options::page, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + packages (); + + packages (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + search_title () const; + + string& + search_title (); + + void + search_title (const string&); + + bool + search_title_specified () const; + + void + search_title_specified (bool); + + const web::xhtml::fragment& + search_description () const; + + web::xhtml::fragment& + search_description (); + + void + search_description (const web::xhtml::fragment&); + + bool + search_description_specified () const; + + void + search_description_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_packages_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string search_title_; + bool search_title_specified_; + web::xhtml::fragment search_description_; + bool search_description_specified_; + }; + + class package_details: public ::brep::options::package, + public ::brep::options::package_db, + public ::brep::options::search, + public ::brep::options::page, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + package_details (); + + package_details (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_package_details_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class package_version_details: public ::brep::options::package, + public ::brep::options::package_db, + public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::page, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + package_version_details (); + + package_version_details (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const dir_path& + bindist_root () const; + + dir_path& + bindist_root (); + + void + bindist_root (const dir_path&); + + bool + bindist_root_specified () const; + + void + bindist_root_specified (bool); + + const string& + bindist_url () const; + + string& + bindist_url (); + + void + bindist_url (const string&); + + bool + bindist_url_specified () const; + + void + bindist_url_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_package_version_details_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + dir_path bindist_root_; + bool bindist_root_specified_; + string bindist_url_; + bool bindist_url_specified_; + }; + + class repository_details: public ::brep::options::package_db, + public ::brep::options::page, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + repository_details (); + + repository_details (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_repository_details_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class build_task: public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::build_upload, + public ::brep::options::build_email_notification, + public ::brep::options::handler + { + public: + build_task (); + + build_task (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const size_t& + build_task_request_max_size () const; + + size_t& + build_task_request_max_size (); + + void + build_task_request_max_size (const size_t&); + + bool + build_task_request_max_size_specified () const; + + void + build_task_request_max_size_specified (bool); + + const size_t& + build_result_timeout () const; + + size_t& + build_result_timeout (); + + void + build_result_timeout (const size_t&); + + bool + build_result_timeout_specified () const; + + void + build_result_timeout_specified (bool); + + const vector<pair<std::regex, string>>& + build_interactive_login () const; + + vector<pair<std::regex, string>>& + build_interactive_login (); + + void + build_interactive_login (const vector<pair<std::regex, string>>&); + + bool + build_interactive_login_specified () const; + + void + build_interactive_login_specified (bool); + + const build_order& + build_package_order () const; + + build_order& + build_package_order (); + + void + build_package_order (const build_order&); + + bool + build_package_order_specified () const; + + void + build_package_order_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_task_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + size_t build_task_request_max_size_; + bool build_task_request_max_size_specified_; + size_t build_result_timeout_; + bool build_result_timeout_specified_; + vector<pair<std::regex, string>> build_interactive_login_; + bool build_interactive_login_specified_; + build_order build_package_order_; + bool build_package_order_specified_; + }; + + class build_result: public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::build_email_notification, + public ::brep::options::handler + { + public: + build_result (); + + build_result (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const size_t& + build_result_request_max_size () const; + + size_t& + build_result_request_max_size (); + + void + build_result_request_max_size (const size_t&); + + bool + build_result_request_max_size_specified () const; + + void + build_result_request_max_size_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_result_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + size_t build_result_request_max_size_; + bool build_result_request_max_size_specified_; + }; + + class build_log: public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + build_log (); + + build_log (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_log_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class build_force: public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::handler + { + public: + build_force (); + + build_force (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_force_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class builds: public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::page, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + builds (); + + builds (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const uint16_t& + build_page_entries () const; + + uint16_t& + build_page_entries (); + + void + build_page_entries (const uint16_t&); + + bool + build_page_entries_specified () const; + + void + build_page_entries_specified (bool); + + const uint16_t& + build_pages () const; + + uint16_t& + build_pages (); + + void + build_pages (const uint16_t&); + + bool + build_pages_specified () const; + + void + build_pages_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_builds_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + uint16_t build_page_entries_; + bool build_page_entries_specified_; + uint16_t build_pages_; + bool build_pages_specified_; + }; + + class build_configs: public ::brep::options::build, + public ::brep::options::page, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + build_configs (); + + build_configs (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const uint16_t& + build_config_page_entries () const; + + uint16_t& + build_config_page_entries (); + + void + build_config_page_entries (const uint16_t&); + + bool + build_config_page_entries_specified () const; + + void + build_config_page_entries_specified (bool); + + const uint16_t& + build_config_pages () const; + + uint16_t& + build_config_pages (); + + void + build_config_pages (const uint16_t&); + + bool + build_config_pages_specified () const; + + void + build_config_pages_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_configs_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + uint16_t build_config_page_entries_; + bool build_config_page_entries_specified_; + uint16_t build_config_pages_; + bool build_config_pages_specified_; + }; + + class submit: public ::brep::options::page, + public ::brep::options::repository_email, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + submit (); + + submit (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const dir_path& + submit_data () const; + + dir_path& + submit_data (); + + void + submit_data (const dir_path&); + + bool + submit_data_specified () const; + + void + submit_data_specified (bool); + + const dir_path& + submit_temp () const; + + dir_path& + submit_temp (); + + void + submit_temp (const dir_path&); + + bool + submit_temp_specified () const; + + void + submit_temp_specified (bool); + + const size_t& + submit_max_size () const; + + size_t& + submit_max_size (); + + void + submit_max_size (const size_t&); + + bool + submit_max_size_specified () const; + + void + submit_max_size_specified (bool); + + const path& + submit_form () const; + + path& + submit_form (); + + void + submit_form (const path&); + + bool + submit_form_specified () const; + + void + submit_form_specified (bool); + + const string& + submit_email () const; + + string& + submit_email (); + + void + submit_email (const string&); + + bool + submit_email_specified () const; + + void + submit_email_specified (bool); + + const path& + submit_handler () const; + + path& + submit_handler (); + + void + submit_handler (const path&); + + bool + submit_handler_specified () const; + + void + submit_handler_specified (bool); + + const strings& + submit_handler_argument () const; + + strings& + submit_handler_argument (); + + void + submit_handler_argument (const strings&); + + bool + submit_handler_argument_specified () const; + + void + submit_handler_argument_specified (bool); + + const size_t& + submit_handler_timeout () const; + + size_t& + submit_handler_timeout (); + + void + submit_handler_timeout (const size_t&); + + bool + submit_handler_timeout_specified () const; + + void + submit_handler_timeout_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_submit_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + dir_path submit_data_; + bool submit_data_specified_; + dir_path submit_temp_; + bool submit_temp_specified_; + size_t submit_max_size_; + bool submit_max_size_specified_; + path submit_form_; + bool submit_form_specified_; + string submit_email_; + bool submit_email_specified_; + path submit_handler_; + bool submit_handler_specified_; + strings submit_handler_argument_; + bool submit_handler_argument_specified_; + size_t submit_handler_timeout_; + bool submit_handler_timeout_specified_; + }; + + class ci_start: public ::brep::options::repository_email + { + public: + ci_start (); + + ci_start (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_start (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_start (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_start (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_start (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const dir_path& + ci_data () const; + + dir_path& + ci_data (); + + void + ci_data (const dir_path&); + + bool + ci_data_specified () const; + + void + ci_data_specified (bool); + + const string& + ci_email () const; + + string& + ci_email (); + + void + ci_email (const string&); + + bool + ci_email_specified () const; + + void + ci_email_specified (bool); + + const path& + ci_handler () const; + + path& + ci_handler (); + + void + ci_handler (const path&); + + bool + ci_handler_specified () const; + + void + ci_handler_specified (bool); + + const strings& + ci_handler_argument () const; + + strings& + ci_handler_argument (); + + void + ci_handler_argument (const strings&); + + bool + ci_handler_argument_specified () const; + + void + ci_handler_argument_specified (bool); + + const size_t& + ci_handler_timeout () const; + + size_t& + ci_handler_timeout (); + + void + ci_handler_timeout (const size_t&); + + bool + ci_handler_timeout_specified () const; + + void + ci_handler_timeout_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_ci_start_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + dir_path ci_data_; + bool ci_data_specified_; + string ci_email_; + bool ci_email_specified_; + path ci_handler_; + bool ci_handler_specified_; + strings ci_handler_argument_; + bool ci_handler_argument_specified_; + size_t ci_handler_timeout_; + bool ci_handler_timeout_specified_; + }; + + class ci_cancel + { + public: + ci_cancel (); + + ci_cancel (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_cancel (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_cancel (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_cancel (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_cancel (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_ci_cancel_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class ci: public ::brep::options::ci_start, + public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::page, + public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + ci (); + + ci (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const path& + ci_form () const; + + path& + ci_form (); + + void + ci_form (const path&); + + bool + ci_form_specified () const; + + void + ci_form_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_ci_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + path ci_form_; + bool ci_form_specified_; + }; + + class ci_github: public ::brep::options::ci_start, + public ::brep::options::ci_cancel, + public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::handler + { + public: + ci_github (); + + ci_github (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_github (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_github (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_github (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci_github (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_ci_github_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class upload: public ::brep::options::build, + public ::brep::options::build_db, + public ::brep::options::build_upload, + public ::brep::options::repository_email, + public ::brep::options::handler + { + public: + upload (); + + upload (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_upload_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class repository_root: public ::brep::options::repository_url, + public ::brep::options::handler + { + public: + repository_root (); + + repository_root (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_root (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_root (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_root (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_root (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + root_global_view () const; + + string& + root_global_view (); + + void + root_global_view (const string&); + + bool + root_global_view_specified () const; + + void + root_global_view_specified (bool); + + const string& + root_tenant_view () const; + + string& + root_tenant_view (); + + void + root_tenant_view (const string&); + + bool + root_tenant_view_specified () const; + + void + root_tenant_view_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_repository_root_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string root_global_view_; + bool root_global_view_specified_; + string root_tenant_view_; + bool root_tenant_view_specified_; + }; + } + + namespace params + { + class packages + { + public: + packages (); + + packages (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + packages (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const uint16_t& + page () const; + + uint16_t& + page (); + + void + page (const uint16_t&); + + bool + page_specified () const; + + void + page_specified (bool); + + const string& + q () const; + + string& + q (); + + void + q (const string&); + + bool + q_specified () const; + + void + q_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_packages_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + uint16_t page_; + bool page_specified_; + string q_; + bool q_specified_; + }; + + class package_details + { + public: + package_details (); + + package_details (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_details (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const uint16_t& + page () const; + + uint16_t& + page (); + + void + page (const uint16_t&); + + bool + page_specified () const; + + void + page_specified (bool); + + const string& + query () const; + + string& + query (); + + void + query (const string&); + + bool + query_specified () const; + + void + query_specified (bool); + + const page_form& + form () const; + + page_form& + form (); + + void + form (const page_form&); + + bool + form_specified () const; + + void + form_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_package_details_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + uint16_t page_; + bool page_specified_; + string query_; + bool query_specified_; + page_form form_; + bool form_specified_; + }; + + class package_version_details + { + public: + package_version_details (); + + package_version_details (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + package_version_details (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const page_form& + form () const; + + page_form& + form (); + + void + form (const page_form&); + + bool + form_specified () const; + + void + form_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_package_version_details_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + page_form form_; + bool form_specified_; + }; + + class repository_details + { + public: + repository_details (); + + repository_details (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + repository_details (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_repository_details_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class build_task + { + public: + build_task (); + + build_task (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_task (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const vector<string>& + repository () const; + + vector<string>& + repository (); + + void + repository (const vector<string>&); + + bool + repository_specified () const; + + void + repository_specified (bool); + + const bbot::interactive_mode& + interactive () const; + + bbot::interactive_mode& + interactive (); + + void + interactive (const bbot::interactive_mode&); + + bool + interactive_specified () const; + + void + interactive_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_task_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + vector<string> repository_; + bool repository_specified_; + bbot::interactive_mode interactive_; + bool interactive_specified_; + }; + + class build_result + { + public: + build_result (); + + build_result (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_result (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_result_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class build_log + { + public: + build_log (); + + build_log (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_log (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_log_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + }; + + class build_force + { + public: + build_force (); + + build_force (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_force (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + package () const; + + string& + package (); + + void + package (const string&); + + bool + package_specified () const; + + void + package_specified (bool); + + const string& + version () const; + + string& + version (); + + void + version (const string&); + + bool + version_specified () const; + + void + version_specified (bool); + + const string& + target () const; + + string& + target (); + + void + target (const string&); + + bool + target_specified () const; + + void + target_specified (bool); + + const string& + target_config () const; + + string& + target_config (); + + void + target_config (const string&); + + bool + target_config_specified () const; + + void + target_config_specified (bool); + + const string& + package_config () const; + + string& + package_config (); + + void + package_config (const string&); + + bool + package_config_specified () const; + + void + package_config_specified (bool); + + const string& + toolchain_name () const; + + string& + toolchain_name (); + + void + toolchain_name (const string&); + + bool + toolchain_name_specified () const; + + void + toolchain_name_specified (bool); + + const string& + toolchain_version () const; + + string& + toolchain_version (); + + void + toolchain_version (const string&); + + bool + toolchain_version_specified () const; + + void + toolchain_version_specified (bool); + + const string& + reason () const; + + string& + reason (); + + void + reason (const string&); + + bool + reason_specified () const; + + void + reason_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_force_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string package_; + bool package_specified_; + string version_; + bool version_specified_; + string target_; + bool target_specified_; + string target_config_; + bool target_config_specified_; + string package_config_; + bool package_config_specified_; + string toolchain_name_; + bool toolchain_name_specified_; + string toolchain_version_; + bool toolchain_version_specified_; + string reason_; + bool reason_specified_; + }; + + class builds + { + public: + builds (); + + builds (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + builds (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const uint16_t& + page () const; + + uint16_t& + page (); + + void + page (const uint16_t&); + + bool + page_specified () const; + + void + page_specified (bool); + + const string& + name () const; + + string& + name (); + + void + name (const string&); + + bool + name_specified () const; + + void + name_specified (bool); + + const string& + version () const; + + string& + version (); + + void + version (const string&); + + bool + version_specified () const; + + void + version_specified (bool); + + const string& + toolchain () const; + + string& + toolchain (); + + void + toolchain (const string&); + + bool + toolchain_specified () const; + + void + toolchain_specified (bool); + + const string& + target () const; + + string& + target (); + + void + target (const string&); + + bool + target_specified () const; + + void + target_specified (bool); + + const string& + target_config () const; + + string& + target_config (); + + void + target_config (const string&); + + bool + target_config_specified () const; + + void + target_config_specified (bool); + + const string& + package_config () const; + + string& + package_config (); + + void + package_config (const string&); + + bool + package_config_specified () const; + + void + package_config_specified (bool); + + const string& + result () const; + + string& + result (); + + void + result (const string&); + + bool + result_specified () const; + + void + result_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_builds_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + uint16_t page_; + bool page_specified_; + string name_; + bool name_specified_; + string version_; + bool version_specified_; + string toolchain_; + bool toolchain_specified_; + string target_; + bool target_specified_; + string target_config_; + bool target_config_specified_; + string package_config_; + bool package_config_specified_; + string result_; + bool result_specified_; + }; + + class build_configs + { + public: + build_configs (); + + build_configs (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + build_configs (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + class_name () const; + + string& + class_name (); + + void + class_name (const string&); + + bool + class_name_specified () const; + + void + class_name_specified (bool); + + const uint16_t& + page () const; + + uint16_t& + page (); + + void + page (const uint16_t&); + + bool + page_specified () const; + + void + page_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_build_configs_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string class_name_; + bool class_name_specified_; + uint16_t page_; + bool page_specified_; + }; + + class submit + { + public: + submit (); + + submit (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + submit (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + archive () const; + + string& + archive (); + + void + archive (const string&); + + bool + archive_specified () const; + + void + archive_specified (bool); + + const string& + sha256sum () const; + + string& + sha256sum (); + + void + sha256sum (const string&); + + bool + sha256sum_specified () const; + + void + sha256sum_specified (bool); + + const string& + simulate () const; + + string& + simulate (); + + void + simulate (const string&); + + bool + simulate_specified () const; + + void + simulate_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_submit_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string archive_; + bool archive_specified_; + string sha256sum_; + bool sha256sum_specified_; + string simulate_; + bool simulate_specified_; + }; + + class ci + { + public: + ci (); + + ci (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + ci (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const bpkg::repository_location& + repository () const; + + bpkg::repository_location& + repository (); + + void + repository (const bpkg::repository_location&); + + bool + repository_specified () const; + + void + repository_specified (bool); + + const strings& + package () const; + + strings& + package (); + + void + package (const strings&); + + bool + package_specified () const; + + void + package_specified (bool); + + const string& + overrides () const; + + string& + overrides (); + + void + overrides (const string&); + + bool + overrides_specified () const; + + void + overrides_specified (bool); + + const string& + interactive () const; + + string& + interactive (); + + void + interactive (const string&); + + bool + interactive_specified () const; + + void + interactive_specified (bool); + + const string& + simulate () const; + + string& + simulate (); + + void + simulate (const string&); + + bool + simulate_specified () const; + + void + simulate_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_ci_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + bpkg::repository_location repository_; + bool repository_specified_; + strings package_; + bool package_specified_; + string overrides_; + bool overrides_specified_; + string interactive_; + bool interactive_specified_; + string simulate_; + bool simulate_specified_; + }; + + class upload + { + public: + upload (); + + upload (int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (int start, + int& argc, + char** argv, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (int start, + int& argc, + char** argv, + int& end, + bool erase = false, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + upload (::brep::cli::scanner&, + ::brep::cli::unknown_mode option = ::brep::cli::unknown_mode::fail, + ::brep::cli::unknown_mode argument = ::brep::cli::unknown_mode::stop); + + // Option accessors and modifiers. + // + const string& + type () const; + + string& + type (); + + void + type (const string&); + + bool + type_specified () const; + + void + type_specified (bool); + + const string& + session () const; + + string& + session (); + + void + session (const string&); + + bool + session_specified () const; + + void + session_specified (bool); + + const string& + challenge () const; + + string& + challenge (); + + void + challenge (const string&); + + bool + challenge_specified () const; + + void + challenge_specified (bool); + + const string& + instance () const; + + string& + instance (); + + void + instance (const string&); + + bool + instance_specified () const; + + void + instance_specified (bool); + + const string& + archive () const; + + string& + archive (); + + void + archive (const string&); + + bool + archive_specified () const; + + void + archive_specified (bool); + + const string& + sha256sum () const; + + string& + sha256sum (); + + void + sha256sum (const string&); + + bool + sha256sum_specified () const; + + void + sha256sum_specified (bool); + + // Print usage information. + // + static ::brep::cli::usage_para + print_usage (::std::ostream&, + ::brep::cli::usage_para = ::brep::cli::usage_para::none); + + // Option description. + // + static const ::brep::cli::options& + description (); + + // Implementation details. + // + protected: + friend struct _cli_upload_desc_type; + + static void + fill (::brep::cli::options&); + + bool + _parse (const char*, ::brep::cli::scanner&); + + private: + bool + _parse (::brep::cli::scanner&, + ::brep::cli::unknown_mode option, + ::brep::cli::unknown_mode argument); + + public: + string type_; + bool type_specified_; + string session_; + bool session_specified_; + string challenge_; + bool challenge_specified_; + string instance_; + bool instance_specified_; + string archive_; + bool archive_specified_; + string sha256sum_; + bool sha256sum_specified_; + }; + } +} + +#include <mod/module-options.ixx> + +// Begin epilogue. +// +// +// End epilogue. + +#endif // MOD_MODULE_OPTIONS_HXX diff --git a/mod/module-options.ixx b/mod/module-options.ixx new file mode 100644 index 0000000..c5eb20c --- /dev/null +++ b/mod/module-options.ixx @@ -0,0 +1,4062 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +// Begin prologue. +// +// +// End prologue. + +#include <cassert> + +namespace brep +{ + namespace cli + { + // usage_para + // + inline usage_para:: + usage_para (value v) + : v_ (v) + { + } + + // unknown_mode + // + inline unknown_mode:: + unknown_mode (value v) + : v_ (v) + { + } + + // exception + // + inline ::std::ostream& + operator<< (::std::ostream& os, const exception& e) + { + e.print (os); + return os; + } + + // unknown_option + // + inline unknown_option:: + unknown_option (const std::string& option) + : option_ (option) + { + } + + inline const std::string& unknown_option:: + option () const + { + return option_; + } + + // unknown_argument + // + inline unknown_argument:: + unknown_argument (const std::string& argument) + : argument_ (argument) + { + } + + inline const std::string& unknown_argument:: + argument () const + { + return argument_; + } + + // missing_value + // + inline missing_value:: + missing_value (const std::string& option) + : option_ (option) + { + } + + inline const std::string& missing_value:: + option () const + { + return option_; + } + + // invalid_value + // + inline invalid_value:: + invalid_value (const std::string& option, + const std::string& value, + const std::string& message) + : option_ (option), + value_ (value), + message_ (message) + { + } + + inline const std::string& invalid_value:: + option () const + { + return option_; + } + + inline const std::string& invalid_value:: + value () const + { + return value_; + } + + inline const std::string& invalid_value:: + message () const + { + return message_; + } + + // file_io_failure + // + inline file_io_failure:: + file_io_failure (const std::string& file) + : file_ (file) + { + } + + inline const std::string& file_io_failure:: + file () const + { + return file_; + } + + // unmatched_quote + // + inline unmatched_quote:: + unmatched_quote (const std::string& argument) + : argument_ (argument) + { + } + + inline const std::string& unmatched_quote:: + argument () const + { + return argument_; + } + + // argv_scanner + // + inline argv_scanner:: + argv_scanner (int& argc, + char** argv, + bool erase, + std::size_t sp) + : start_position_ (sp + 1), + i_ (1), + argc_ (argc), + argv_ (argv), + erase_ (erase) + { + } + + inline argv_scanner:: + argv_scanner (int start, + int& argc, + char** argv, + bool erase, + std::size_t sp) + : start_position_ (sp + static_cast<std::size_t> (start)), + i_ (start), + argc_ (argc), + argv_ (argv), + erase_ (erase) + { + } + + inline int argv_scanner:: + end () const + { + return i_; + } + + // argv_file_scanner + // + inline argv_file_scanner:: + argv_file_scanner (int& argc, + char** argv, + const std::string& option, + bool erase, + std::size_t sp) + : argv_scanner (argc, argv, erase, sp), + option_ (option), + options_ (&option_info_), + options_count_ (1), + i_ (1), + skip_ (false) + { + option_info_.option = option_.c_str (); + option_info_.search_func = 0; + } + + inline argv_file_scanner:: + argv_file_scanner (int start, + int& argc, + char** argv, + const std::string& option, + bool erase, + std::size_t sp) + : argv_scanner (start, argc, argv, erase, sp), + option_ (option), + options_ (&option_info_), + options_count_ (1), + i_ (1), + skip_ (false) + { + option_info_.option = option_.c_str (); + option_info_.search_func = 0; + } + + inline argv_file_scanner:: + argv_file_scanner (const std::string& file, + const std::string& option, + std::size_t sp) + : argv_scanner (0, zero_argc_, 0, sp), + option_ (option), + options_ (&option_info_), + options_count_ (1), + i_ (1), + skip_ (false) + { + option_info_.option = option_.c_str (); + option_info_.search_func = 0; + + load (file); + } + + inline argv_file_scanner:: + argv_file_scanner (int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase, + std::size_t sp) + : argv_scanner (argc, argv, erase, sp), + options_ (options), + options_count_ (options_count), + i_ (1), + skip_ (false) + { + } + + inline argv_file_scanner:: + argv_file_scanner (int start, + int& argc, + char** argv, + const option_info* options, + std::size_t options_count, + bool erase, + std::size_t sp) + : argv_scanner (start, argc, argv, erase, sp), + options_ (options), + options_count_ (options_count), + i_ (1), + skip_ (false) + { + } + + inline argv_file_scanner:: + argv_file_scanner (const std::string& file, + const option_info* options, + std::size_t options_count, + std::size_t sp) + : argv_scanner (0, zero_argc_, 0, sp), + options_ (options), + options_count_ (options_count), + i_ (1), + skip_ (false) + { + load (file); + } + + inline const std::string& option:: + name () const + { + return name_; + } + + inline const option_names& option:: + aliases () const + { + return aliases_; + } + + inline bool option:: + flag () const + { + return flag_; + } + + inline const std::string& option:: + default_value () const + { + return default_value_; + } + + inline option:: + option () + { + } + + inline option:: + option (const std::string& n, + const option_names& a, + bool f, + const std::string& dv) + : name_ (n), aliases_ (a), flag_ (f), default_value_ (dv) + { + } + + inline options::container_type::const_iterator options:: + find (const std::string& name) const + { + map_type::const_iterator i (map_.find (name)); + return i != map_.end () ? begin () + i->second : end (); + } + } +} + +namespace brep +{ + namespace options + { + // repository_email + // + + inline const string& repository_email:: + email () const + { + return this->email_; + } + + inline string& repository_email:: + email () + { + return this->email_; + } + + inline void repository_email:: + email (const string& x) + { + this->email_ = x; + } + + inline bool repository_email:: + email_specified () const + { + return this->email_specified_; + } + + inline void repository_email:: + email_specified (bool x) + { + this->email_specified_ = x; + } + + // repository_url + // + + inline const string& repository_url:: + host () const + { + return this->host_; + } + + inline string& repository_url:: + host () + { + return this->host_; + } + + inline void repository_url:: + host (const string& x) + { + this->host_ = x; + } + + inline bool repository_url:: + host_specified () const + { + return this->host_specified_; + } + + inline void repository_url:: + host_specified (bool x) + { + this->host_specified_ = x; + } + + inline const dir_path& repository_url:: + root () const + { + return this->root_; + } + + inline dir_path& repository_url:: + root () + { + return this->root_; + } + + inline void repository_url:: + root (const dir_path& x) + { + this->root_ = x; + } + + inline bool repository_url:: + root_specified () const + { + return this->root_specified_; + } + + inline void repository_url:: + root_specified (bool x) + { + this->root_specified_ = x; + } + + // build_email_notification + // + + inline const std::map<string, build_email>& build_email_notification:: + build_toolchain_email () const + { + return this->build_toolchain_email_; + } + + inline std::map<string, build_email>& build_email_notification:: + build_toolchain_email () + { + return this->build_toolchain_email_; + } + + inline void build_email_notification:: + build_toolchain_email (const std::map<string, build_email>& x) + { + this->build_toolchain_email_ = x; + } + + inline bool build_email_notification:: + build_toolchain_email_specified () const + { + return this->build_toolchain_email_specified_; + } + + inline void build_email_notification:: + build_toolchain_email_specified (bool x) + { + this->build_toolchain_email_specified_ = x; + } + + // handler + // + + inline const string& handler:: + tenant_name () const + { + return this->tenant_name_; + } + + inline string& handler:: + tenant_name () + { + return this->tenant_name_; + } + + inline void handler:: + tenant_name (const string& x) + { + this->tenant_name_ = x; + } + + inline bool handler:: + tenant_name_specified () const + { + return this->tenant_name_specified_; + } + + inline void handler:: + tenant_name_specified (bool x) + { + this->tenant_name_specified_ = x; + } + + inline const uint16_t& handler:: + verbosity () const + { + return this->verbosity_; + } + + inline uint16_t& handler:: + verbosity () + { + return this->verbosity_; + } + + inline void handler:: + verbosity (const uint16_t& x) + { + this->verbosity_ = x; + } + + inline bool handler:: + verbosity_specified () const + { + return this->verbosity_specified_; + } + + inline void handler:: + verbosity_specified (bool x) + { + this->verbosity_specified_ = x; + } + + // openssl_options + // + + inline const path& openssl_options:: + openssl () const + { + return this->openssl_; + } + + inline path& openssl_options:: + openssl () + { + return this->openssl_; + } + + inline void openssl_options:: + openssl (const path& x) + { + this->openssl_ = x; + } + + inline bool openssl_options:: + openssl_specified () const + { + return this->openssl_specified_; + } + + inline void openssl_options:: + openssl_specified (bool x) + { + this->openssl_specified_ = x; + } + + inline const strings& openssl_options:: + openssl_option () const + { + return this->openssl_option_; + } + + inline strings& openssl_options:: + openssl_option () + { + return this->openssl_option_; + } + + inline void openssl_options:: + openssl_option (const strings& x) + { + this->openssl_option_ = x; + } + + inline bool openssl_options:: + openssl_option_specified () const + { + return this->openssl_option_specified_; + } + + inline void openssl_options:: + openssl_option_specified (bool x) + { + this->openssl_option_specified_ = x; + } + + inline const strings& openssl_options:: + openssl_envvar () const + { + return this->openssl_envvar_; + } + + inline strings& openssl_options:: + openssl_envvar () + { + return this->openssl_envvar_; + } + + inline void openssl_options:: + openssl_envvar (const strings& x) + { + this->openssl_envvar_ = x; + } + + inline bool openssl_options:: + openssl_envvar_specified () const + { + return this->openssl_envvar_specified_; + } + + inline void openssl_options:: + openssl_envvar_specified (bool x) + { + this->openssl_envvar_specified_ = x; + } + + // package_db + // + + inline const string& package_db:: + package_db_user () const + { + return this->package_db_user_; + } + + inline string& package_db:: + package_db_user () + { + return this->package_db_user_; + } + + inline void package_db:: + package_db_user (const string& x) + { + this->package_db_user_ = x; + } + + inline bool package_db:: + package_db_user_specified () const + { + return this->package_db_user_specified_; + } + + inline void package_db:: + package_db_user_specified (bool x) + { + this->package_db_user_specified_ = x; + } + + inline const string& package_db:: + package_db_role () const + { + return this->package_db_role_; + } + + inline string& package_db:: + package_db_role () + { + return this->package_db_role_; + } + + inline void package_db:: + package_db_role (const string& x) + { + this->package_db_role_ = x; + } + + inline bool package_db:: + package_db_role_specified () const + { + return this->package_db_role_specified_; + } + + inline void package_db:: + package_db_role_specified (bool x) + { + this->package_db_role_specified_ = x; + } + + inline const string& package_db:: + package_db_password () const + { + return this->package_db_password_; + } + + inline string& package_db:: + package_db_password () + { + return this->package_db_password_; + } + + inline void package_db:: + package_db_password (const string& x) + { + this->package_db_password_ = x; + } + + inline bool package_db:: + package_db_password_specified () const + { + return this->package_db_password_specified_; + } + + inline void package_db:: + package_db_password_specified (bool x) + { + this->package_db_password_specified_ = x; + } + + inline const string& package_db:: + package_db_name () const + { + return this->package_db_name_; + } + + inline string& package_db:: + package_db_name () + { + return this->package_db_name_; + } + + inline void package_db:: + package_db_name (const string& x) + { + this->package_db_name_ = x; + } + + inline bool package_db:: + package_db_name_specified () const + { + return this->package_db_name_specified_; + } + + inline void package_db:: + package_db_name_specified (bool x) + { + this->package_db_name_specified_ = x; + } + + inline const string& package_db:: + package_db_host () const + { + return this->package_db_host_; + } + + inline string& package_db:: + package_db_host () + { + return this->package_db_host_; + } + + inline void package_db:: + package_db_host (const string& x) + { + this->package_db_host_ = x; + } + + inline bool package_db:: + package_db_host_specified () const + { + return this->package_db_host_specified_; + } + + inline void package_db:: + package_db_host_specified (bool x) + { + this->package_db_host_specified_ = x; + } + + inline const uint16_t& package_db:: + package_db_port () const + { + return this->package_db_port_; + } + + inline uint16_t& package_db:: + package_db_port () + { + return this->package_db_port_; + } + + inline void package_db:: + package_db_port (const uint16_t& x) + { + this->package_db_port_ = x; + } + + inline bool package_db:: + package_db_port_specified () const + { + return this->package_db_port_specified_; + } + + inline void package_db:: + package_db_port_specified (bool x) + { + this->package_db_port_specified_ = x; + } + + inline const size_t& package_db:: + package_db_max_connections () const + { + return this->package_db_max_connections_; + } + + inline size_t& package_db:: + package_db_max_connections () + { + return this->package_db_max_connections_; + } + + inline void package_db:: + package_db_max_connections (const size_t& x) + { + this->package_db_max_connections_ = x; + } + + inline bool package_db:: + package_db_max_connections_specified () const + { + return this->package_db_max_connections_specified_; + } + + inline void package_db:: + package_db_max_connections_specified (bool x) + { + this->package_db_max_connections_specified_ = x; + } + + inline const size_t& package_db:: + package_db_retry () const + { + return this->package_db_retry_; + } + + inline size_t& package_db:: + package_db_retry () + { + return this->package_db_retry_; + } + + inline void package_db:: + package_db_retry (const size_t& x) + { + this->package_db_retry_ = x; + } + + inline bool package_db:: + package_db_retry_specified () const + { + return this->package_db_retry_specified_; + } + + inline void package_db:: + package_db_retry_specified (bool x) + { + this->package_db_retry_specified_ = x; + } + + // build + // + + inline const path& build:: + build_config () const + { + return this->build_config_; + } + + inline path& build:: + build_config () + { + return this->build_config_; + } + + inline void build:: + build_config (const path& x) + { + this->build_config_ = x; + } + + inline bool build:: + build_config_specified () const + { + return this->build_config_specified_; + } + + inline void build:: + build_config_specified (bool x) + { + this->build_config_specified_ = x; + } + + inline const dir_path& build:: + build_bot_agent_keys () const + { + return this->build_bot_agent_keys_; + } + + inline dir_path& build:: + build_bot_agent_keys () + { + return this->build_bot_agent_keys_; + } + + inline void build:: + build_bot_agent_keys (const dir_path& x) + { + this->build_bot_agent_keys_ = x; + } + + inline bool build:: + build_bot_agent_keys_specified () const + { + return this->build_bot_agent_keys_specified_; + } + + inline void build:: + build_bot_agent_keys_specified (bool x) + { + this->build_bot_agent_keys_specified_ = x; + } + + inline const size_t& build:: + build_forced_rebuild_timeout () const + { + return this->build_forced_rebuild_timeout_; + } + + inline size_t& build:: + build_forced_rebuild_timeout () + { + return this->build_forced_rebuild_timeout_; + } + + inline void build:: + build_forced_rebuild_timeout (const size_t& x) + { + this->build_forced_rebuild_timeout_ = x; + } + + inline bool build:: + build_forced_rebuild_timeout_specified () const + { + return this->build_forced_rebuild_timeout_specified_; + } + + inline void build:: + build_forced_rebuild_timeout_specified (bool x) + { + this->build_forced_rebuild_timeout_specified_ = x; + } + + inline const size_t& build:: + build_soft_rebuild_timeout () const + { + return this->build_soft_rebuild_timeout_; + } + + inline size_t& build:: + build_soft_rebuild_timeout () + { + return this->build_soft_rebuild_timeout_; + } + + inline void build:: + build_soft_rebuild_timeout (const size_t& x) + { + this->build_soft_rebuild_timeout_ = x; + } + + inline bool build:: + build_soft_rebuild_timeout_specified () const + { + return this->build_soft_rebuild_timeout_specified_; + } + + inline void build:: + build_soft_rebuild_timeout_specified (bool x) + { + this->build_soft_rebuild_timeout_specified_ = x; + } + + inline const size_t& build:: + build_alt_soft_rebuild_timeout () const + { + return this->build_alt_soft_rebuild_timeout_; + } + + inline size_t& build:: + build_alt_soft_rebuild_timeout () + { + return this->build_alt_soft_rebuild_timeout_; + } + + inline void build:: + build_alt_soft_rebuild_timeout (const size_t& x) + { + this->build_alt_soft_rebuild_timeout_ = x; + } + + inline bool build:: + build_alt_soft_rebuild_timeout_specified () const + { + return this->build_alt_soft_rebuild_timeout_specified_; + } + + inline void build:: + build_alt_soft_rebuild_timeout_specified (bool x) + { + this->build_alt_soft_rebuild_timeout_specified_ = x; + } + + inline const duration& build:: + build_alt_soft_rebuild_start () const + { + return this->build_alt_soft_rebuild_start_; + } + + inline duration& build:: + build_alt_soft_rebuild_start () + { + return this->build_alt_soft_rebuild_start_; + } + + inline void build:: + build_alt_soft_rebuild_start (const duration& x) + { + this->build_alt_soft_rebuild_start_ = x; + } + + inline bool build:: + build_alt_soft_rebuild_start_specified () const + { + return this->build_alt_soft_rebuild_start_specified_; + } + + inline void build:: + build_alt_soft_rebuild_start_specified (bool x) + { + this->build_alt_soft_rebuild_start_specified_ = x; + } + + inline const duration& build:: + build_alt_soft_rebuild_stop () const + { + return this->build_alt_soft_rebuild_stop_; + } + + inline duration& build:: + build_alt_soft_rebuild_stop () + { + return this->build_alt_soft_rebuild_stop_; + } + + inline void build:: + build_alt_soft_rebuild_stop (const duration& x) + { + this->build_alt_soft_rebuild_stop_ = x; + } + + inline bool build:: + build_alt_soft_rebuild_stop_specified () const + { + return this->build_alt_soft_rebuild_stop_specified_; + } + + inline void build:: + build_alt_soft_rebuild_stop_specified (bool x) + { + this->build_alt_soft_rebuild_stop_specified_ = x; + } + + inline const size_t& build:: + build_hard_rebuild_timeout () const + { + return this->build_hard_rebuild_timeout_; + } + + inline size_t& build:: + build_hard_rebuild_timeout () + { + return this->build_hard_rebuild_timeout_; + } + + inline void build:: + build_hard_rebuild_timeout (const size_t& x) + { + this->build_hard_rebuild_timeout_ = x; + } + + inline bool build:: + build_hard_rebuild_timeout_specified () const + { + return this->build_hard_rebuild_timeout_specified_; + } + + inline void build:: + build_hard_rebuild_timeout_specified (bool x) + { + this->build_hard_rebuild_timeout_specified_ = x; + } + + inline const size_t& build:: + build_alt_hard_rebuild_timeout () const + { + return this->build_alt_hard_rebuild_timeout_; + } + + inline size_t& build:: + build_alt_hard_rebuild_timeout () + { + return this->build_alt_hard_rebuild_timeout_; + } + + inline void build:: + build_alt_hard_rebuild_timeout (const size_t& x) + { + this->build_alt_hard_rebuild_timeout_ = x; + } + + inline bool build:: + build_alt_hard_rebuild_timeout_specified () const + { + return this->build_alt_hard_rebuild_timeout_specified_; + } + + inline void build:: + build_alt_hard_rebuild_timeout_specified (bool x) + { + this->build_alt_hard_rebuild_timeout_specified_ = x; + } + + inline const duration& build:: + build_alt_hard_rebuild_start () const + { + return this->build_alt_hard_rebuild_start_; + } + + inline duration& build:: + build_alt_hard_rebuild_start () + { + return this->build_alt_hard_rebuild_start_; + } + + inline void build:: + build_alt_hard_rebuild_start (const duration& x) + { + this->build_alt_hard_rebuild_start_ = x; + } + + inline bool build:: + build_alt_hard_rebuild_start_specified () const + { + return this->build_alt_hard_rebuild_start_specified_; + } + + inline void build:: + build_alt_hard_rebuild_start_specified (bool x) + { + this->build_alt_hard_rebuild_start_specified_ = x; + } + + inline const duration& build:: + build_alt_hard_rebuild_stop () const + { + return this->build_alt_hard_rebuild_stop_; + } + + inline duration& build:: + build_alt_hard_rebuild_stop () + { + return this->build_alt_hard_rebuild_stop_; + } + + inline void build:: + build_alt_hard_rebuild_stop (const duration& x) + { + this->build_alt_hard_rebuild_stop_ = x; + } + + inline bool build:: + build_alt_hard_rebuild_stop_specified () const + { + return this->build_alt_hard_rebuild_stop_specified_; + } + + inline void build:: + build_alt_hard_rebuild_stop_specified (bool x) + { + this->build_alt_hard_rebuild_stop_specified_ = x; + } + + inline const size_t& build:: + build_queued_timeout () const + { + return this->build_queued_timeout_; + } + + inline size_t& build:: + build_queued_timeout () + { + return this->build_queued_timeout_; + } + + inline void build:: + build_queued_timeout (const size_t& x) + { + this->build_queued_timeout_ = x; + } + + inline bool build:: + build_queued_timeout_specified () const + { + return this->build_queued_timeout_specified_; + } + + inline void build:: + build_queued_timeout_specified (bool x) + { + this->build_queued_timeout_specified_ = x; + } + + // build_db + // + + inline const string& build_db:: + build_db_user () const + { + return this->build_db_user_; + } + + inline string& build_db:: + build_db_user () + { + return this->build_db_user_; + } + + inline void build_db:: + build_db_user (const string& x) + { + this->build_db_user_ = x; + } + + inline bool build_db:: + build_db_user_specified () const + { + return this->build_db_user_specified_; + } + + inline void build_db:: + build_db_user_specified (bool x) + { + this->build_db_user_specified_ = x; + } + + inline const string& build_db:: + build_db_role () const + { + return this->build_db_role_; + } + + inline string& build_db:: + build_db_role () + { + return this->build_db_role_; + } + + inline void build_db:: + build_db_role (const string& x) + { + this->build_db_role_ = x; + } + + inline bool build_db:: + build_db_role_specified () const + { + return this->build_db_role_specified_; + } + + inline void build_db:: + build_db_role_specified (bool x) + { + this->build_db_role_specified_ = x; + } + + inline const string& build_db:: + build_db_password () const + { + return this->build_db_password_; + } + + inline string& build_db:: + build_db_password () + { + return this->build_db_password_; + } + + inline void build_db:: + build_db_password (const string& x) + { + this->build_db_password_ = x; + } + + inline bool build_db:: + build_db_password_specified () const + { + return this->build_db_password_specified_; + } + + inline void build_db:: + build_db_password_specified (bool x) + { + this->build_db_password_specified_ = x; + } + + inline const string& build_db:: + build_db_name () const + { + return this->build_db_name_; + } + + inline string& build_db:: + build_db_name () + { + return this->build_db_name_; + } + + inline void build_db:: + build_db_name (const string& x) + { + this->build_db_name_ = x; + } + + inline bool build_db:: + build_db_name_specified () const + { + return this->build_db_name_specified_; + } + + inline void build_db:: + build_db_name_specified (bool x) + { + this->build_db_name_specified_ = x; + } + + inline const string& build_db:: + build_db_host () const + { + return this->build_db_host_; + } + + inline string& build_db:: + build_db_host () + { + return this->build_db_host_; + } + + inline void build_db:: + build_db_host (const string& x) + { + this->build_db_host_ = x; + } + + inline bool build_db:: + build_db_host_specified () const + { + return this->build_db_host_specified_; + } + + inline void build_db:: + build_db_host_specified (bool x) + { + this->build_db_host_specified_ = x; + } + + inline const uint16_t& build_db:: + build_db_port () const + { + return this->build_db_port_; + } + + inline uint16_t& build_db:: + build_db_port () + { + return this->build_db_port_; + } + + inline void build_db:: + build_db_port (const uint16_t& x) + { + this->build_db_port_ = x; + } + + inline bool build_db:: + build_db_port_specified () const + { + return this->build_db_port_specified_; + } + + inline void build_db:: + build_db_port_specified (bool x) + { + this->build_db_port_specified_ = x; + } + + inline const size_t& build_db:: + build_db_max_connections () const + { + return this->build_db_max_connections_; + } + + inline size_t& build_db:: + build_db_max_connections () + { + return this->build_db_max_connections_; + } + + inline void build_db:: + build_db_max_connections (const size_t& x) + { + this->build_db_max_connections_ = x; + } + + inline bool build_db:: + build_db_max_connections_specified () const + { + return this->build_db_max_connections_specified_; + } + + inline void build_db:: + build_db_max_connections_specified (bool x) + { + this->build_db_max_connections_specified_ = x; + } + + inline const size_t& build_db:: + build_db_retry () const + { + return this->build_db_retry_; + } + + inline size_t& build_db:: + build_db_retry () + { + return this->build_db_retry_; + } + + inline void build_db:: + build_db_retry (const size_t& x) + { + this->build_db_retry_ = x; + } + + inline bool build_db:: + build_db_retry_specified () const + { + return this->build_db_retry_specified_; + } + + inline void build_db:: + build_db_retry_specified (bool x) + { + this->build_db_retry_specified_ = x; + } + + // build_upload + // + + inline const std::map<string, dir_path>& build_upload:: + upload_data () const + { + return this->upload_data_; + } + + inline std::map<string, dir_path>& build_upload:: + upload_data () + { + return this->upload_data_; + } + + inline void build_upload:: + upload_data (const std::map<string, dir_path>& x) + { + this->upload_data_ = x; + } + + inline bool build_upload:: + upload_data_specified () const + { + return this->upload_data_specified_; + } + + inline void build_upload:: + upload_data_specified (bool x) + { + this->upload_data_specified_ = x; + } + + inline const std::map<string, size_t>& build_upload:: + upload_max_size () const + { + return this->upload_max_size_; + } + + inline std::map<string, size_t>& build_upload:: + upload_max_size () + { + return this->upload_max_size_; + } + + inline void build_upload:: + upload_max_size (const std::map<string, size_t>& x) + { + this->upload_max_size_ = x; + } + + inline bool build_upload:: + upload_max_size_specified () const + { + return this->upload_max_size_specified_; + } + + inline void build_upload:: + upload_max_size_specified (bool x) + { + this->upload_max_size_specified_ = x; + } + + inline const std::map<string, string>& build_upload:: + upload_email () const + { + return this->upload_email_; + } + + inline std::map<string, string>& build_upload:: + upload_email () + { + return this->upload_email_; + } + + inline void build_upload:: + upload_email (const std::map<string, string>& x) + { + this->upload_email_ = x; + } + + inline bool build_upload:: + upload_email_specified () const + { + return this->upload_email_specified_; + } + + inline void build_upload:: + upload_email_specified (bool x) + { + this->upload_email_specified_ = x; + } + + inline const std::map<string, path>& build_upload:: + upload_handler () const + { + return this->upload_handler_; + } + + inline std::map<string, path>& build_upload:: + upload_handler () + { + return this->upload_handler_; + } + + inline void build_upload:: + upload_handler (const std::map<string, path>& x) + { + this->upload_handler_ = x; + } + + inline bool build_upload:: + upload_handler_specified () const + { + return this->upload_handler_specified_; + } + + inline void build_upload:: + upload_handler_specified (bool x) + { + this->upload_handler_specified_ = x; + } + + inline const std::multimap<string, string>& build_upload:: + upload_handler_argument () const + { + return this->upload_handler_argument_; + } + + inline std::multimap<string, string>& build_upload:: + upload_handler_argument () + { + return this->upload_handler_argument_; + } + + inline void build_upload:: + upload_handler_argument (const std::multimap<string, string>& x) + { + this->upload_handler_argument_ = x; + } + + inline bool build_upload:: + upload_handler_argument_specified () const + { + return this->upload_handler_argument_specified_; + } + + inline void build_upload:: + upload_handler_argument_specified (bool x) + { + this->upload_handler_argument_specified_ = x; + } + + inline const std::map<string, size_t>& build_upload:: + upload_handler_timeout () const + { + return this->upload_handler_timeout_; + } + + inline std::map<string, size_t>& build_upload:: + upload_handler_timeout () + { + return this->upload_handler_timeout_; + } + + inline void build_upload:: + upload_handler_timeout (const std::map<string, size_t>& x) + { + this->upload_handler_timeout_ = x; + } + + inline bool build_upload:: + upload_handler_timeout_specified () const + { + return this->upload_handler_timeout_specified_; + } + + inline void build_upload:: + upload_handler_timeout_specified (bool x) + { + this->upload_handler_timeout_specified_ = x; + } + + inline const std::multimap<string, string>& build_upload:: + upload_toolchain_exclude () const + { + return this->upload_toolchain_exclude_; + } + + inline std::multimap<string, string>& build_upload:: + upload_toolchain_exclude () + { + return this->upload_toolchain_exclude_; + } + + inline void build_upload:: + upload_toolchain_exclude (const std::multimap<string, string>& x) + { + this->upload_toolchain_exclude_ = x; + } + + inline bool build_upload:: + upload_toolchain_exclude_specified () const + { + return this->upload_toolchain_exclude_specified_; + } + + inline void build_upload:: + upload_toolchain_exclude_specified (bool x) + { + this->upload_toolchain_exclude_specified_ = x; + } + + inline const std::multimap<string, string>& build_upload:: + upload_repository_exclude () const + { + return this->upload_repository_exclude_; + } + + inline std::multimap<string, string>& build_upload:: + upload_repository_exclude () + { + return this->upload_repository_exclude_; + } + + inline void build_upload:: + upload_repository_exclude (const std::multimap<string, string>& x) + { + this->upload_repository_exclude_ = x; + } + + inline bool build_upload:: + upload_repository_exclude_specified () const + { + return this->upload_repository_exclude_specified_; + } + + inline void build_upload:: + upload_repository_exclude_specified (bool x) + { + this->upload_repository_exclude_specified_ = x; + } + + // page + // + + inline const web::xhtml::fragment& page:: + logo () const + { + return this->logo_; + } + + inline web::xhtml::fragment& page:: + logo () + { + return this->logo_; + } + + inline void page:: + logo (const web::xhtml::fragment& x) + { + this->logo_ = x; + } + + inline bool page:: + logo_specified () const + { + return this->logo_specified_; + } + + inline void page:: + logo_specified (bool x) + { + this->logo_specified_ = x; + } + + inline const vector<page_menu>& page:: + menu () const + { + return this->menu_; + } + + inline vector<page_menu>& page:: + menu () + { + return this->menu_; + } + + inline void page:: + menu (const vector<page_menu>& x) + { + this->menu_ = x; + } + + inline bool page:: + menu_specified () const + { + return this->menu_specified_; + } + + inline void page:: + menu_specified (bool x) + { + this->menu_specified_ = x; + } + + // search + // + + inline const uint16_t& search:: + search_page_entries () const + { + return this->search_page_entries_; + } + + inline uint16_t& search:: + search_page_entries () + { + return this->search_page_entries_; + } + + inline void search:: + search_page_entries (const uint16_t& x) + { + this->search_page_entries_ = x; + } + + inline bool search:: + search_page_entries_specified () const + { + return this->search_page_entries_specified_; + } + + inline void search:: + search_page_entries_specified (bool x) + { + this->search_page_entries_specified_ = x; + } + + inline const uint16_t& search:: + search_pages () const + { + return this->search_pages_; + } + + inline uint16_t& search:: + search_pages () + { + return this->search_pages_; + } + + inline void search:: + search_pages (const uint16_t& x) + { + this->search_pages_ = x; + } + + inline bool search:: + search_pages_specified () const + { + return this->search_pages_specified_; + } + + inline void search:: + search_pages_specified (bool x) + { + this->search_pages_specified_ = x; + } + + // package + // + + inline const uint16_t& package:: + package_description () const + { + return this->package_description_; + } + + inline uint16_t& package:: + package_description () + { + return this->package_description_; + } + + inline void package:: + package_description (const uint16_t& x) + { + this->package_description_ = x; + } + + inline bool package:: + package_description_specified () const + { + return this->package_description_specified_; + } + + inline void package:: + package_description_specified (bool x) + { + this->package_description_specified_ = x; + } + + inline const uint16_t& package:: + package_changes () const + { + return this->package_changes_; + } + + inline uint16_t& package:: + package_changes () + { + return this->package_changes_; + } + + inline void package:: + package_changes (const uint16_t& x) + { + this->package_changes_ = x; + } + + inline bool package:: + package_changes_specified () const + { + return this->package_changes_specified_; + } + + inline void package:: + package_changes_specified (bool x) + { + this->package_changes_specified_ = x; + } + + // packages + // + + inline const string& packages:: + search_title () const + { + return this->search_title_; + } + + inline string& packages:: + search_title () + { + return this->search_title_; + } + + inline void packages:: + search_title (const string& x) + { + this->search_title_ = x; + } + + inline bool packages:: + search_title_specified () const + { + return this->search_title_specified_; + } + + inline void packages:: + search_title_specified (bool x) + { + this->search_title_specified_ = x; + } + + inline const web::xhtml::fragment& packages:: + search_description () const + { + return this->search_description_; + } + + inline web::xhtml::fragment& packages:: + search_description () + { + return this->search_description_; + } + + inline void packages:: + search_description (const web::xhtml::fragment& x) + { + this->search_description_ = x; + } + + inline bool packages:: + search_description_specified () const + { + return this->search_description_specified_; + } + + inline void packages:: + search_description_specified (bool x) + { + this->search_description_specified_ = x; + } + + // package_details + // + + // package_version_details + // + + inline const dir_path& package_version_details:: + bindist_root () const + { + return this->bindist_root_; + } + + inline dir_path& package_version_details:: + bindist_root () + { + return this->bindist_root_; + } + + inline void package_version_details:: + bindist_root (const dir_path& x) + { + this->bindist_root_ = x; + } + + inline bool package_version_details:: + bindist_root_specified () const + { + return this->bindist_root_specified_; + } + + inline void package_version_details:: + bindist_root_specified (bool x) + { + this->bindist_root_specified_ = x; + } + + inline const string& package_version_details:: + bindist_url () const + { + return this->bindist_url_; + } + + inline string& package_version_details:: + bindist_url () + { + return this->bindist_url_; + } + + inline void package_version_details:: + bindist_url (const string& x) + { + this->bindist_url_ = x; + } + + inline bool package_version_details:: + bindist_url_specified () const + { + return this->bindist_url_specified_; + } + + inline void package_version_details:: + bindist_url_specified (bool x) + { + this->bindist_url_specified_ = x; + } + + // repository_details + // + + // build_task + // + + inline const size_t& build_task:: + build_task_request_max_size () const + { + return this->build_task_request_max_size_; + } + + inline size_t& build_task:: + build_task_request_max_size () + { + return this->build_task_request_max_size_; + } + + inline void build_task:: + build_task_request_max_size (const size_t& x) + { + this->build_task_request_max_size_ = x; + } + + inline bool build_task:: + build_task_request_max_size_specified () const + { + return this->build_task_request_max_size_specified_; + } + + inline void build_task:: + build_task_request_max_size_specified (bool x) + { + this->build_task_request_max_size_specified_ = x; + } + + inline const size_t& build_task:: + build_result_timeout () const + { + return this->build_result_timeout_; + } + + inline size_t& build_task:: + build_result_timeout () + { + return this->build_result_timeout_; + } + + inline void build_task:: + build_result_timeout (const size_t& x) + { + this->build_result_timeout_ = x; + } + + inline bool build_task:: + build_result_timeout_specified () const + { + return this->build_result_timeout_specified_; + } + + inline void build_task:: + build_result_timeout_specified (bool x) + { + this->build_result_timeout_specified_ = x; + } + + inline const vector<pair<std::regex, string>>& build_task:: + build_interactive_login () const + { + return this->build_interactive_login_; + } + + inline vector<pair<std::regex, string>>& build_task:: + build_interactive_login () + { + return this->build_interactive_login_; + } + + inline void build_task:: + build_interactive_login (const vector<pair<std::regex, string>>& x) + { + this->build_interactive_login_ = x; + } + + inline bool build_task:: + build_interactive_login_specified () const + { + return this->build_interactive_login_specified_; + } + + inline void build_task:: + build_interactive_login_specified (bool x) + { + this->build_interactive_login_specified_ = x; + } + + inline const build_order& build_task:: + build_package_order () const + { + return this->build_package_order_; + } + + inline build_order& build_task:: + build_package_order () + { + return this->build_package_order_; + } + + inline void build_task:: + build_package_order (const build_order& x) + { + this->build_package_order_ = x; + } + + inline bool build_task:: + build_package_order_specified () const + { + return this->build_package_order_specified_; + } + + inline void build_task:: + build_package_order_specified (bool x) + { + this->build_package_order_specified_ = x; + } + + // build_result + // + + inline const size_t& build_result:: + build_result_request_max_size () const + { + return this->build_result_request_max_size_; + } + + inline size_t& build_result:: + build_result_request_max_size () + { + return this->build_result_request_max_size_; + } + + inline void build_result:: + build_result_request_max_size (const size_t& x) + { + this->build_result_request_max_size_ = x; + } + + inline bool build_result:: + build_result_request_max_size_specified () const + { + return this->build_result_request_max_size_specified_; + } + + inline void build_result:: + build_result_request_max_size_specified (bool x) + { + this->build_result_request_max_size_specified_ = x; + } + + // build_log + // + + // build_force + // + + // builds + // + + inline const uint16_t& builds:: + build_page_entries () const + { + return this->build_page_entries_; + } + + inline uint16_t& builds:: + build_page_entries () + { + return this->build_page_entries_; + } + + inline void builds:: + build_page_entries (const uint16_t& x) + { + this->build_page_entries_ = x; + } + + inline bool builds:: + build_page_entries_specified () const + { + return this->build_page_entries_specified_; + } + + inline void builds:: + build_page_entries_specified (bool x) + { + this->build_page_entries_specified_ = x; + } + + inline const uint16_t& builds:: + build_pages () const + { + return this->build_pages_; + } + + inline uint16_t& builds:: + build_pages () + { + return this->build_pages_; + } + + inline void builds:: + build_pages (const uint16_t& x) + { + this->build_pages_ = x; + } + + inline bool builds:: + build_pages_specified () const + { + return this->build_pages_specified_; + } + + inline void builds:: + build_pages_specified (bool x) + { + this->build_pages_specified_ = x; + } + + // build_configs + // + + inline const uint16_t& build_configs:: + build_config_page_entries () const + { + return this->build_config_page_entries_; + } + + inline uint16_t& build_configs:: + build_config_page_entries () + { + return this->build_config_page_entries_; + } + + inline void build_configs:: + build_config_page_entries (const uint16_t& x) + { + this->build_config_page_entries_ = x; + } + + inline bool build_configs:: + build_config_page_entries_specified () const + { + return this->build_config_page_entries_specified_; + } + + inline void build_configs:: + build_config_page_entries_specified (bool x) + { + this->build_config_page_entries_specified_ = x; + } + + inline const uint16_t& build_configs:: + build_config_pages () const + { + return this->build_config_pages_; + } + + inline uint16_t& build_configs:: + build_config_pages () + { + return this->build_config_pages_; + } + + inline void build_configs:: + build_config_pages (const uint16_t& x) + { + this->build_config_pages_ = x; + } + + inline bool build_configs:: + build_config_pages_specified () const + { + return this->build_config_pages_specified_; + } + + inline void build_configs:: + build_config_pages_specified (bool x) + { + this->build_config_pages_specified_ = x; + } + + // submit + // + + inline const dir_path& submit:: + submit_data () const + { + return this->submit_data_; + } + + inline dir_path& submit:: + submit_data () + { + return this->submit_data_; + } + + inline void submit:: + submit_data (const dir_path& x) + { + this->submit_data_ = x; + } + + inline bool submit:: + submit_data_specified () const + { + return this->submit_data_specified_; + } + + inline void submit:: + submit_data_specified (bool x) + { + this->submit_data_specified_ = x; + } + + inline const dir_path& submit:: + submit_temp () const + { + return this->submit_temp_; + } + + inline dir_path& submit:: + submit_temp () + { + return this->submit_temp_; + } + + inline void submit:: + submit_temp (const dir_path& x) + { + this->submit_temp_ = x; + } + + inline bool submit:: + submit_temp_specified () const + { + return this->submit_temp_specified_; + } + + inline void submit:: + submit_temp_specified (bool x) + { + this->submit_temp_specified_ = x; + } + + inline const size_t& submit:: + submit_max_size () const + { + return this->submit_max_size_; + } + + inline size_t& submit:: + submit_max_size () + { + return this->submit_max_size_; + } + + inline void submit:: + submit_max_size (const size_t& x) + { + this->submit_max_size_ = x; + } + + inline bool submit:: + submit_max_size_specified () const + { + return this->submit_max_size_specified_; + } + + inline void submit:: + submit_max_size_specified (bool x) + { + this->submit_max_size_specified_ = x; + } + + inline const path& submit:: + submit_form () const + { + return this->submit_form_; + } + + inline path& submit:: + submit_form () + { + return this->submit_form_; + } + + inline void submit:: + submit_form (const path& x) + { + this->submit_form_ = x; + } + + inline bool submit:: + submit_form_specified () const + { + return this->submit_form_specified_; + } + + inline void submit:: + submit_form_specified (bool x) + { + this->submit_form_specified_ = x; + } + + inline const string& submit:: + submit_email () const + { + return this->submit_email_; + } + + inline string& submit:: + submit_email () + { + return this->submit_email_; + } + + inline void submit:: + submit_email (const string& x) + { + this->submit_email_ = x; + } + + inline bool submit:: + submit_email_specified () const + { + return this->submit_email_specified_; + } + + inline void submit:: + submit_email_specified (bool x) + { + this->submit_email_specified_ = x; + } + + inline const path& submit:: + submit_handler () const + { + return this->submit_handler_; + } + + inline path& submit:: + submit_handler () + { + return this->submit_handler_; + } + + inline void submit:: + submit_handler (const path& x) + { + this->submit_handler_ = x; + } + + inline bool submit:: + submit_handler_specified () const + { + return this->submit_handler_specified_; + } + + inline void submit:: + submit_handler_specified (bool x) + { + this->submit_handler_specified_ = x; + } + + inline const strings& submit:: + submit_handler_argument () const + { + return this->submit_handler_argument_; + } + + inline strings& submit:: + submit_handler_argument () + { + return this->submit_handler_argument_; + } + + inline void submit:: + submit_handler_argument (const strings& x) + { + this->submit_handler_argument_ = x; + } + + inline bool submit:: + submit_handler_argument_specified () const + { + return this->submit_handler_argument_specified_; + } + + inline void submit:: + submit_handler_argument_specified (bool x) + { + this->submit_handler_argument_specified_ = x; + } + + inline const size_t& submit:: + submit_handler_timeout () const + { + return this->submit_handler_timeout_; + } + + inline size_t& submit:: + submit_handler_timeout () + { + return this->submit_handler_timeout_; + } + + inline void submit:: + submit_handler_timeout (const size_t& x) + { + this->submit_handler_timeout_ = x; + } + + inline bool submit:: + submit_handler_timeout_specified () const + { + return this->submit_handler_timeout_specified_; + } + + inline void submit:: + submit_handler_timeout_specified (bool x) + { + this->submit_handler_timeout_specified_ = x; + } + + // ci_start + // + + inline const dir_path& ci_start:: + ci_data () const + { + return this->ci_data_; + } + + inline dir_path& ci_start:: + ci_data () + { + return this->ci_data_; + } + + inline void ci_start:: + ci_data (const dir_path& x) + { + this->ci_data_ = x; + } + + inline bool ci_start:: + ci_data_specified () const + { + return this->ci_data_specified_; + } + + inline void ci_start:: + ci_data_specified (bool x) + { + this->ci_data_specified_ = x; + } + + inline const string& ci_start:: + ci_email () const + { + return this->ci_email_; + } + + inline string& ci_start:: + ci_email () + { + return this->ci_email_; + } + + inline void ci_start:: + ci_email (const string& x) + { + this->ci_email_ = x; + } + + inline bool ci_start:: + ci_email_specified () const + { + return this->ci_email_specified_; + } + + inline void ci_start:: + ci_email_specified (bool x) + { + this->ci_email_specified_ = x; + } + + inline const path& ci_start:: + ci_handler () const + { + return this->ci_handler_; + } + + inline path& ci_start:: + ci_handler () + { + return this->ci_handler_; + } + + inline void ci_start:: + ci_handler (const path& x) + { + this->ci_handler_ = x; + } + + inline bool ci_start:: + ci_handler_specified () const + { + return this->ci_handler_specified_; + } + + inline void ci_start:: + ci_handler_specified (bool x) + { + this->ci_handler_specified_ = x; + } + + inline const strings& ci_start:: + ci_handler_argument () const + { + return this->ci_handler_argument_; + } + + inline strings& ci_start:: + ci_handler_argument () + { + return this->ci_handler_argument_; + } + + inline void ci_start:: + ci_handler_argument (const strings& x) + { + this->ci_handler_argument_ = x; + } + + inline bool ci_start:: + ci_handler_argument_specified () const + { + return this->ci_handler_argument_specified_; + } + + inline void ci_start:: + ci_handler_argument_specified (bool x) + { + this->ci_handler_argument_specified_ = x; + } + + inline const size_t& ci_start:: + ci_handler_timeout () const + { + return this->ci_handler_timeout_; + } + + inline size_t& ci_start:: + ci_handler_timeout () + { + return this->ci_handler_timeout_; + } + + inline void ci_start:: + ci_handler_timeout (const size_t& x) + { + this->ci_handler_timeout_ = x; + } + + inline bool ci_start:: + ci_handler_timeout_specified () const + { + return this->ci_handler_timeout_specified_; + } + + inline void ci_start:: + ci_handler_timeout_specified (bool x) + { + this->ci_handler_timeout_specified_ = x; + } + + // ci_cancel + // + + // ci + // + + inline const path& ci:: + ci_form () const + { + return this->ci_form_; + } + + inline path& ci:: + ci_form () + { + return this->ci_form_; + } + + inline void ci:: + ci_form (const path& x) + { + this->ci_form_ = x; + } + + inline bool ci:: + ci_form_specified () const + { + return this->ci_form_specified_; + } + + inline void ci:: + ci_form_specified (bool x) + { + this->ci_form_specified_ = x; + } + + // ci_github + // + + // upload + // + + // repository_root + // + + inline const string& repository_root:: + root_global_view () const + { + return this->root_global_view_; + } + + inline string& repository_root:: + root_global_view () + { + return this->root_global_view_; + } + + inline void repository_root:: + root_global_view (const string& x) + { + this->root_global_view_ = x; + } + + inline bool repository_root:: + root_global_view_specified () const + { + return this->root_global_view_specified_; + } + + inline void repository_root:: + root_global_view_specified (bool x) + { + this->root_global_view_specified_ = x; + } + + inline const string& repository_root:: + root_tenant_view () const + { + return this->root_tenant_view_; + } + + inline string& repository_root:: + root_tenant_view () + { + return this->root_tenant_view_; + } + + inline void repository_root:: + root_tenant_view (const string& x) + { + this->root_tenant_view_ = x; + } + + inline bool repository_root:: + root_tenant_view_specified () const + { + return this->root_tenant_view_specified_; + } + + inline void repository_root:: + root_tenant_view_specified (bool x) + { + this->root_tenant_view_specified_ = x; + } + } + + namespace params + { + // packages + // + + inline const uint16_t& packages:: + page () const + { + return this->page_; + } + + inline uint16_t& packages:: + page () + { + return this->page_; + } + + inline void packages:: + page (const uint16_t& x) + { + this->page_ = x; + } + + inline bool packages:: + page_specified () const + { + return this->page_specified_; + } + + inline void packages:: + page_specified (bool x) + { + this->page_specified_ = x; + } + + inline const string& packages:: + q () const + { + return this->q_; + } + + inline string& packages:: + q () + { + return this->q_; + } + + inline void packages:: + q (const string& x) + { + this->q_ = x; + } + + inline bool packages:: + q_specified () const + { + return this->q_specified_; + } + + inline void packages:: + q_specified (bool x) + { + this->q_specified_ = x; + } + + // package_details + // + + inline const uint16_t& package_details:: + page () const + { + return this->page_; + } + + inline uint16_t& package_details:: + page () + { + return this->page_; + } + + inline void package_details:: + page (const uint16_t& x) + { + this->page_ = x; + } + + inline bool package_details:: + page_specified () const + { + return this->page_specified_; + } + + inline void package_details:: + page_specified (bool x) + { + this->page_specified_ = x; + } + + inline const string& package_details:: + query () const + { + return this->query_; + } + + inline string& package_details:: + query () + { + return this->query_; + } + + inline void package_details:: + query (const string& x) + { + this->query_ = x; + } + + inline bool package_details:: + query_specified () const + { + return this->query_specified_; + } + + inline void package_details:: + query_specified (bool x) + { + this->query_specified_ = x; + } + + inline const page_form& package_details:: + form () const + { + return this->form_; + } + + inline page_form& package_details:: + form () + { + return this->form_; + } + + inline void package_details:: + form (const page_form& x) + { + this->form_ = x; + } + + inline bool package_details:: + form_specified () const + { + return this->form_specified_; + } + + inline void package_details:: + form_specified (bool x) + { + this->form_specified_ = x; + } + + // package_version_details + // + + inline const page_form& package_version_details:: + form () const + { + return this->form_; + } + + inline page_form& package_version_details:: + form () + { + return this->form_; + } + + inline void package_version_details:: + form (const page_form& x) + { + this->form_ = x; + } + + inline bool package_version_details:: + form_specified () const + { + return this->form_specified_; + } + + inline void package_version_details:: + form_specified (bool x) + { + this->form_specified_ = x; + } + + // repository_details + // + + // build_task + // + + inline const vector<string>& build_task:: + repository () const + { + return this->repository_; + } + + inline vector<string>& build_task:: + repository () + { + return this->repository_; + } + + inline void build_task:: + repository (const vector<string>& x) + { + this->repository_ = x; + } + + inline bool build_task:: + repository_specified () const + { + return this->repository_specified_; + } + + inline void build_task:: + repository_specified (bool x) + { + this->repository_specified_ = x; + } + + inline const bbot::interactive_mode& build_task:: + interactive () const + { + return this->interactive_; + } + + inline bbot::interactive_mode& build_task:: + interactive () + { + return this->interactive_; + } + + inline void build_task:: + interactive (const bbot::interactive_mode& x) + { + this->interactive_ = x; + } + + inline bool build_task:: + interactive_specified () const + { + return this->interactive_specified_; + } + + inline void build_task:: + interactive_specified (bool x) + { + this->interactive_specified_ = x; + } + + // build_result + // + + // build_log + // + + // build_force + // + + inline const string& build_force:: + package () const + { + return this->package_; + } + + inline string& build_force:: + package () + { + return this->package_; + } + + inline void build_force:: + package (const string& x) + { + this->package_ = x; + } + + inline bool build_force:: + package_specified () const + { + return this->package_specified_; + } + + inline void build_force:: + package_specified (bool x) + { + this->package_specified_ = x; + } + + inline const string& build_force:: + version () const + { + return this->version_; + } + + inline string& build_force:: + version () + { + return this->version_; + } + + inline void build_force:: + version (const string& x) + { + this->version_ = x; + } + + inline bool build_force:: + version_specified () const + { + return this->version_specified_; + } + + inline void build_force:: + version_specified (bool x) + { + this->version_specified_ = x; + } + + inline const string& build_force:: + target () const + { + return this->target_; + } + + inline string& build_force:: + target () + { + return this->target_; + } + + inline void build_force:: + target (const string& x) + { + this->target_ = x; + } + + inline bool build_force:: + target_specified () const + { + return this->target_specified_; + } + + inline void build_force:: + target_specified (bool x) + { + this->target_specified_ = x; + } + + inline const string& build_force:: + target_config () const + { + return this->target_config_; + } + + inline string& build_force:: + target_config () + { + return this->target_config_; + } + + inline void build_force:: + target_config (const string& x) + { + this->target_config_ = x; + } + + inline bool build_force:: + target_config_specified () const + { + return this->target_config_specified_; + } + + inline void build_force:: + target_config_specified (bool x) + { + this->target_config_specified_ = x; + } + + inline const string& build_force:: + package_config () const + { + return this->package_config_; + } + + inline string& build_force:: + package_config () + { + return this->package_config_; + } + + inline void build_force:: + package_config (const string& x) + { + this->package_config_ = x; + } + + inline bool build_force:: + package_config_specified () const + { + return this->package_config_specified_; + } + + inline void build_force:: + package_config_specified (bool x) + { + this->package_config_specified_ = x; + } + + inline const string& build_force:: + toolchain_name () const + { + return this->toolchain_name_; + } + + inline string& build_force:: + toolchain_name () + { + return this->toolchain_name_; + } + + inline void build_force:: + toolchain_name (const string& x) + { + this->toolchain_name_ = x; + } + + inline bool build_force:: + toolchain_name_specified () const + { + return this->toolchain_name_specified_; + } + + inline void build_force:: + toolchain_name_specified (bool x) + { + this->toolchain_name_specified_ = x; + } + + inline const string& build_force:: + toolchain_version () const + { + return this->toolchain_version_; + } + + inline string& build_force:: + toolchain_version () + { + return this->toolchain_version_; + } + + inline void build_force:: + toolchain_version (const string& x) + { + this->toolchain_version_ = x; + } + + inline bool build_force:: + toolchain_version_specified () const + { + return this->toolchain_version_specified_; + } + + inline void build_force:: + toolchain_version_specified (bool x) + { + this->toolchain_version_specified_ = x; + } + + inline const string& build_force:: + reason () const + { + return this->reason_; + } + + inline string& build_force:: + reason () + { + return this->reason_; + } + + inline void build_force:: + reason (const string& x) + { + this->reason_ = x; + } + + inline bool build_force:: + reason_specified () const + { + return this->reason_specified_; + } + + inline void build_force:: + reason_specified (bool x) + { + this->reason_specified_ = x; + } + + // builds + // + + inline const uint16_t& builds:: + page () const + { + return this->page_; + } + + inline uint16_t& builds:: + page () + { + return this->page_; + } + + inline void builds:: + page (const uint16_t& x) + { + this->page_ = x; + } + + inline bool builds:: + page_specified () const + { + return this->page_specified_; + } + + inline void builds:: + page_specified (bool x) + { + this->page_specified_ = x; + } + + inline const string& builds:: + name () const + { + return this->name_; + } + + inline string& builds:: + name () + { + return this->name_; + } + + inline void builds:: + name (const string& x) + { + this->name_ = x; + } + + inline bool builds:: + name_specified () const + { + return this->name_specified_; + } + + inline void builds:: + name_specified (bool x) + { + this->name_specified_ = x; + } + + inline const string& builds:: + version () const + { + return this->version_; + } + + inline string& builds:: + version () + { + return this->version_; + } + + inline void builds:: + version (const string& x) + { + this->version_ = x; + } + + inline bool builds:: + version_specified () const + { + return this->version_specified_; + } + + inline void builds:: + version_specified (bool x) + { + this->version_specified_ = x; + } + + inline const string& builds:: + toolchain () const + { + return this->toolchain_; + } + + inline string& builds:: + toolchain () + { + return this->toolchain_; + } + + inline void builds:: + toolchain (const string& x) + { + this->toolchain_ = x; + } + + inline bool builds:: + toolchain_specified () const + { + return this->toolchain_specified_; + } + + inline void builds:: + toolchain_specified (bool x) + { + this->toolchain_specified_ = x; + } + + inline const string& builds:: + target () const + { + return this->target_; + } + + inline string& builds:: + target () + { + return this->target_; + } + + inline void builds:: + target (const string& x) + { + this->target_ = x; + } + + inline bool builds:: + target_specified () const + { + return this->target_specified_; + } + + inline void builds:: + target_specified (bool x) + { + this->target_specified_ = x; + } + + inline const string& builds:: + target_config () const + { + return this->target_config_; + } + + inline string& builds:: + target_config () + { + return this->target_config_; + } + + inline void builds:: + target_config (const string& x) + { + this->target_config_ = x; + } + + inline bool builds:: + target_config_specified () const + { + return this->target_config_specified_; + } + + inline void builds:: + target_config_specified (bool x) + { + this->target_config_specified_ = x; + } + + inline const string& builds:: + package_config () const + { + return this->package_config_; + } + + inline string& builds:: + package_config () + { + return this->package_config_; + } + + inline void builds:: + package_config (const string& x) + { + this->package_config_ = x; + } + + inline bool builds:: + package_config_specified () const + { + return this->package_config_specified_; + } + + inline void builds:: + package_config_specified (bool x) + { + this->package_config_specified_ = x; + } + + inline const string& builds:: + result () const + { + return this->result_; + } + + inline string& builds:: + result () + { + return this->result_; + } + + inline void builds:: + result (const string& x) + { + this->result_ = x; + } + + inline bool builds:: + result_specified () const + { + return this->result_specified_; + } + + inline void builds:: + result_specified (bool x) + { + this->result_specified_ = x; + } + + // build_configs + // + + inline const string& build_configs:: + class_name () const + { + return this->class_name_; + } + + inline string& build_configs:: + class_name () + { + return this->class_name_; + } + + inline void build_configs:: + class_name (const string& x) + { + this->class_name_ = x; + } + + inline bool build_configs:: + class_name_specified () const + { + return this->class_name_specified_; + } + + inline void build_configs:: + class_name_specified (bool x) + { + this->class_name_specified_ = x; + } + + inline const uint16_t& build_configs:: + page () const + { + return this->page_; + } + + inline uint16_t& build_configs:: + page () + { + return this->page_; + } + + inline void build_configs:: + page (const uint16_t& x) + { + this->page_ = x; + } + + inline bool build_configs:: + page_specified () const + { + return this->page_specified_; + } + + inline void build_configs:: + page_specified (bool x) + { + this->page_specified_ = x; + } + + // submit + // + + inline const string& submit:: + archive () const + { + return this->archive_; + } + + inline string& submit:: + archive () + { + return this->archive_; + } + + inline void submit:: + archive (const string& x) + { + this->archive_ = x; + } + + inline bool submit:: + archive_specified () const + { + return this->archive_specified_; + } + + inline void submit:: + archive_specified (bool x) + { + this->archive_specified_ = x; + } + + inline const string& submit:: + sha256sum () const + { + return this->sha256sum_; + } + + inline string& submit:: + sha256sum () + { + return this->sha256sum_; + } + + inline void submit:: + sha256sum (const string& x) + { + this->sha256sum_ = x; + } + + inline bool submit:: + sha256sum_specified () const + { + return this->sha256sum_specified_; + } + + inline void submit:: + sha256sum_specified (bool x) + { + this->sha256sum_specified_ = x; + } + + inline const string& submit:: + simulate () const + { + return this->simulate_; + } + + inline string& submit:: + simulate () + { + return this->simulate_; + } + + inline void submit:: + simulate (const string& x) + { + this->simulate_ = x; + } + + inline bool submit:: + simulate_specified () const + { + return this->simulate_specified_; + } + + inline void submit:: + simulate_specified (bool x) + { + this->simulate_specified_ = x; + } + + // ci + // + + inline const bpkg::repository_location& ci:: + repository () const + { + return this->repository_; + } + + inline bpkg::repository_location& ci:: + repository () + { + return this->repository_; + } + + inline void ci:: + repository (const bpkg::repository_location& x) + { + this->repository_ = x; + } + + inline bool ci:: + repository_specified () const + { + return this->repository_specified_; + } + + inline void ci:: + repository_specified (bool x) + { + this->repository_specified_ = x; + } + + inline const strings& ci:: + package () const + { + return this->package_; + } + + inline strings& ci:: + package () + { + return this->package_; + } + + inline void ci:: + package (const strings& x) + { + this->package_ = x; + } + + inline bool ci:: + package_specified () const + { + return this->package_specified_; + } + + inline void ci:: + package_specified (bool x) + { + this->package_specified_ = x; + } + + inline const string& ci:: + overrides () const + { + return this->overrides_; + } + + inline string& ci:: + overrides () + { + return this->overrides_; + } + + inline void ci:: + overrides (const string& x) + { + this->overrides_ = x; + } + + inline bool ci:: + overrides_specified () const + { + return this->overrides_specified_; + } + + inline void ci:: + overrides_specified (bool x) + { + this->overrides_specified_ = x; + } + + inline const string& ci:: + interactive () const + { + return this->interactive_; + } + + inline string& ci:: + interactive () + { + return this->interactive_; + } + + inline void ci:: + interactive (const string& x) + { + this->interactive_ = x; + } + + inline bool ci:: + interactive_specified () const + { + return this->interactive_specified_; + } + + inline void ci:: + interactive_specified (bool x) + { + this->interactive_specified_ = x; + } + + inline const string& ci:: + simulate () const + { + return this->simulate_; + } + + inline string& ci:: + simulate () + { + return this->simulate_; + } + + inline void ci:: + simulate (const string& x) + { + this->simulate_ = x; + } + + inline bool ci:: + simulate_specified () const + { + return this->simulate_specified_; + } + + inline void ci:: + simulate_specified (bool x) + { + this->simulate_specified_ = x; + } + + // upload + // + + inline const string& upload:: + type () const + { + return this->type_; + } + + inline string& upload:: + type () + { + return this->type_; + } + + inline void upload:: + type (const string& x) + { + this->type_ = x; + } + + inline bool upload:: + type_specified () const + { + return this->type_specified_; + } + + inline void upload:: + type_specified (bool x) + { + this->type_specified_ = x; + } + + inline const string& upload:: + session () const + { + return this->session_; + } + + inline string& upload:: + session () + { + return this->session_; + } + + inline void upload:: + session (const string& x) + { + this->session_ = x; + } + + inline bool upload:: + session_specified () const + { + return this->session_specified_; + } + + inline void upload:: + session_specified (bool x) + { + this->session_specified_ = x; + } + + inline const string& upload:: + challenge () const + { + return this->challenge_; + } + + inline string& upload:: + challenge () + { + return this->challenge_; + } + + inline void upload:: + challenge (const string& x) + { + this->challenge_ = x; + } + + inline bool upload:: + challenge_specified () const + { + return this->challenge_specified_; + } + + inline void upload:: + challenge_specified (bool x) + { + this->challenge_specified_ = x; + } + + inline const string& upload:: + instance () const + { + return this->instance_; + } + + inline string& upload:: + instance () + { + return this->instance_; + } + + inline void upload:: + instance (const string& x) + { + this->instance_ = x; + } + + inline bool upload:: + instance_specified () const + { + return this->instance_specified_; + } + + inline void upload:: + instance_specified (bool x) + { + this->instance_specified_ = x; + } + + inline const string& upload:: + archive () const + { + return this->archive_; + } + + inline string& upload:: + archive () + { + return this->archive_; + } + + inline void upload:: + archive (const string& x) + { + this->archive_ = x; + } + + inline bool upload:: + archive_specified () const + { + return this->archive_specified_; + } + + inline void upload:: + archive_specified (bool x) + { + this->archive_specified_ = x; + } + + inline const string& upload:: + sha256sum () const + { + return this->sha256sum_; + } + + inline string& upload:: + sha256sum () + { + return this->sha256sum_; + } + + inline void upload:: + sha256sum (const string& x) + { + this->sha256sum_ = x; + } + + inline bool upload:: + sha256sum_specified () const + { + return this->sha256sum_specified_; + } + + inline void upload:: + sha256sum_specified (bool x) + { + this->sha256sum_specified_ = x; + } + } +} + +// Begin epilogue. +// +// +// End epilogue. |