diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-02 15:18:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-02 15:18:11 +0200 |
commit | 2eb28736a05c7083f2b30b501954a789bbd85f88 (patch) | |
tree | 9cd38c69d7ce26d45e4180f1cca8808f54309f7f /cli/options.hxx | |
parent | 957fd18c38e3bb1c9c489b40a0cbdf865e821294 (diff) |
Add --short-usage option
When combined with --long-usage, it makes CLI generate both short
and long usage printing code.
Diffstat (limited to 'cli/options.hxx')
-rw-r--r-- | cli/options.hxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/cli/options.hxx b/cli/options.hxx index d3a9c5c..22495e4 100644 --- a/cli/options.hxx +++ b/cli/options.hxx @@ -1,10 +1,17 @@ -// This code was generated by CLI, a command line interface +// -*- C++ -*- +// +// This file was generated by CLI, a command line interface // compiler for C++. // #ifndef CLI_OPTIONS_HXX #define CLI_OPTIONS_HXX +// Begin prologue. +// +// +// End prologue. + #include <deque> #include <iosfwd> #include <string> @@ -351,6 +358,8 @@ class options ::cli::unknown_mode option = ::cli::unknown_mode::fail, ::cli::unknown_mode argument = ::cli::unknown_mode::stop); + options (); + // Option accessors. // const bool& @@ -392,6 +401,9 @@ class options const bool& long_usage () const; + const bool& + short_usage () const; + const std::size_t& option_length () const; @@ -520,8 +532,6 @@ class options // Implementation details. // protected: - options (); - bool _parse (const char*, ::cli::scanner&); @@ -545,6 +555,7 @@ class options bool suppress_undocumented_; bool suppress_usage_; bool long_usage_; + bool short_usage_; std::size_t option_length_; bool exclude_base_; std::string cli_namespace_; @@ -589,4 +600,9 @@ class options #include "options.ixx" +// Begin epilogue. +// +// +// End epilogue. + #endif // CLI_OPTIONS_HXX |