diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-02 17:06:10 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-02 17:06:10 +0200 |
commit | 7c83b407648f1ef919218d8965d4c21378910755 (patch) | |
tree | 52f62723ccf07bb59a45737cb2d0fc89ae691f4f /cli/options.hxx | |
parent | 2eb28736a05c7083f2b30b501954a789bbd85f88 (diff) |
Add --generate-parse option
When specified, CLI will generate parse() functions instead of parsing
constructors. This is primarily useful for being able to parse into an
already initialized options class instance, for example, to implement
merging/overriding.
Diffstat (limited to 'cli/options.hxx')
-rw-r--r-- | cli/options.hxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/options.hxx b/cli/options.hxx index 22495e4..0328661 100644 --- a/cli/options.hxx +++ b/cli/options.hxx @@ -326,6 +326,8 @@ namespace cli class options { public: + options (); + options (int& argc, char** argv, bool erase = false, @@ -358,8 +360,6 @@ class options ::cli::unknown_mode option = ::cli::unknown_mode::fail, ::cli::unknown_mode argument = ::cli::unknown_mode::stop); - options (); - // Option accessors. // const bool& @@ -381,6 +381,9 @@ class options generate_specifier () const; const bool& + generate_parse () const; + + const bool& generate_description () const; const bool& @@ -548,6 +551,7 @@ class options std::string output_dir_; bool generate_modifier_; bool generate_specifier_; + bool generate_parse_; bool generate_description_; bool generate_file_scanner_; bool suppress_inline_; |