diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-24 11:54:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-24 11:54:14 +0200 |
commit | 469605e872aeca50c7556708de5d50d7e7935d83 (patch) | |
tree | 646940c7653065dbb97346f171d097515ec45afd /cli/header.cxx | |
parent | 7e9cb673ccfc77c5871292aa5491fc2c2dc2a663 (diff) |
Implement support for documentation inside classes
Diffstat (limited to 'cli/header.cxx')
-rw-r--r-- | cli/header.cxx | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/cli/header.cxx b/cli/header.cxx index 35097af..d5ab674 100644 --- a/cli/header.cxx +++ b/cli/header.cxx @@ -189,16 +189,21 @@ namespace // if (usage != ut_none) { + string up (cli + "::usage_para"); + string const& ost (options.ostream_type ()); + os << "// Print usage information." << endl << "//" << endl; - os << "static void" << endl - << "print_usage (" << options.ostream_type () << "&);" + os << "static " << up << endl + << "print_usage (" << ost << "&," << endl + << up << " = " << up << "::none);" << endl; if (usage == ut_both) - os << "static void" << endl - << "print_long_usage (" << options.ostream_type () << "&);" + os << "static " << up << endl + << "print_long_usage (" << ost << "&," << endl + << up << " = " << up << "::none);" << endl; } @@ -336,15 +341,18 @@ generate_header (context& ctx) const string& qn (ctx.options.page_usage ()); string n (ctx.escape (ctx.substitute (ctx.ns_open (qn, false)))); + string up (ctx.cli + "::usage_para"); string const& ost (ctx.options.ostream_type ()); - os << "void" << endl - << n << "usage (" << ost << "&);" + os << up << endl + << n << "usage (" << ost << "&," << endl + << up << " = " << up << "::none);" << endl; if (ctx.usage == ut_both) - os << "void" << endl - << n << "long_usage (" << ost << "&);" + os << up << endl + << n << "long_usage (" << ost << "&," << endl + << up << " = " << up << "::none);" << endl; ctx.ns_close (qn, false); |