Calling DOC++ with option `-h' will give you a long screen with one-line descriptions of the command line options provided by DOC++. However, we now attempt to provide a more detailed description suitable for a novice user to understand how to call DOC++ with his docified sources.At the commandline DOC++ may be called with a sequence of options and a list of files or directories. No option may be passed after the first filename. All files passed to DOC++ are parsed in the order they are specified for generating documentation from them. All directories are traversed recursively and all files *.h* or *.java (depending on the `-J' comand line option) are parsed. However, it is good practice to control the input files with one main input file and use the `@Include:' directive.
Options consist of a leading character `-', preceeded by one or two characters and optionally a space-separated argument.
Command line options come in three different flavours. The first type of options control parameters that are independent of the chosen output, HTML (the default) or LaTeX (selected with `-t' option). These are:
- -A
- Instructs DOC++ to generate manual entries for every declaration it finds, no matter if it is documented with a DOC++ comment or not.
- -c
- Instructs DOC++ to use the C++-style `//' comments as DOC++ comments.
- -h
- Don't do anything, just print a one-line description of all options to the standard output.
- -H
- Instructs DOC++ to use only HTML as formatting language.
- -J
- Sets DOC++ into Java mode, i.e. lets DOC++ parse Java instead of C/C++.
- -k
- Generate class graphs for classes with neither base class nor child classes.
- -nd
- Instructs DOC++ to ignore the `#define' macros.
- -p
- instructs DOC++ also to include private class members to the documentation. If not specified no private member will show up in the documentation (even if they are docified).
- -q
- Turn DOC++ into a quick operating mode, which increase the generated documentation size.
- -t
- Instructs DOC++ to produce LaTeX output rather than HTML.
- -u
- Draw arrows from derived class to the base class when generating class graphs.
- -v
- Sets DOC++ into verbose mode making it operate more noisy. This may be helpful when debugging your documentation.
The following command line options are only active when HTML output is selected, i.e. no `-t' option is passed:
- -a
- When this option is specified, DOC++ will use HTML tables for listing the members of a class. This yields all member names to be aligned.
- -b
- Same as ``-a'' except that a bordered table will be used.
- -B <file>
- Use <file> as the footer to every HTML page generated by DOC++. This is how to get rid of DOC++ logos and customize the output for your needs.
- -d <name>
- This specifies the directory <name>, where the HTML files and gifs are to be written. If not specified, the current directory will be used. If the specified directory does not yet exist, it will be created by DOC++.
- -f
- Instructs DOC++ to write on each HTML page the file of the source code, where this manual entry has been declared.
- -F
- Same as ``-f'' except the complete path of the source file is shown.
- -g
- Instructs DOC++ not to generate gifs for equations and `\TEX{}' text in the documentation. This may reduce execution time when calling DOC++, but note, that DOC++ keeps a database of already generated gifs, such that gifs are not recreated if they already exist. However, if you do not have LaTeX, dvips, ghostscript and the ppmtools installed on your system, you must use this option, since then DOC++ will fail setting up the gifs.
- -G
- This instructs DOC++ to reconstruct all gifs, even if they already exist. This may be useful, if the database is corrupted for some reason.
- -i
- Instructs DOC++ not to show inherited members of classes in the generated HTML documentation.
- -j
- Suppresses the generation of java applets for drawing class graphs.
- -r
- This option should only be set when using DOC++ on DOS filesystems with 8-character-long filenames.
- -S
- Instructs DOC++ to sort documentation entries alphabetically.
- -T <file>
- Use <file> as the header to every HTML page generated by DOC++. This is how to get rid of DOC++ logos and customize the output for your needs.
Finally this set of command line options provides some control for the LaTeX output of DOC++.
- -ec
- Only generates the class graph.
- -ef <file>
- Reads the LaTeX environment from <file>.
- -ei
- Only generates the index.
- -eo <option>
- Adds <option> to LaTeX's `\documentclass'.
- -ep <package>
- Adds `\usepackage{package}' to the LaTeX environment.
- -et <file>
- Uses the contents of <file> as LaTeX title page.
- -D
- Sets the minimum depth (number of levels) in the TOC.
- -l
- Switches off the generation of the LaTeX environment. This should be used if you intend to include the documentation in some LaTeX document.
- -o <file>
- Sets the output file name. If not specified, the output is printed to stdout.
- -s
- Instead of generating a manual from the manual entries, DOC++ will generate a source code listing. This listing contains all normal C or C++ comments typeset in LaTeX quality. Every line is preceeded with its line number.
For customization of the LaTeX output, please try to understand and edit the style file ``docxx.sty''. (Sorry, there is no documentation on how to do this). The HTML output can be customized by means of the following 6 files:
If one or more of these files are found in the current directory, the corresponding part of a HTML-page is substituted by the contents of the file. The `indexHeader.inc' and `hierHeader.inc' files should start with ``<HTML><TITLE> ...''. File classHeader.inc should start with ``<BODY> ...'', since for such pages DOC++ sets up the title.
- indexHeader.inc
- Header for index HTML-pages
- indexFooter.inc
- Footer for index HTML-pages
- hierHeader.inc
- Header for class hierarchy HTML-pages
- hierFooter.inc
- Footer for class hierarchy HTML-pages
- classHeader.inc
- Header for all other HTML-pages
- classFooter.inc
- Footer for all other HTML-pages
As an example, the LaTeX version of this document has been generated with
doc++ -v -t -o doc.tex -ep a4wide doc.dxxwhile the HTML version has been created usingdoc++ -d html doc.dxxAs you can see, this documentation itself is written using DOC++ in order to gain the benefits of having just one documentation source and two different output possibilities.
Alphabetic index Hierarchy of classes