From 626348009e74d2ec6e9f500d27f60728b4fc81df Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Apr 2015 11:53:01 +0200 Subject: Add command line option to set verbosity level -v sets it to 1 (shows actual command lines) --verbose sets it to any value in the 0-5 range --- build/options.ixx | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 build/options.ixx (limited to 'build/options.ixx') diff --git a/build/options.ixx b/build/options.ixx new file mode 100644 index 0000000..d242ba5 --- /dev/null +++ b/build/options.ixx @@ -0,0 +1,145 @@ +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface +// compiler for C++. +// + +// Begin prologue. +// +// +// End prologue. + +namespace cli +{ + // 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) + : option_ (option), value_ (value) + { + } + + inline const std::string& invalid_value:: + option () const + { + return option_; + } + + inline const std::string& invalid_value:: + value () const + { + return value_; + } + + // argv_scanner + // + inline argv_scanner:: + argv_scanner (int& argc, char** argv, bool erase) + : i_ (1), argc_ (argc), argv_ (argv), erase_ (erase) + { + } + + inline argv_scanner:: + argv_scanner (int start, int& argc, char** argv, bool erase) + : i_ (start), argc_ (argc), argv_ (argv), erase_ (erase) + { + } + + inline int argv_scanner:: + end () const + { + return i_; + } +} + +// options +// + +inline const bool& options:: +help () const +{ + return this->help_; +} + +inline const bool& options:: +version () const +{ + return this->version_; +} + +inline const bool& options:: +v () const +{ + return this->v_; +} + +inline const std::uint16_t& options:: +verbose () const +{ + return this->verbose_; +} + +// Begin epilogue. +// +// +// End epilogue. -- cgit v1.1