From 469605e872aeca50c7556708de5d50d7e7935d83 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 24 Nov 2015 11:54:14 +0200 Subject: Implement support for documentation inside classes --- cli/options.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'cli/options.cxx') diff --git a/cli/options.cxx b/cli/options.cxx index 7d7f9cb..6869a60 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -1210,9 +1210,14 @@ options (::cli::scanner& s, _parse (s, opt, arg); } -void options:: -print_usage (::std::ostream& os) +::cli::usage_para options:: +print_usage (::std::ostream& os, ::cli::usage_para p) { + CLI_POTENTIALLY_UNUSED (os); + + if (p == ::cli::usage_para::text) + os << ::std::endl; + os << "--help Print usage information and exit." << ::std::endl; os << "--version Print version and exit." << ::std::endl; @@ -1384,6 +1389,10 @@ print_usage (::std::ostream& os) os << "--options-file Read additional options from with each" << ::std::endl << " option appearing on a separate line optionally" << ::std::endl << " followed by space and an option value." << ::std::endl; + + p = ::cli::usage_para::option; + + return p; } typedef -- cgit v1.1