diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-02 11:53:01 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-02 11:53:01 +0200 |
commit | 626348009e74d2ec6e9f500d27f60728b4fc81df (patch) | |
tree | 9d56bf2d091abb2a7e99876d1184895e8b6fb4bb /build/options.ixx | |
parent | e0de4f26fcf598b4f6beaa2847c4d43a4c761f5b (diff) |
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
Diffstat (limited to 'build/options.ixx')
-rw-r--r-- | build/options.ixx | 145 |
1 files changed, 145 insertions, 0 deletions
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. |