summaryrefslogtreecommitdiff
path: root/cli/options.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-24 11:54:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-24 11:54:14 +0200
commit469605e872aeca50c7556708de5d50d7e7935d83 (patch)
tree646940c7653065dbb97346f171d097515ec45afd /cli/options.hxx
parent7e9cb673ccfc77c5871292aa5491fc2c2dc2a663 (diff)
Implement support for documentation inside classes
Diffstat (limited to 'cli/options.hxx')
-rw-r--r--cli/options.hxx28
1 files changed, 25 insertions, 3 deletions
diff --git a/cli/options.hxx b/cli/options.hxx
index 65dae49..0612882 100644
--- a/cli/options.hxx
+++ b/cli/options.hxx
@@ -28,6 +28,27 @@
namespace cli
{
+ class usage_para
+ {
+ public:
+ enum value
+ {
+ none,
+ text,
+ option
+ };
+
+ usage_para (value);
+
+ operator value () const
+ {
+ return v_;
+ }
+
+ private:
+ value v_;
+ };
+
class unknown_mode
{
public:
@@ -38,7 +59,7 @@ namespace cli
fail
};
- unknown_mode (value v);
+ unknown_mode (value);
operator value () const
{
@@ -666,8 +687,9 @@ class options
// Print usage information.
//
- static void
- print_usage (::std::ostream&);
+ static ::cli::usage_para
+ print_usage (::std::ostream&,
+ ::cli::usage_para = ::cli::usage_para::none);
// Implementation details.
//