diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-09-04 14:00:12 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-09-04 14:00:12 +0300 |
commit | 3e807c1d02c85dc2f584eead58f80869d0c77744 (patch) | |
tree | 14bf5192fd956dbcdee54cddc78395898e98ed4a /bpkg/cfg-create-options.hxx | |
parent | 019313915d5de12d7402db57df4a38f0cf778a33 (diff) |
Make changes required for CIci
Diffstat (limited to 'bpkg/cfg-create-options.hxx')
-rw-r--r-- | bpkg/cfg-create-options.hxx | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/bpkg/cfg-create-options.hxx b/bpkg/cfg-create-options.hxx new file mode 100644 index 0000000..f47594d --- /dev/null +++ b/bpkg/cfg-create-options.hxx @@ -0,0 +1,173 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +#ifndef BPKG_CFG_CREATE_OPTIONS_HXX +#define BPKG_CFG_CREATE_OPTIONS_HXX + +// Begin prologue. +// +// +// End prologue. + +#include <bpkg/common-options.hxx> + +namespace bpkg +{ + class cfg_create_options: public ::bpkg::common_options + { + public: + cfg_create_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 cfg_create_options&); + + // Option accessors. + // + const dir_path& + directory () const; + + bool + directory_specified () const; + + const bool& + existing () const; + + const bool& + wipe () const; + + const dir_path& + host_config () const; + + bool + host_config_specified () const; + + const bool& + no_host_config () const; + + const dir_path& + build2_config () const; + + bool + build2_config_specified () const; + + const bool& + no_build2_config () const; + + const string& + name () const; + + bool + name_specified () const; + + const string& + type () const; + + bool + type_specified () const; + + const uuid_type& + uuid () const; + + bool + uuid_specified () 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: + dir_path directory_; + bool directory_specified_; + bool existing_; + bool wipe_; + dir_path host_config_; + bool host_config_specified_; + bool no_host_config_; + dir_path build2_config_; + bool build2_config_specified_; + bool no_build2_config_; + string name_; + bool name_specified_; + string type_; + bool type_specified_; + uuid_type uuid_; + bool uuid_specified_; + }; +} + +// Print page usage information. +// +namespace bpkg +{ + ::bpkg::cli::usage_para + print_bpkg_cfg_create_usage (::std::ostream&, + ::bpkg::cli::usage_para = ::bpkg::cli::usage_para::none); +} + +#include <bpkg/cfg-create-options.ixx> + +// Begin epilogue. +// +// +// End epilogue. + +#endif // BPKG_CFG_CREATE_OPTIONS_HXX |