summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/cli.159
-rw-r--r--doc/cli.xhtml75
2 files changed, 70 insertions, 64 deletions
diff --git a/doc/cli.1 b/doc/cli.1
index 8cc15a7..bd12cad 100644
--- a/doc/cli.1
+++ b/doc/cli.1
@@ -57,10 +57,6 @@ option can be used to redirect the output to STDOUT instead of a file.
.\"--------------------------------------------------------------------
.SH OPTIONS
.\"--------------------------------------------------------------------
-.\"
-.\" The following documentation was generated by CLI, a command
-.\" line interface compiler for C++.
-.\"
.IP "\fB--help\fP"
Print usage information and exit\.
.IP "\fB--version\fP"
@@ -87,9 +83,25 @@ with command line options\.
.IP "\fB--suppress-inline\fP"
Generate all functions non-inline\. By default simple functions are made
inline\. This option suppresses creation of the inline file\.
+.IP "\fB--cli-namespace\fP \fIns\fP"
+Generate the CLI support types in the \fIns\fP namespace (\fBcli\fP by
+default)\. The namespace can be nested, for example \fBdetails::cli\fP\. If
+the namespace is empty, then the support types are generated in the global
+namespace\.
.IP "\fB--ostream-type\fP \fItype\fP"
Output stream type instead of the default \fBstd::ostream\fP that should be
used to print usage and exception information\.
+.IP "\fB--generate-cxx\fP"
+Generate C++ code\. If neither \fB--generate-man\fP nor \fB--generate-html\fP
+is specified, this mode is assumed by default\.
+.IP "\fB--generate-man\fP"
+Generate documentation in the man page format\.
+.IP "\fB--generate-html\fP"
+Generate documentation in the HTML format\.
+.IP "\fB--stdout\fP"
+Write output to STDOUT instead of a file\. This option is not valid when
+generating C++ code and is normally used to combine generated documentation
+for several option classes in a single file\.
.IP "\fB--suppress-undocumented\fP"
Suppress the generation of documentation entries for undocumented options\.
.IP "\fB--suppress-usage\fP"
@@ -110,18 +122,21 @@ useful when you have multiple options classes, potentially in separate files,
and would like their usage to have the same indentation level\.
.IP "\fB--exclude-base\fP"
Exclude base class information from usage and documentation\.
-.IP "\fB--cli-namespace\fP \fIns\fP"
-Generate the CLI support types in the \fIns\fP namespace (\fBcli\fP by
-default)\. The namespace can be nested, for example \fBdetails::cli\fP\. If
-the namespace is empty, then the support types are generated in the global
-namespace\.
-.IP "\fB--generate-cxx\fP"
-Generate C++ code\. If neither \fB--generate-man\fP nor \fB--generate-html\fP
-is specified, this mode is assumed by default\.
-.IP "\fB--generate-man\fP"
-Generate documentation in the man page format\.
-.IP "\fB--generate-html\fP"
-Generate documentation in the HTML format\.
+.IP "\fB--class\fP \fIfq-name\fP"
+Generate the man page or HTML documentation only for the \fIfq-name\fP options
+class\. The \fIfq-name\fP name should be a fully-qualified options class name,
+for example, \fBapp::options\fP\. To generate documentation for multiple
+classes, repeat this option and the documentation will be produced in the
+order specified\. This functionality is useful if you need to assemble
+documentation from multiple classes in a specific order or to insert custom
+documentation between options belonging to different classes\.
+.IP "\fB--docvar\fP|\fB-v\fP \fIname\fP=\fIval\fP"
+Set documentation variable \fIname\fP to the value \fIval\fP\. Documentation
+variables can be substituted in prologues and epilogues (see
+\fB--*-prologue*\fP and \fB--*-epilogue*\fP options) using the
+\fB$\fP\fIname\fP\fB$\fP expansion syntax (use \fB$$\fP to escape expansion)\.
+They can also be defined in \fB\.cli\fP files using the
+"\e\fIname\fP=\fIval\fP" syntax\.
.IP "\fB--hxx-prologue\fP \fItext\fP"
Insert \fItext\fP at the beginning of the generated C++ header file\.
.IP "\fB--ixx-prologue\fP \fItext\fP"
@@ -166,18 +181,6 @@ Insert the content of \fIfile\fP at the end of the generated C++ source file\.
Insert the content of \fIfile\fP at the end of the generated man page file\.
.IP "\fB--html-epilogue-file\fP \fIfile\fP"
Insert the content of \fIfile\fP at the end of the generated HTML file\.
-.IP "\fB--class\fP \fIfq-name\fP"
-Generate the man page or HTML documentation only for the \fIfq-name\fP options
-class\. The \fIfq-name\fP name should be a fully-qualified options class name,
-for example, \fBapp::options\fP\. To generate documentation for multiple
-classes, repeat this option and the documentation will be produced in the
-order specified\. This functionality is useful if you need to assemble
-documentation from multiple classes in a specific order or to insert custom
-documentation between options belonging to different classes\.
-.IP "\fB--stdout\fP"
-Write output to STDOUT instead of a file\. This option is not valid when
-generating C++ code and is normally used to combine generated documentation
-for several option classes in a single file\.
.IP "\fB--hxx-suffix\fP \fIsuffix\fP"
Use \fIsuffix\fP instead of the default \fB\.hxx\fP to construct the name of
the generated header file\.
diff --git a/doc/cli.xhtml b/doc/cli.xhtml
index 896f237..e2baa6b 100644
--- a/doc/cli.xhtml
+++ b/doc/cli.xhtml
@@ -70,12 +70,6 @@
redirect the output to STDOUT instead of a file.</p>
<h1>OPTIONS</h1>
-
-<!--
- The following documentation was generated by CLI, a command
- line interface compiler for C++.
--->
-
<dl class="options">
<dt><code><b>--help</b></code></dt>
<dd>Print usage information and exit.</dd>
@@ -118,11 +112,33 @@
<dd>Generate all functions non-inline. By default simple functions are
made inline. This option suppresses creation of the inline file.</dd>
+ <dt><code><b>--cli-namespace</b></code> <i>ns</i></dt>
+ <dd>Generate the CLI support types in the <i>ns</i> namespace
+ (<code><b>cli</b></code> by default). The namespace can be nested, for
+ example <code><b>details::cli</b></code>. If the namespace is empty, then
+ the support types are generated in the global namespace.</dd>
+
<dt><code><b>--ostream-type</b></code> <i>type</i></dt>
<dd>Output stream type instead of the default
<code><b>std::ostream</b></code> that should be used to print usage and
exception information.</dd>
+ <dt><code><b>--generate-cxx</b></code></dt>
+ <dd>Generate C++ code. If neither <code><b>--generate-man</b></code> nor
+ <code><b>--generate-html</b></code> is specified, this mode is assumed by
+ default.</dd>
+
+ <dt><code><b>--generate-man</b></code></dt>
+ <dd>Generate documentation in the man page format.</dd>
+
+ <dt><code><b>--generate-html</b></code></dt>
+ <dd>Generate documentation in the HTML format.</dd>
+
+ <dt><code><b>--stdout</b></code></dt>
+ <dd>Write output to STDOUT instead of a file. This option is not valid
+ when generating C++ code and is normally used to combine generated
+ documentation for several option classes in a single file.</dd>
+
<dt><code><b>--suppress-undocumented</b></code></dt>
<dd>Suppress the generation of documentation entries for undocumented
options.</dd>
@@ -152,22 +168,24 @@
<dt><code><b>--exclude-base</b></code></dt>
<dd>Exclude base class information from usage and documentation.</dd>
- <dt><code><b>--cli-namespace</b></code> <i>ns</i></dt>
- <dd>Generate the CLI support types in the <i>ns</i> namespace
- (<code><b>cli</b></code> by default). The namespace can be nested, for
- example <code><b>details::cli</b></code>. If the namespace is empty, then
- the support types are generated in the global namespace.</dd>
-
- <dt><code><b>--generate-cxx</b></code></dt>
- <dd>Generate C++ code. If neither <code><b>--generate-man</b></code> nor
- <code><b>--generate-html</b></code> is specified, this mode is assumed by
- default.</dd>
-
- <dt><code><b>--generate-man</b></code></dt>
- <dd>Generate documentation in the man page format.</dd>
+ <dt><code><b>--class</b></code> <i>fq-name</i></dt>
+ <dd>Generate the man page or HTML documentation only for the
+ <i>fq-name</i> options class. The <i>fq-name</i> name should be a
+ fully-qualified options class name, for example,
+ <code><b>app::options</b></code>. To generate documentation for multiple
+ classes, repeat this option and the documentation will be produced in the
+ order specified. This functionality is useful if you need to assemble
+ documentation from multiple classes in a specific order or to insert
+ custom documentation between options belonging to different classes.</dd>
- <dt><code><b>--generate-html</b></code></dt>
- <dd>Generate documentation in the HTML format.</dd>
+ <dt><code><b>--docvar</b></code>|<code><b>-v</b></code> <i>name</i>=<i>val</i></dt>
+ <dd>Set documentation variable <i>name</i> to the value <i>val</i>.
+ Documentation variables can be substituted in prologues and epilogues (see
+ <code><b>--*-prologue*</b></code> and <code><b>--*-epilogue*</b></code>
+ options) using the <code><b>$</b></code><i>name</i><code><b>$</b></code>
+ expansion syntax (use <code><b>$$</b></code> to escape expansion). They
+ can also be defined in <code><b>.cli</b></code> files using the
+ <code>"\<i>name</i>=<i>val</i>"</code> syntax.</dd>
<dt><code><b>--hxx-prologue</b></code> <i>text</i></dt>
<dd>Insert <i>text</i> at the beginning of the generated C++ header
@@ -243,21 +261,6 @@
<dd>Insert the content of <i>file</i> at the end of the generated HTML
file.</dd>
- <dt><code><b>--class</b></code> <i>fq-name</i></dt>
- <dd>Generate the man page or HTML documentation only for the
- <i>fq-name</i> options class. The <i>fq-name</i> name should be a
- fully-qualified options class name, for example,
- <code><b>app::options</b></code>. To generate documentation for multiple
- classes, repeat this option and the documentation will be produced in the
- order specified. This functionality is useful if you need to assemble
- documentation from multiple classes in a specific order or to insert
- custom documentation between options belonging to different classes.</dd>
-
- <dt><code><b>--stdout</b></code></dt>
- <dd>Write output to STDOUT instead of a file. This option is not valid
- when generating C++ code and is normally used to combine generated
- documentation for several option classes in a single file.</dd>
-
<dt><code><b>--hxx-suffix</b></code> <i>suffix</i></dt>
<dd>Use <i>suffix</i> instead of the default <code><b>.hxx</b></code> to
construct the name of the generated header file.</dd>