From 2eb28736a05c7083f2b30b501954a789bbd85f88 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Sep 2015 15:18:11 +0200 Subject: Add --short-usage option When combined with --long-usage, it makes CLI generate both short and long usage printing code. --- cli/context.hxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cli/context.hxx') 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_; @@ -40,7 +49,7 @@ public: bool modifier; bool specifier; - bool usage; + usage_type usage; string const& inl; string const& opt_prefix; -- cgit v1.1