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/context.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/context.hxx')
-rw-r--r-- | cli/context.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cli/context.hxx b/cli/context.hxx index afaf577..b6ce420 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -29,6 +29,15 @@ public: typedef std::string string; typedef ::options options_type; +public: + enum usage_type + { + ut_none, + ut_short, + ut_long, + ut_both + }; + private: struct data; cutl::shared_ptr<data> data_; @@ -40,7 +49,7 @@ public: bool modifier; bool specifier; - bool usage; + usage_type usage; string const& inl; string const& opt_prefix; |