aboutsummaryrefslogtreecommitdiff
path: root/mod/pregenerated
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pregenerated')
-rw-r--r--mod/pregenerated/mod/module-options.cxx9974
-rw-r--r--mod/pregenerated/mod/module-options.hxx4546
-rw-r--r--mod/pregenerated/mod/module-options.ixx3435
3 files changed, 17955 insertions, 0 deletions
diff --git a/mod/pregenerated/mod/module-options.cxx b/mod/pregenerated/mod/module-options.cxx
new file mode 100644
index 0000000..33daa91
--- /dev/null
+++ b/mod/pregenerated/mod/module-options.cxx
@@ -0,0 +1,9974 @@
+// -*- 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 () throw ()
+ {
+ }
+
+ void unknown_option::
+ print (::std::ostream& os) const
+ {
+ os << "unknown option '" << option ().c_str () << "'";
+ }
+
+ const char* unknown_option::
+ what () const throw ()
+ {
+ return "unknown option";
+ }
+
+ // unknown_argument
+ //
+ unknown_argument::
+ ~unknown_argument () throw ()
+ {
+ }
+
+ void unknown_argument::
+ print (::std::ostream& os) const
+ {
+ os << "unknown argument '" << argument ().c_str () << "'";
+ }
+
+ const char* unknown_argument::
+ what () const throw ()
+ {
+ return "unknown argument";
+ }
+
+ // missing_value
+ //
+ missing_value::
+ ~missing_value () throw ()
+ {
+ }
+
+ void missing_value::
+ print (::std::ostream& os) const
+ {
+ os << "missing value for option '" << option ().c_str () << "'";
+ }
+
+ const char* missing_value::
+ what () const throw ()
+ {
+ return "missing option value";
+ }
+
+ // invalid_value
+ //
+ invalid_value::
+ ~invalid_value () throw ()
+ {
+ }
+
+ 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 throw ()
+ {
+ return "invalid option value";
+ }
+
+ // eos_reached
+ //
+ void eos_reached::
+ print (::std::ostream& os) const
+ {
+ os << what ();
+ }
+
+ const char* eos_reached::
+ what () const throw ()
+ {
+ return "end of argument stream reached";
+ }
+
+ // file_io_failure
+ //
+ file_io_failure::
+ ~file_io_failure () throw ()
+ {
+ }
+
+ 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 throw ()
+ {
+ return "unable to open file or read failure";
+ }
+
+ // unmatched_quote
+ //
+ unmatched_quote::
+ ~unmatched_quote () throw ()
+ {
+ }
+
+ void unmatched_quote::
+ print (::std::ostream& os) const
+ {
+ os << "unmatched quote in argument '" << argument ().c_str () << "'";
+ }
+
+ const char* unmatched_quote::
+ what () const throw ()
+ {
+ 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 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
+ {
+ // handler
+ //
+
+ handler::
+ handler ()
+ : email_ (),
+ email_specified_ (false),
+ host_ (),
+ host_specified_ (false),
+ root_ ("/"),
+ root_specified_ (false),
+ 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)
+ : email_ (),
+ email_specified_ (false),
+ host_ (),
+ host_specified_ (false),
+ root_ ("/"),
+ root_specified_ (false),
+ 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)
+ : email_ (),
+ email_specified_ (false),
+ host_ (),
+ host_specified_ (false),
+ root_ ("/"),
+ root_specified_ (false),
+ 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)
+ : email_ (),
+ email_specified_ (false),
+ host_ (),
+ host_specified_ (false),
+ root_ ("/"),
+ root_specified_ (false),
+ 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)
+ : email_ (),
+ email_specified_ (false),
+ host_ (),
+ host_specified_ (false),
+ root_ ("/"),
+ root_specified_ (false),
+ 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)
+ : email_ (),
+ email_specified_ (false),
+ host_ (),
+ host_specified_ (false),
+ root_ ("/"),
+ root_specified_ (false),
+ 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 << "email <email> Repository email." << ::std::endl;
+
+ os << "host <host> Repository host." << ::std::endl;
+
+ os << "root <path> Repository root." << ::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)
+ {
+ // email
+ //
+ {
+ ::brep::cli::option_names a;
+ std::string dv;
+ ::brep::cli::option o ("email", a, false, dv);
+ os.push_back (o);
+ }
+
+ // 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);
+ }
+
+ // 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_["email"] =
+ &::brep::cli::thunk< handler, string, &handler::email_,
+ &handler::email_specified_ >;
+ _cli_handler_map_["host"] =
+ &::brep::cli::thunk< handler, string, &handler::host_,
+ &handler::host_specified_ >;
+ _cli_handler_map_["root"] =
+ &::brep::cli::thunk< handler, dir_path, &handler::root_,
+ &handler::root_specified_ >;
+ _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::
+ 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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ _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;
+
+ 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);
+ }
+ }
+
+ 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_ >;
+ }
+ };
+
+ 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;
+ }
+
+ // 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)
+ {
+ }
+
+ 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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ _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);
+
+ // 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;
+
+ 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);
+
+ // 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);
+ }
+ }
+
+ 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_ >;
+ }
+ };
+
+ 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;
+
+ // 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);
+
+ // 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);
+
+ // 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);
+
+ // search base
+ //
+ ::brep::options::search::fill (os);
+
+ // package_db base
+ //
+ ::brep::options::package_db::fill (os);
+
+ // page base
+ //
+ ::brep::options::page::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;
+
+ // 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;
+
+ // 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 ()
+ {
+ }
+
+ package_version_details::
+ package_version_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_version_details::
+ package_version_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_version_details::
+ package_version_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_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)
+ {
+ ::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)
+ {
+ _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);
+
+ // handler base
+ //
+ p = ::brep::options::handler::print_usage (os, p);
+
+ 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);
+
+ // handler base
+ //
+ ::brep::options::handler::fill (os);
+ }
+
+ 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 ()
+ {
+ }
+ };
+
+ 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;
+
+ // 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);
+
+ // 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);
+
+ // 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;
+
+ // 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_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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ _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);
+
+ // 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;
+
+ 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);
+
+ // 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);
+ }
+ }
+
+ 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_ >;
+ }
+ };
+
+ 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;
+
+ // 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_ (10240000),
+ build_result_request_max_size_specified_ (false),
+ build_toolchain_email_ (),
+ build_toolchain_email_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_ (10240000),
+ build_result_request_max_size_specified_ (false),
+ build_toolchain_email_ (),
+ build_toolchain_email_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_ (10240000),
+ build_result_request_max_size_specified_ (false),
+ build_toolchain_email_ (),
+ build_toolchain_email_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_ (10240000),
+ build_result_request_max_size_specified_ (false),
+ build_toolchain_email_ (),
+ build_toolchain_email_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_ (10240000),
+ build_result_request_max_size_specified_ (false),
+ 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_result::
+ build_result (::brep::cli::scanner& s,
+ ::brep::cli::unknown_mode opt,
+ ::brep::cli::unknown_mode arg)
+ : build_result_request_max_size_ (10240000),
+ build_result_request_max_size_specified_ (false),
+ build_toolchain_email_ (),
+ build_toolchain_email_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);
+
+ // package_db base
+ //
+ p = ::brep::options::package_db::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);
+
+ 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;
+
+ os << "build-toolchain-email <name>=<bool> Enable or disable package build" << ::std::endl
+ << " notification emails." << ::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);
+
+ // package_db base
+ //
+ ::brep::options::package_db::fill (os);
+
+ // build_db base
+ //
+ ::brep::options::build_db::fill (os);
+
+ // handler base
+ //
+ ::brep::options::handler::fill (os);
+
+ // build-result-request-max-size
+ //
+ {
+ ::brep::cli::option_names a;
+ std::string dv ("10240000");
+ ::brep::cli::option o ("build-result-request-max-size", a, false, dv);
+ os.push_back (o);
+ }
+
+ // 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_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_ >;
+ _cli_build_result_map_["build-toolchain-email"] =
+ &::brep::cli::thunk< build_result, std::map<string, bool>, &build_result::build_toolchain_email_,
+ &build_result::build_toolchain_email_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;
+
+ // package_db base
+ //
+ if (::brep::options::package_db::_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_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);
+
+ // 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);
+
+ // 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;
+
+ // 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);
+
+ // 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);
+
+ // 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;
+
+ // 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);
+
+ // 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);
+
+ // 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;
+
+ // 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);
+
+ // 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);
+
+ // 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;
+
+ // 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
+ //
+
+ ci::
+ ci ()
+ : ci_data_ (),
+ ci_data_specified_ (false),
+ ci_form_ (),
+ ci_form_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::
+ ci (int& argc,
+ char** argv,
+ bool erase,
+ ::brep::cli::unknown_mode opt,
+ ::brep::cli::unknown_mode arg)
+ : ci_data_ (),
+ ci_data_specified_ (false),
+ ci_form_ (),
+ ci_form_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::
+ ci (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_form_ (),
+ ci_form_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::
+ ci (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_form_ (),
+ ci_form_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::
+ ci (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_form_ (),
+ ci_form_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::
+ ci (::brep::cli::scanner& s,
+ ::brep::cli::unknown_mode opt,
+ ::brep::cli::unknown_mode arg)
+ : ci_data_ (),
+ ci_data_specified_ (false),
+ ci_form_ (),
+ ci_form_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::
+ print_usage (::std::ostream& os, ::brep::cli::usage_para p)
+ {
+ CLI_POTENTIALLY_UNUSED (os);
+
+ // page base
+ //
+ p = ::brep::options::page::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-data <dir> The directory to save CI request" << ::std::endl
+ << " data to." << ::std::endl;
+
+ os << "ci-form <file> The package CI form fragment." << ::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_desc_type: ::brep::cli::options
+ {
+ _cli_ci_desc_type ()
+ {
+ ::brep::options::ci::fill (*this);
+ }
+ };
+
+ void ci::
+ fill (::brep::cli::options& os)
+ {
+ // page base
+ //
+ ::brep::options::page::fill (os);
+
+ // handler base
+ //
+ ::brep::options::handler::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-form
+ //
+ {
+ ::brep::cli::option_names a;
+ std::string dv;
+ ::brep::cli::option o ("ci-form", 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::
+ 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-data"] =
+ &::brep::cli::thunk< ci, dir_path, &ci::ci_data_,
+ &ci::ci_data_specified_ >;
+ _cli_ci_map_["ci-form"] =
+ &::brep::cli::thunk< ci, path, &ci::ci_form_,
+ &ci::ci_form_specified_ >;
+ _cli_ci_map_["ci-email"] =
+ &::brep::cli::thunk< ci, string, &ci::ci_email_,
+ &ci::ci_email_specified_ >;
+ _cli_ci_map_["ci-handler"] =
+ &::brep::cli::thunk< ci, path, &ci::ci_handler_,
+ &ci::ci_handler_specified_ >;
+ _cli_ci_map_["ci-handler-argument"] =
+ &::brep::cli::thunk< ci, strings, &ci::ci_handler_argument_,
+ &ci::ci_handler_argument_specified_ >;
+ _cli_ci_map_["ci-handler-timeout"] =
+ &::brep::cli::thunk< ci, size_t, &ci::ci_handler_timeout_,
+ &ci::ci_handler_timeout_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;
+ }
+
+ // page base
+ //
+ if (::brep::options::page::_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;
+ }
+
+ // 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);
+
+ // 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)
+ {
+ // 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;
+ }
+
+ // 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)
+ {
+ }
+
+ build_task::
+ build_task (int& argc,
+ char** argv,
+ bool erase,
+ ::brep::cli::unknown_mode opt,
+ ::brep::cli::unknown_mode arg)
+ : repository_ (),
+ repository_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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ ::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)
+ {
+ _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;
+
+ 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);
+ }
+ }
+
+ 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_ >;
+ }
+ };
+
+ 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),
+ configuration_ (),
+ configuration_specified_ (false),
+ target_ (),
+ target_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),
+ configuration_ (),
+ configuration_specified_ (false),
+ target_ (),
+ target_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),
+ configuration_ (),
+ configuration_specified_ (false),
+ target_ (),
+ target_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),
+ configuration_ (),
+ configuration_specified_ (false),
+ target_ (),
+ target_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),
+ configuration_ (),
+ configuration_specified_ (false),
+ target_ (),
+ target_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),
+ configuration_ (),
+ configuration_specified_ (false),
+ target_ (),
+ target_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 << "configuration|cf <arg>" << std::endl;
+
+ os << "target|tg <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);
+ }
+
+ // configuration
+ //
+ {
+ ::brep::cli::option_names a;
+ a.push_back ("cf");
+ std::string dv;
+ ::brep::cli::option o ("configuration", 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);
+ }
+
+ // 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_["configuration"] =
+ &::brep::cli::thunk< build_force, string, &build_force::configuration_,
+ &build_force::configuration_specified_ >;
+ _cli_build_force_map_["cf"] =
+ &::brep::cli::thunk< build_force, string, &build_force::configuration_,
+ &build_force::configuration_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_["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),
+ name_legacy_ (),
+ name_legacy_specified_ (false),
+ version_ (),
+ version_specified_ (false),
+ toolchain_ ("*"),
+ toolchain_specified_ (false),
+ configuration_ (),
+ configuration_specified_ (false),
+ machine_ (),
+ machine_specified_ (false),
+ target_ (),
+ target_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),
+ name_legacy_ (),
+ name_legacy_specified_ (false),
+ version_ (),
+ version_specified_ (false),
+ toolchain_ ("*"),
+ toolchain_specified_ (false),
+ configuration_ (),
+ configuration_specified_ (false),
+ machine_ (),
+ machine_specified_ (false),
+ target_ (),
+ target_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),
+ name_legacy_ (),
+ name_legacy_specified_ (false),
+ version_ (),
+ version_specified_ (false),
+ toolchain_ ("*"),
+ toolchain_specified_ (false),
+ configuration_ (),
+ configuration_specified_ (false),
+ machine_ (),
+ machine_specified_ (false),
+ target_ (),
+ target_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),
+ name_legacy_ (),
+ name_legacy_specified_ (false),
+ version_ (),
+ version_specified_ (false),
+ toolchain_ ("*"),
+ toolchain_specified_ (false),
+ configuration_ (),
+ configuration_specified_ (false),
+ machine_ (),
+ machine_specified_ (false),
+ target_ (),
+ target_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),
+ name_legacy_ (),
+ name_legacy_specified_ (false),
+ version_ (),
+ version_specified_ (false),
+ toolchain_ ("*"),
+ toolchain_specified_ (false),
+ configuration_ (),
+ configuration_specified_ (false),
+ machine_ (),
+ machine_specified_ (false),
+ target_ (),
+ target_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),
+ name_legacy_ (),
+ name_legacy_specified_ (false),
+ version_ (),
+ version_specified_ (false),
+ toolchain_ ("*"),
+ toolchain_specified_ (false),
+ configuration_ (),
+ configuration_specified_ (false),
+ machine_ (),
+ machine_specified_ (false),
+ target_ (),
+ target_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 << "name_legacy|pn <arg>" << std::endl;
+
+ os << "version|pv <arg>" << std::endl;
+
+ os << "toolchain|tc <arg>" << std::endl;
+
+ os << "configuration|cf <arg>" << std::endl;
+
+ os << "machine|mn <arg>" << std::endl;
+
+ os << "target|tg <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);
+ }
+
+ // name_legacy
+ //
+ {
+ ::brep::cli::option_names a;
+ a.push_back ("pn");
+ std::string dv;
+ ::brep::cli::option o ("name_legacy", 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 ("tc");
+ std::string dv ("*");
+ ::brep::cli::option o ("toolchain", a, false, dv);
+ os.push_back (o);
+ }
+
+ // configuration
+ //
+ {
+ ::brep::cli::option_names a;
+ a.push_back ("cf");
+ std::string dv;
+ ::brep::cli::option o ("configuration", a, false, dv);
+ os.push_back (o);
+ }
+
+ // machine
+ //
+ {
+ ::brep::cli::option_names a;
+ a.push_back ("mn");
+ std::string dv;
+ ::brep::cli::option o ("machine", 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);
+ }
+
+ // 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_["name_legacy"] =
+ &::brep::cli::thunk< builds, string, &builds::name_legacy_,
+ &builds::name_legacy_specified_ >;
+ _cli_builds_map_["pn"] =
+ &::brep::cli::thunk< builds, string, &builds::name_legacy_,
+ &builds::name_legacy_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_["tc"] =
+ &::brep::cli::thunk< builds, string, &builds::toolchain_,
+ &builds::toolchain_specified_ >;
+ _cli_builds_map_["configuration"] =
+ &::brep::cli::thunk< builds, string, &builds::configuration_,
+ &builds::configuration_specified_ >;
+ _cli_builds_map_["cf"] =
+ &::brep::cli::thunk< builds, string, &builds::configuration_,
+ &builds::configuration_specified_ >;
+ _cli_builds_map_["machine"] =
+ &::brep::cli::thunk< builds, string, &builds::machine_,
+ &builds::machine_specified_ >;
+ _cli_builds_map_["mn"] =
+ &::brep::cli::thunk< builds, string, &builds::machine_,
+ &builds::machine_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_["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_ ("all"),
+ 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_ ("all"),
+ 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_ ("all"),
+ 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_ ("all"),
+ 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_ ("all"),
+ 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_ ("all"),
+ 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 ("all");
+ ::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;
+ }
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
diff --git a/mod/pregenerated/mod/module-options.hxx b/mod/pregenerated/mod/module-options.hxx
new file mode 100644
index 0000000..c206d8b
--- /dev/null
+++ b/mod/pregenerated/mod/module-options.hxx
@@ -0,0 +1,4546 @@
+// -*- 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 () throw ();
+
+ unknown_option (const std::string& option);
+
+ const std::string&
+ option () const;
+
+ virtual void
+ print (::std::ostream&) const;
+
+ virtual const char*
+ what () const throw ();
+
+ private:
+ std::string option_;
+ };
+
+ class unknown_argument: public exception
+ {
+ public:
+ virtual
+ ~unknown_argument () throw ();
+
+ unknown_argument (const std::string& argument);
+
+ const std::string&
+ argument () const;
+
+ virtual void
+ print (::std::ostream&) const;
+
+ virtual const char*
+ what () const throw ();
+
+ private:
+ std::string argument_;
+ };
+
+ class missing_value: public exception
+ {
+ public:
+ virtual
+ ~missing_value () throw ();
+
+ missing_value (const std::string& option);
+
+ const std::string&
+ option () const;
+
+ virtual void
+ print (::std::ostream&) const;
+
+ virtual const char*
+ what () const throw ();
+
+ private:
+ std::string option_;
+ };
+
+ class invalid_value: public exception
+ {
+ public:
+ virtual
+ ~invalid_value () throw ();
+
+ 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 throw ();
+
+ 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 throw ();
+ };
+
+ class file_io_failure: public exception
+ {
+ public:
+ virtual
+ ~file_io_failure () throw ();
+
+ file_io_failure (const std::string& file);
+
+ const std::string&
+ file () const;
+
+ virtual void
+ print (::std::ostream&) const;
+
+ virtual const char*
+ what () const throw ();
+
+ private:
+ std::string file_;
+ };
+
+ class unmatched_quote: public exception
+ {
+ public:
+ virtual
+ ~unmatched_quote () throw ();
+
+ unmatched_quote (const std::string& argument);
+
+ const std::string&
+ argument () const;
+
+ virtual void
+ print (::std::ostream&) const;
+
+ virtual const char*
+ what () const throw ();
+
+ 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 <web/xhtml/fragment.hxx>
+
+#include <libbrep/types.hxx>
+
+#include <mod/options-types.hxx>
+
+namespace brep
+{
+ namespace options
+ {
+ 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&
+ email () const;
+
+ string&
+ email ();
+
+ void
+ email (const string&);
+
+ bool
+ email_specified () const;
+
+ void
+ email_specified (bool);
+
+ 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);
+
+ 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 email_;
+ bool email_specified_;
+ string host_;
+ bool host_specified_;
+ dir_path root_;
+ bool root_specified_;
+ 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);
+
+ // 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_;
+ };
+
+ 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 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::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);
+
+ // 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_;
+ };
+
+ class package_details: public ::brep::options::package,
+ public ::brep::options::search,
+ public ::brep::options::package_db,
+ public ::brep::options::page,
+ 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::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.
+ //
+ // 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:
+ };
+
+ class repository_details: public ::brep::options::package_db,
+ public ::brep::options::page,
+ 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::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);
+
+ // 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_;
+ };
+
+ class build_result: public ::brep::options::build,
+ public ::brep::options::package_db,
+ public ::brep::options::build_db,
+ 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);
+
+ const std::map<string, bool>&
+ build_toolchain_email () const;
+
+ std::map<string, bool>&
+ build_toolchain_email ();
+
+ void
+ build_toolchain_email (const std::map<string, bool>&);
+
+ 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_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_;
+ std::map<string, bool> build_toolchain_email_;
+ bool build_toolchain_email_specified_;
+ };
+
+ class build_log: public ::brep::options::build,
+ public ::brep::options::build_db,
+ 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::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::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::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: public ::brep::options::page,
+ 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 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 path&
+ ci_form () const;
+
+ path&
+ ci_form ();
+
+ void
+ ci_form (const path&);
+
+ bool
+ ci_form_specified () const;
+
+ void
+ ci_form_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_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_;
+ path ci_form_;
+ bool ci_form_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 repository_root: 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);
+
+ // 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_;
+ };
+
+ 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&
+ configuration () const;
+
+ string&
+ configuration ();
+
+ void
+ configuration (const string&);
+
+ bool
+ configuration_specified () const;
+
+ void
+ configuration_specified (bool);
+
+ const string&
+ target () const;
+
+ string&
+ target ();
+
+ void
+ target (const string&);
+
+ bool
+ target_specified () const;
+
+ void
+ target_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 configuration_;
+ bool configuration_specified_;
+ string target_;
+ bool target_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&
+ name_legacy () const;
+
+ string&
+ name_legacy ();
+
+ void
+ name_legacy (const string&);
+
+ bool
+ name_legacy_specified () const;
+
+ void
+ name_legacy_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&
+ configuration () const;
+
+ string&
+ configuration ();
+
+ void
+ configuration (const string&);
+
+ bool
+ configuration_specified () const;
+
+ void
+ configuration_specified (bool);
+
+ const string&
+ machine () const;
+
+ string&
+ machine ();
+
+ void
+ machine (const string&);
+
+ bool
+ machine_specified () const;
+
+ void
+ machine_specified (bool);
+
+ const string&
+ target () const;
+
+ string&
+ target ();
+
+ void
+ target (const string&);
+
+ bool
+ target_specified () const;
+
+ void
+ target_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 name_legacy_;
+ bool name_legacy_specified_;
+ string version_;
+ bool version_specified_;
+ string toolchain_;
+ bool toolchain_specified_;
+ string configuration_;
+ bool configuration_specified_;
+ string machine_;
+ bool machine_specified_;
+ string target_;
+ bool target_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_;
+ };
+ }
+}
+
+#include <mod/module-options.ixx>
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
+#endif // MOD_MODULE_OPTIONS_HXX
diff --git a/mod/pregenerated/mod/module-options.ixx b/mod/pregenerated/mod/module-options.ixx
new file mode 100644
index 0000000..ccccd51
--- /dev/null
+++ b/mod/pregenerated/mod/module-options.ixx
@@ -0,0 +1,3435 @@
+// -*- 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
+ {
+ // handler
+ //
+
+ inline const string& handler::
+ email () const
+ {
+ return this->email_;
+ }
+
+ inline string& handler::
+ email ()
+ {
+ return this->email_;
+ }
+
+ inline void handler::
+ email (const string& x)
+ {
+ this->email_ = x;
+ }
+
+ inline bool handler::
+ email_specified () const
+ {
+ return this->email_specified_;
+ }
+
+ inline void handler::
+ email_specified (bool x)
+ {
+ this->email_specified_ = x;
+ }
+
+ inline const string& handler::
+ host () const
+ {
+ return this->host_;
+ }
+
+ inline string& handler::
+ host ()
+ {
+ return this->host_;
+ }
+
+ inline void handler::
+ host (const string& x)
+ {
+ this->host_ = x;
+ }
+
+ inline bool handler::
+ host_specified () const
+ {
+ return this->host_specified_;
+ }
+
+ inline void handler::
+ host_specified (bool x)
+ {
+ this->host_specified_ = x;
+ }
+
+ inline const dir_path& handler::
+ root () const
+ {
+ return this->root_;
+ }
+
+ inline dir_path& handler::
+ root ()
+ {
+ return this->root_;
+ }
+
+ inline void handler::
+ root (const dir_path& x)
+ {
+ this->root_ = x;
+ }
+
+ inline bool handler::
+ root_specified () const
+ {
+ return this->root_specified_;
+ }
+
+ inline void handler::
+ root_specified (bool x)
+ {
+ this->root_specified_ = x;
+ }
+
+ 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;
+ }
+
+ // 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;
+ }
+
+ // 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;
+ }
+
+ // package_details
+ //
+
+ // package_version_details
+ //
+
+ // 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;
+ }
+
+ // 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;
+ }
+
+ inline const std::map<string, bool>& build_result::
+ build_toolchain_email () const
+ {
+ return this->build_toolchain_email_;
+ }
+
+ inline std::map<string, bool>& build_result::
+ build_toolchain_email ()
+ {
+ return this->build_toolchain_email_;
+ }
+
+ inline void build_result::
+ build_toolchain_email (const std::map<string, bool>& x)
+ {
+ this->build_toolchain_email_ = x;
+ }
+
+ inline bool build_result::
+ build_toolchain_email_specified () const
+ {
+ return this->build_toolchain_email_specified_;
+ }
+
+ inline void build_result::
+ build_toolchain_email_specified (bool x)
+ {
+ this->build_toolchain_email_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
+ //
+
+ inline const dir_path& ci::
+ ci_data () const
+ {
+ return this->ci_data_;
+ }
+
+ inline dir_path& ci::
+ ci_data ()
+ {
+ return this->ci_data_;
+ }
+
+ inline void ci::
+ ci_data (const dir_path& x)
+ {
+ this->ci_data_ = x;
+ }
+
+ inline bool ci::
+ ci_data_specified () const
+ {
+ return this->ci_data_specified_;
+ }
+
+ inline void ci::
+ ci_data_specified (bool x)
+ {
+ this->ci_data_specified_ = x;
+ }
+
+ 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;
+ }
+
+ inline const string& ci::
+ ci_email () const
+ {
+ return this->ci_email_;
+ }
+
+ inline string& ci::
+ ci_email ()
+ {
+ return this->ci_email_;
+ }
+
+ inline void ci::
+ ci_email (const string& x)
+ {
+ this->ci_email_ = x;
+ }
+
+ inline bool ci::
+ ci_email_specified () const
+ {
+ return this->ci_email_specified_;
+ }
+
+ inline void ci::
+ ci_email_specified (bool x)
+ {
+ this->ci_email_specified_ = x;
+ }
+
+ inline const path& ci::
+ ci_handler () const
+ {
+ return this->ci_handler_;
+ }
+
+ inline path& ci::
+ ci_handler ()
+ {
+ return this->ci_handler_;
+ }
+
+ inline void ci::
+ ci_handler (const path& x)
+ {
+ this->ci_handler_ = x;
+ }
+
+ inline bool ci::
+ ci_handler_specified () const
+ {
+ return this->ci_handler_specified_;
+ }
+
+ inline void ci::
+ ci_handler_specified (bool x)
+ {
+ this->ci_handler_specified_ = x;
+ }
+
+ inline const strings& ci::
+ ci_handler_argument () const
+ {
+ return this->ci_handler_argument_;
+ }
+
+ inline strings& ci::
+ ci_handler_argument ()
+ {
+ return this->ci_handler_argument_;
+ }
+
+ inline void ci::
+ ci_handler_argument (const strings& x)
+ {
+ this->ci_handler_argument_ = x;
+ }
+
+ inline bool ci::
+ ci_handler_argument_specified () const
+ {
+ return this->ci_handler_argument_specified_;
+ }
+
+ inline void ci::
+ ci_handler_argument_specified (bool x)
+ {
+ this->ci_handler_argument_specified_ = x;
+ }
+
+ inline const size_t& ci::
+ ci_handler_timeout () const
+ {
+ return this->ci_handler_timeout_;
+ }
+
+ inline size_t& ci::
+ ci_handler_timeout ()
+ {
+ return this->ci_handler_timeout_;
+ }
+
+ inline void ci::
+ ci_handler_timeout (const size_t& x)
+ {
+ this->ci_handler_timeout_ = x;
+ }
+
+ inline bool ci::
+ ci_handler_timeout_specified () const
+ {
+ return this->ci_handler_timeout_specified_;
+ }
+
+ inline void ci::
+ ci_handler_timeout_specified (bool x)
+ {
+ this->ci_handler_timeout_specified_ = x;
+ }
+
+ // 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;
+ }
+
+ // 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::
+ configuration () const
+ {
+ return this->configuration_;
+ }
+
+ inline string& build_force::
+ configuration ()
+ {
+ return this->configuration_;
+ }
+
+ inline void build_force::
+ configuration (const string& x)
+ {
+ this->configuration_ = x;
+ }
+
+ inline bool build_force::
+ configuration_specified () const
+ {
+ return this->configuration_specified_;
+ }
+
+ inline void build_force::
+ configuration_specified (bool x)
+ {
+ this->configuration_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::
+ 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::
+ name_legacy () const
+ {
+ return this->name_legacy_;
+ }
+
+ inline string& builds::
+ name_legacy ()
+ {
+ return this->name_legacy_;
+ }
+
+ inline void builds::
+ name_legacy (const string& x)
+ {
+ this->name_legacy_ = x;
+ }
+
+ inline bool builds::
+ name_legacy_specified () const
+ {
+ return this->name_legacy_specified_;
+ }
+
+ inline void builds::
+ name_legacy_specified (bool x)
+ {
+ this->name_legacy_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::
+ configuration () const
+ {
+ return this->configuration_;
+ }
+
+ inline string& builds::
+ configuration ()
+ {
+ return this->configuration_;
+ }
+
+ inline void builds::
+ configuration (const string& x)
+ {
+ this->configuration_ = x;
+ }
+
+ inline bool builds::
+ configuration_specified () const
+ {
+ return this->configuration_specified_;
+ }
+
+ inline void builds::
+ configuration_specified (bool x)
+ {
+ this->configuration_specified_ = x;
+ }
+
+ inline const string& builds::
+ machine () const
+ {
+ return this->machine_;
+ }
+
+ inline string& builds::
+ machine ()
+ {
+ return this->machine_;
+ }
+
+ inline void builds::
+ machine (const string& x)
+ {
+ this->machine_ = x;
+ }
+
+ inline bool builds::
+ machine_specified () const
+ {
+ return this->machine_specified_;
+ }
+
+ inline void builds::
+ machine_specified (bool x)
+ {
+ this->machine_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::
+ 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;
+ }
+ }
+}
+
+// Begin epilogue.
+//
+//
+// End epilogue.