aboutsummaryrefslogtreecommitdiff
path: root/bpkg/bpkg-options.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/bpkg-options.hxx')
-rw-r--r--bpkg/bpkg-options.hxx391
1 files changed, 391 insertions, 0 deletions
diff --git a/bpkg/bpkg-options.hxx b/bpkg/bpkg-options.hxx
new file mode 100644
index 0000000..9dda684
--- /dev/null
+++ b/bpkg/bpkg-options.hxx
@@ -0,0 +1,391 @@
+// -*- C++ -*-
+//
+// This file was generated by CLI, a command line interface
+// compiler for C++.
+//
+
+#ifndef BPKG_BPKG_OPTIONS_HXX
+#define BPKG_BPKG_OPTIONS_HXX
+
+// Begin prologue.
+//
+//
+// End prologue.
+
+#include <bpkg/common-options.hxx>
+
+namespace bpkg
+{
+ class commands
+ {
+ public:
+ commands ();
+
+ // Return true if anything has been parsed.
+ //
+ bool
+ parse (int& argc,
+ char** argv,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int start,
+ int& argc,
+ char** argv,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (::bpkg::cli::scanner&,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ // Merge options from the specified instance appending/overriding
+ // them as if they appeared after options in this instance.
+ //
+ void
+ merge (const commands&);
+
+ // Option accessors.
+ //
+ const bool&
+ help () const;
+
+ const bool&
+ cfg_create () const;
+
+ const bool&
+ cfg_info () const;
+
+ const bool&
+ cfg_link () const;
+
+ const bool&
+ cfg_unlink () const;
+
+ const bool&
+ rep_info () const;
+
+ const bool&
+ rep_add () const;
+
+ const bool&
+ rep_remove () const;
+
+ const bool&
+ rep_list () const;
+
+ const bool&
+ rep_fetch () const;
+
+ const bool&
+ rep_create () const;
+
+ const bool&
+ pkg_status () const;
+
+ const bool&
+ pkg_build () const;
+
+ const bool&
+ pkg_drop () const;
+
+ const bool&
+ pkg_install () const;
+
+ const bool&
+ pkg_uninstall () const;
+
+ const bool&
+ pkg_update () const;
+
+ const bool&
+ pkg_test () const;
+
+ const bool&
+ pkg_clean () const;
+
+ const bool&
+ pkg_bindist () const;
+
+ const bool&
+ pkg_verify () const;
+
+ const bool&
+ pkg_fetch () const;
+
+ const bool&
+ pkg_unpack () const;
+
+ const bool&
+ pkg_checkout () const;
+
+ const bool&
+ pkg_configure () const;
+
+ const bool&
+ pkg_disfigure () const;
+
+ const bool&
+ pkg_purge () const;
+
+ // Print usage information.
+ //
+ static ::bpkg::cli::usage_para
+ print_usage (::std::ostream&,
+ ::bpkg::cli::usage_para = ::bpkg::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ bool
+ _parse (const char*, ::bpkg::cli::scanner&);
+
+ private:
+ bool
+ _parse (::bpkg::cli::scanner&,
+ ::bpkg::cli::unknown_mode option,
+ ::bpkg::cli::unknown_mode argument);
+
+ public:
+ bool help_;
+ bool cfg_create_;
+ bool cfg_info_;
+ bool cfg_link_;
+ bool cfg_unlink_;
+ bool rep_info_;
+ bool rep_add_;
+ bool rep_remove_;
+ bool rep_list_;
+ bool rep_fetch_;
+ bool rep_create_;
+ bool pkg_status_;
+ bool pkg_build_;
+ bool pkg_drop_;
+ bool pkg_install_;
+ bool pkg_uninstall_;
+ bool pkg_update_;
+ bool pkg_test_;
+ bool pkg_clean_;
+ bool pkg_bindist_;
+ bool pkg_verify_;
+ bool pkg_fetch_;
+ bool pkg_unpack_;
+ bool pkg_checkout_;
+ bool pkg_configure_;
+ bool pkg_disfigure_;
+ bool pkg_purge_;
+ };
+
+ class topics
+ {
+ public:
+ topics ();
+
+ // Return true if anything has been parsed.
+ //
+ bool
+ parse (int& argc,
+ char** argv,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int start,
+ int& argc,
+ char** argv,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (::bpkg::cli::scanner&,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ // Merge options from the specified instance appending/overriding
+ // them as if they appeared after options in this instance.
+ //
+ void
+ merge (const topics&);
+
+ // Option accessors.
+ //
+ const bool&
+ common_options () const;
+
+ const bool&
+ default_options_files () const;
+
+ const bool&
+ repository_types () const;
+
+ const bool&
+ repository_signing () const;
+
+ const bool&
+ argument_grouping () const;
+
+ // Print usage information.
+ //
+ static ::bpkg::cli::usage_para
+ print_usage (::std::ostream&,
+ ::bpkg::cli::usage_para = ::bpkg::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ bool
+ _parse (const char*, ::bpkg::cli::scanner&);
+
+ private:
+ bool
+ _parse (::bpkg::cli::scanner&,
+ ::bpkg::cli::unknown_mode option,
+ ::bpkg::cli::unknown_mode argument);
+
+ public:
+ bool common_options_;
+ bool default_options_files_;
+ bool repository_types_;
+ bool repository_signing_;
+ bool argument_grouping_;
+ };
+
+ class options: public ::bpkg::common_options
+ {
+ public:
+ options ();
+
+ // Return true if anything has been parsed.
+ //
+ bool
+ parse (int& argc,
+ char** argv,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int start,
+ int& argc,
+ char** argv,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (int start,
+ int& argc,
+ char** argv,
+ int& end,
+ bool erase = false,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ bool
+ parse (::bpkg::cli::scanner&,
+ ::bpkg::cli::unknown_mode option = ::bpkg::cli::unknown_mode::fail,
+ ::bpkg::cli::unknown_mode argument = ::bpkg::cli::unknown_mode::stop);
+
+ // Merge options from the specified instance appending/overriding
+ // them as if they appeared after options in this instance.
+ //
+ void
+ merge (const options&);
+
+ // Option accessors.
+ //
+ const bool&
+ help () const;
+
+ const bool&
+ version () const;
+
+ // Print usage information.
+ //
+ static ::bpkg::cli::usage_para
+ print_usage (::std::ostream&,
+ ::bpkg::cli::usage_para = ::bpkg::cli::usage_para::none);
+
+ // Implementation details.
+ //
+ protected:
+ bool
+ _parse (const char*, ::bpkg::cli::scanner&);
+
+ private:
+ bool
+ _parse (::bpkg::cli::scanner&,
+ ::bpkg::cli::unknown_mode option,
+ ::bpkg::cli::unknown_mode argument);
+
+ public:
+ bool help_;
+ bool version_;
+ };
+}
+
+// Print page usage information.
+//
+namespace bpkg
+{
+ ::bpkg::cli::usage_para
+ print_bpkg_usage (::std::ostream&,
+ ::bpkg::cli::usage_para = ::bpkg::cli::usage_para::none);
+}
+
+#include <bpkg/bpkg-options.ixx>
+
+// Begin epilogue.
+//
+//
+// End epilogue.
+
+#endif // BPKG_BPKG_OPTIONS_HXX