From 039c03f71f6a9341649756f674c2153640d9d087 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 4 Jan 2011 16:00:08 +0200 Subject: Restore deleted documentation files --- doc/cli.1 | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/cli.xhtml | 264 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 497 insertions(+) create mode 100644 doc/cli.1 create mode 100644 doc/cli.xhtml diff --git a/doc/cli.1 b/doc/cli.1 new file mode 100644 index 0000000..3c4e64c --- /dev/null +++ b/doc/cli.1 @@ -0,0 +1,233 @@ +.\" Process this file with +.\" groff -man -Tascii cli.1 +.\" +.TH CLI 1 "December 2009" "CLI 1.1.0" +.SH NAME +cli \- command line interface compiler for C++ +.\" +.\" +.\" +.\"-------------------------------------------------------------------- +.SH SYNOPSIS +.\"-------------------------------------------------------------------- +.B cli +.B [ +.I options +.B ] +.I file +.\" +.\" +.\" +.\"-------------------------------------------------------------------- +.SH DESCRIPTION +.\"-------------------------------------------------------------------- +.B cli +generates C++ implementation and documentation in various formats for a +command line interface defined in the CLI language. For an input file in +the form +.B name.cli +the following is generated. By default or if the +.B --generate-cxx +option is specified, the following C++ files are generated: +.B name.hxx +(header file), +.B name.ixx +(inline file, generated unless the +.B --suppress-inline +option is specified), and +.B name.cxx (source file). +If the +.B --generate-html +option is specified, then the +.B name.html +HTML documentation file is generated. If the +.B --generate-man +option is specified, then the +.B name.1 +man page file is generated. When +.B --generate-html +or +.B --generate-man +is specified, the +.B --stdout +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" +Print version and exit\. + +.IP "\fB--output-dir\fP|\fB-o\fP \fIdir\fP" +Write the generated files to \fIdir\fP instead of the current directory\. + +.IP "\fB--generate-modifier\fP" +Generate option value modifiers in addition to accessors\. + +.IP "\fB--generate-specifier\fP" +Generate functions for determining whether the option was specified on the +command line\. + +.IP "\fB--generate-description\fP" +Generate the option description list that can be examined at runtime\. + +.IP "\fB--generate-file-scanner\fP" +Generate the argv_file_scanner implementation\. This scanner is capable of +reading command line arguments from the argv array as well as files +specified 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--suppress-undocumented\fP" +Suppress the generation of documentation entries for undocumented options\. + +.IP "\fB--suppress-usage\fP" +Suppress the generation of the usage printing code\. + +.IP "\fB--long-usage\fP" +If no short documentation string is provided, use the complete long +documentation string in usage\. By default, in this situation only the first +sentence from the long string is used\. + +.IP "\fB--option-length\fP \fIlen\fP" +Indent option descriptions \fIlen\fP characters when printing usage\. This +is useful when you have multiple options classes, potentially in separate +files, and would like their usage to have the same indentation level\. + +.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--man-prologue\fP \fIfile\fP" +Insert the content of \fIfile\fP at the beginning of the man page file\. + +.IP "\fB--man-epilogue\fP \fIfile\fP" +Insert the content of \fIfile\fP at the end of the man page file\. + +.IP "\fB--html-prologue\fP \fIfile\fP" +Insert the content of \fIfile\fP at the beginning of the HTML file\. + +.IP "\fB--html-epilogue\fP \fIfile\fP" +Insert the content of \fIfile\fP at the end of the 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\. This functionality is useful +if you need 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\. + +.IP "\fB--ixx-suffix\fP \fIsuffix\fP" +Use \fIsuffix\fP instead of the default \fB\.ixx\fP to construct the name of +the generated inline file\. + +.IP "\fB--cxx-suffix\fP \fIsuffix\fP" +Use \fIsuffix\fP instead of the default \fB\.cxx\fP to construct the name of +the generated source file\. + +.IP "\fB--man-suffix\fP \fIsuffix\fP" +Use \fIsuffix\fP instead of the default \fB\.1\fP to construct the name of +the generated man page file\. + +.IP "\fB--html-suffix\fP \fIsuffix\fP" +Use \fIsuffix\fP instead of the default \fB\.html\fP to construct the name +of the generated HTML file\. + +.IP "\fB--option-prefix\fP \fIprefix\fP" +Use \fIprefix\fP instead of the default \fB-\fP as an option prefix\. +Unknown command line arguments that start with this prefix are treated as +unknown options\. If you set the option prefix to the empty value, then all +the unknown command line arguments will be treated as program arguments\. + +.IP "\fB--option-separator\fP \fIsep\fP" +Use \fIsep\fP instead of the default \fB--\fP as an optional separator +between options and arguments\. All the command line arguments that are +parsed after this separator are treated as program arguments\. Set the +option separator to the empty value if you don't want this functionality\. + +.IP "\fB--include-with-brackets\fP" +Use angle brackets (<>) instead of quotes ("") in the generated +\fB#include\fP directives\. + +.IP "\fB--include-prefix\fP \fIprefix\fP" +Add \fIprefix\fP to the generated \fB#include\fP directive paths\. + +.IP "\fB--guard-prefix\fP \fIprefix\fP" +Add \fIprefix\fP to the generated header inclusion guards\. The prefix is +transformed to upper case and characters that are illegal in a preprocessor +macro name are replaced with underscores\. + +.IP "\fB--reserved-name\fP \fIname\fP=\fIrep\fP" +Add \fIname\fP with an optional \fIrep\fP replacement to the list of names +that should not be used as identifiers\. If provided, the replacement name +is used instead\. All C++ keywords are already in this list\. + +.IP "\fB--options-file\fP \fIfile\fP" +Read additional options from \fIfile\fP with each option appearing on a +separate line optionally followed by space and an option value\. Empty lines +and lines starting with \fB#\fP are ignored\. Option values can be enclosed +in double (\fB"\fP) or single (\fB'\fP) quotes to preserve leading and +trailing whitespaces as well as to specify empty values\. If the value +itself contains trailing or leading quotes, enclose it with an extra pair of +quotes, for example \fB'"x"'\fP\. Non-leading and non-trailing quotes are +interpreted as being part of the option value\. + +The semantics of providing options in a file is equivalent to providing the +same set of options in the same order on the command line at the point where +the \fB--options-file\fP option is specified except that the shell escaping +and quoting is not required\. Repeat this option to specify more than one +options file\. + +.\" +.\" DIAGNOSTICS +.\" +.SH DIAGNOSTICS +If the input file is not a valid CLI definition, +.B cli +will issue diagnostic messages to STDERR and exit with non-zero exit code. +.\" +.\" BUGS +.\" +.SH BUGS +Send bug reports to the cli-users@codesynthesis.com mailing list. +.\" +.\" COPYRIGHT +.\" +.SH COPYRIGHT +Copyright (c) 2009-2011 Code Synthesis Tools CC. + +Permission is granted to copy, distribute and/or modify this document under +the terms of the MIT License. Copy of this license can be obtained from +http://www.codesynthesis.com/licenses/mit.txt diff --git a/doc/cli.xhtml b/doc/cli.xhtml new file mode 100644 index 0000000..58ff1f2 --- /dev/null +++ b/doc/cli.xhtml @@ -0,0 +1,264 @@ + + + + + CLI 1.1.0 Compiler Command Line Manual + + + + + + + + + + + +
+
+ +

NAME

+ +

cli - command line interface compiler for C++

+ +

SYNOPSIS

+ +
+
cli [options] file
+
+ +

DESCRIPTION

+ +

cli generates C++ implementation and + documentation in various formats for a command line interface + defined in the CLI language. For an input file in the form + name.cli the following is generated. By + default or if the --generate-cxx option is + specified, the following C++ files are generated: + name.hxx (header file), name.ixx + (inline file, generated unless the --suppress-inline + option is specified), and name.cxx (source file). + If the --generate-html option is specified, then + the name.html HTML documentation file is generated. + If the --generate-man option is specified, then + the name.1 man page file is generated. When + --generate-html or --generate-man + is specified, the --stdout option can be used to + redirect the output to STDOUT instead of a file.

+ +

OPTIONS

+ + + +
+
--help
+
Print usage information and exit.
+ +
--version
+
Print version and exit.
+ +
--output-dir|-o dir
+
Write the generated files to dir instead of the current directory.
+ +
--generate-modifier
+
Generate option value modifiers in addition to accessors.
+ +
--generate-specifier
+
Generate functions for determining whether the option was specified on the + command line.
+ +
--generate-description
+
Generate the option description list that can be examined at runtime.
+ +
--generate-file-scanner
+
Generate the argv_file_scanner implementation. This scanner is + capable of reading command line arguments from the argv array + as well as files specified with command line options.
+ +
--suppress-inline
+
Generate all functions non-inline. By default simple functions are made + inline. This option suppresses creation of the inline file.
+ +
--suppress-undocumented
+
Suppress the generation of documentation entries for undocumented options.
+ +
--suppress-usage
+
Suppress the generation of the usage printing code.
+ +
--long-usage
+
If no short documentation string is provided, use the complete long + documentation string in usage. By default, in this situation only the first + sentence from the long string is used.
+ +
--option-length len
+
Indent option descriptions len characters when printing usage. This + is useful when you have multiple options classes, potentially in separate + files, and would like their usage to have the same indentation level.
+ +
--cli-namespace ns
+
Generate the CLI support types in the ns namespace + (cli by default). The namespace can be nested, for + example details::cli. If the namespace is empty, then + the support types are generated in the global namespace.
+ +
--generate-cxx
+
Generate C++ code. If neither --generate-man nor + --generate-html is specified, this mode is assumed by + default.
+ +
--generate-man
+
Generate documentation in the man page format.
+ +
--generate-html
+
Generate documentation in the HTML format.
+ +
--man-prologue file
+
Insert the content of file at the beginning of the man page file.
+ +
--man-epilogue file
+
Insert the content of file at the end of the man page file.
+ +
--html-prologue file
+
Insert the content of file at the beginning of the HTML file.
+ +
--html-epilogue file
+
Insert the content of file at the end of the HTML file.
+ +
--class fq-name
+
Generate the man page or HTML documentation only for the fq-name + options class. The fq-name name should be a fully-qualified options + class name, for example, app::options. This + functionality is useful if you need to insert custom documentation between + options belonging to different classes.
+ +
--stdout
+
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.
+ +
--hxx-suffix suffix
+
Use suffix instead of the default .hxx to + construct the name of the generated header file.
+ +
--ixx-suffix suffix
+
Use suffix instead of the default .ixx to + construct the name of the generated inline file.
+ +
--cxx-suffix suffix
+
Use suffix instead of the default .cxx to + construct the name of the generated source file.
+ +
--man-suffix suffix
+
Use suffix instead of the default .1 to construct + the name of the generated man page file.
+ +
--html-suffix suffix
+
Use suffix instead of the default .html to + construct the name of the generated HTML file.
+ +
--option-prefix prefix
+
Use prefix instead of the default - as an option + prefix. Unknown command line arguments that start with this prefix are + treated as unknown options. If you set the option prefix to the empty value, + then all the unknown command line arguments will be treated as program + arguments.
+ +
--option-separator sep
+
Use sep instead of the default -- as an optional + separator between options and arguments. All the command line arguments that + are parsed after this separator are treated as program arguments. Set the + option separator to the empty value if you don't want this functionality.
+ +
--include-with-brackets
+
Use angle brackets (<>) instead of quotes ("") in the generated + #include directives.
+ +
--include-prefix prefix
+
Add prefix to the generated #include directive + paths.
+ +
--guard-prefix prefix
+
Add prefix to the generated header inclusion guards. The prefix is + transformed to upper case and characters that are illegal in a preprocessor + macro name are replaced with underscores.
+ +
--reserved-name name=rep
+
Add name with an optional rep replacement to the list of names + that should not be used as identifiers. If provided, the replacement name is + used instead. All C++ keywords are already in this list.
+ +
--options-file file
+
Read additional options from file with each option appearing on a + separate line optionally followed by space and an option value. Empty lines + and lines starting with # are ignored. Option values can + be enclosed in double (") or single + (') quotes to preserve leading and trailing whitespaces + as well as to specify empty values. If the value itself contains trailing or + leading quotes, enclose it with an extra pair of quotes, for example + '"x"'. Non-leading and non-trailing quotes are + interpreted as being part of the option value. + +

The semantics of providing options in a file is equivalent to providing + the same set of options in the same order on the command line at the point + where the --options-file option is specified except that + the shell escaping and quoting is not required. Repeat this option to + specify more than one options file.

+ +
+

DIAGNOSTICS

+ +

If the input file is not a valid CLI definition, cli + will issue diagnostic messages to STDERR and exit with non-zero exit + code.

+ +

BUGS

+ +

Send bug reports to the + cli-users@codesynthesis.com mailing list.

+ +
+ +
+ + -- cgit v1.1