You are on page 1of 2

Doxygen Quick Reference other parts of the documentation as the first argument to a Member group documentation will not

Member group documentation will not appear under under a


\ref <lbl> ‘‘<lnk>’’ command. This creates a link to the la- separate header-tab in the generated documentation. Module
beled group using the lnk text enclosed in quotes, the second groups are defined with the \name <label> command in a com-
Doxygen commands argument is optional. The group members are enclosed by the ment block which is taken as the group header, which gives the
Doxygen (http://www.doxygen.org/) reads a configuration file group open @{ and close @} commands, as follows: group a label for later reference.
to control source code processing and documentation output
formats, the default filename is Doxyfile. Page Groups
/** \defgroup <label> ‘‘<title>’’ */
doxygen Run with default config file. /* @{ */ Page group documentation will appear under the Related
doxygen <config-file> Run with <config-file>. // group members here ... Pages heading in the generated documentation. Page groups
doxygen -g <config-file> Generate <config-file>. /* @} */ are defined with the \page <label> (title), which gives the
group a label for later reference. and a title to display
Documenting the sources where groups initiated by \name or \page commands have sim- in the documenation. Pages can be further divided into
Doxygen-visible multi-line comment blocks begin with /**, or ilar forms, see table below. The open and close group com- sub-pages—with \sub-page <n> ‘‘<t>’’, sections and sub-
/*!, and end with */. Alternately, the of C++ single line com- mands must be placed in a comment block, this can be a stan- sections, and sub-subsections with a command similar to:
ment delimiters /// or //! may be used on each line. Within dard C-style comment or single line C++ comment. Elements \section <section-name> (section title) . The name of the
a comment block HTML tags or Doxygen specific markup tags, may be members of multiple groups, which may lead to con- command simply changes to subsection or subsubsection as
Special Commands, can be used. Documentation comment flicts when generating documentation. Doxygen implements required. These commands give a label <section-name> and
blocks can occur anywhere in the source code but placing such a priority scheme for group membership. The priorities are title (section title) to the section.
blocks before defined code elements, classes, functions, etc., is assigned based on the command used to initiate group mem-
recommended. Source code files should include the \file com- bership. The priority order (highest to lowest) is \ingroup, A special case of a page group is the main page group. The
mand to make comments in the file visible to Doxygen. \defgroup, \addtogroup, and \weakgroup Doxygen command \mainpage within a comment block places
the documentation within that block on the Index page of the
Doxygen special commands, with a few exceptions, begin with \defgroup <l> ‘‘<t>’’ defines a module group with a la- generated documentation. You can refer to the main page using
the prefix @ or \, used in this document. Following the Doxygen bel l and title t. \ref index (if the treeview is disabled, otherwise you should use
manual convention, the command arguments are enclosed here \name <l> defines a member group with a la- \ref main).
in braces that signify the extent of the argument, these braces bel l.
are not part of the command, nor should they be included in \page <l> (t) defines a page group with a label l Formulas
the command: and title t. Doxygen can include LATEX formulas in the HTML and LATEX
\section <l> (t) defines a section on a page with a output formats. Formulas can p be included within the text of
< angle > angle braces: argument is a single word.
label l and title t.
( round ) round braces: argument extends to end of line. a single line, for example—r = (x − x0 )2 − (y − y0 )2 or as a
\subsection <l> (t) defines a sub-section on a page
{ curly } curly braces: argument extends to next para- centered formula such as (from the Doxygen manual):
with a label l and title t.
graph.
\mainpage (t) defines a documentation block to Z T  Z a Z θ 

Lists place on the index page. |I2 | = ψ(t) u(a, t) − c(ξ)ut (ξ, t) dξ dt
\addtogroup <l> (t) adds to a group, enclose in open- k(θ, t)
Column aligned hypens (-) create a unordered or bulleted list. 0 γ(t) a
Column aligned hypens with a pound-number symbol (-#) cre- close pairs.
\ingroup <l> adds documentation to the l To include an inline formula the command \f$ is used to begin
ate an ordered or numbered list. Lists can be made heirachi-
group. and end the formula block, the above formula would appear in
cal using indentation levels, list items with identical column
\ref <l> ‘‘<t>’’ references group l using the op- the documentation as \f$ \sqrt{(x-x_0)^2-(y-y_0)^2} \f$.
aligned symbols will appear at the same level of the heirarchy.
tional link text t. A centered formula is enclosed by the Doxygen commands \f[
Unordered and ordered lists can be mixed in a heirarchy.
- list item in unorderd list (column aligned). /* @{ */ comment to open a group block to open the formula block and \f] to close it. Additional LATEX
-# list item in orderd list (column aligned). /* @} */ comment to close a group block equation environments, like eqnarray can be used with the com-
\li list item in unorderd list. // @{ comment to open a group block mands \f{eqnarray} to open the formula block and \f} to close
\arg equivalent to \li. // @{ comment to open a group block the block.
<ul> HTML: starts an unordered list. Module Groups LATEX Formulas
</ul> HTML: ends an unordered list.
<ol> HTML: starts an ordered list. Module group documentation will appear under the Modules LATEX formulas use a markup language with a rich set of tags
</ol> HTML: ends an ordered list. heading in the generated documentation. Module groups are which can be combined to typeset any formula. A brief sub-set
<li> HTML: list item, between <[uo]l> and </[uo]l> defined with the \defgroup <label> ‘‘<title>’’, which gives of those commands is included here. Additional resources can
pairs. the group a label for later reference. and a title to display in be found on the web and in bookstores.
the documenation; title includes everything enclosed by quotes.
Grouping x^{2} x2 ; superscript x_{0} x√0 ; subscript
Member Groups x n
Doxygen can group things in many ways. Groups are de- \frac{x}{y} y
\sqrt[n]{x} x
Pn Rb
fined with either a \defgroup, \name or \page command Member group are used when “a compound (e.g. a class or file) \sum_{k=1}^n \int_{a}^b dt dt
k=1 a
with a label and optional title. The label can be used in has many members, it is often desired to group them together”. \pi π; small Greek \Pi Π; capital Greek
Graphs Structural Indicators Section Indicators
Doxygen can produce graphs, generated by the dot tool from \attention {...} starts an Attention paragraph.
Graphviz (http://www.graphviz.org/). Graph generation by \author {loa} includes the list of authors loa.
Doxygen is normally performed automatically based on settings \brief {...} a brief description of the element.
in the configuration file. These settings, with the exception of \addtogroup <l> (t) adds to a group, enclose in open-close \bug {...} a bug description.
DOT_PATH are either YES or NO. These are global settings for the pairs. \cond <sec> begins a conditional section.
project. Graphs will only be generated if you have dot installed \callgraph generates a call graph for function or \date {...}
and HAVE_DOT = YES. method \deprecated {...} starts a Deprecated paragraph.
\callergraph generates a caller graph for function or \else additional clause to a \if command
HAVE_DOT signals that the dot tool is available. \elseif <sec> additional clause to a \cond command.
method
DOT_PATH path todot tool, if not in $PATH. \endcond ends a conditional section.
\category documentation block for a class cate-
GRAPHICAL_HIERARCHY generate a graph of class heirarchy. \endif ends an \if clause.
gory (Objective-C only).
CLASS_GRAPH generate inheritance graph for each \exception <e> starts an exception description for e
\class <c> [<f>] [<n>]documents the class c, header file f
documented class. \if <sec> starts a conditional section.
and header name n can be included.
INCLUDE_GRAPH generate dependency graph for each \ifnot <sec> starts a conditional section.
\def <name> documents the name #define macro
documented file. \invariant {...} starts a description of an invariant.
\defgroup <l> ‘‘<t>’’ defines a module group with a label l
CALL_GRAPH generate call graph for each docu- \note {...} starts a Note paragraph.
and title t.
mented function or method. \par (t) {...} starts a paragraph with and optional title
\enum <name> documents the name enumeration
CALLER_GRAPH generate a graph indicating func- (t).
\example <file> a documentation block for an example
tions called by the documented \param <p> {...} starts a description of parameter p.
contained in file.
function. \post {...} starts a post-condition description.
\file <name> a documentation block for file name
COLLABORATION_GRAPH generate a graph showing inheri- \pre {...} starts a pre-condition description.
\fn <sig> documents the function with signature
tance and usage relationships be- \remarks {...} starts a Remarks paragraph.
sig
tween classes and structs. \return {...} starts a description of return values.
\hideinitializer hides the default value of a #define
\ingroup <l1> [<l2>] adds documentation to the l1 group, \retval <f> {...} describes a return value for function f
You can also use the dot language syntax to generate a graph. \sa {ref} starts a See Also paragraph.
Commands specific to dot are enclosed in the Doxygen com- multiple groups can be used.
\interface <n> documentation block for interface n \see {ref} equivalent to \sa.
mand pair \dot and \enddot. \since {...} describes since when an entity was avail-
\internal all text following this is suppressed to
able.
Special Commands the end of the comment block.
\test {...} starts a test case description paragraph.
A listing Doxygen specific commands by category. \mainpage (t) the main or index page documentation
block. \throw <e> {...} equivalent to exception
\name (header) a member group documentation block. \todo {...} starts a To Do paragraph.
Text Formatting \namespace <n> a documenation block for namesapce \version {...} starts a paragraph where version strings
\a <word> word font face, equivalent to \e. n can be entered.
\arg list item, equivalent to \li. \nosubgrouping turns off sub-gropuing for a class. \warning {...} starts a paragraph for warning messages.
\b <word> word font face. \overload (s) used to document an overloaded func- \xrefitem <k> ‘‘(h)’’ {.}
\c <word> word font face. tion with signature s creats a cross-refernced paragraph.
\code starts a code block section. \package <n>) a documentation block for package n Link Indicators
\endcode ends a \code section. \page <n> (t) indicates a page group documentation \addindex (t) adds t to the LATEX index.
\copydoc ref copies documenation from ref. block with label n and title t \anchor (w) places invisible anchor w in the docu-
\dot starts a dot graph block. \property (q) documentation for global or class ment.
\enddot ends a dot graph block. property q \endlink ends a link started with \link
\e <word> word font face, equivalent to \a. √ \protocol (f) documentation block for a protocol \link <n> {...} creates link to n with user specified link
\f$ starts and ends an inline formula, i.e. x. (Objective-C only). text.
\f[ starts a centered formula block. \relates <n> used to relate non-member functions \ref <n> ‘‘(t)’’ creates a reference to n with text t.
\f] ends a centered formula block. to classes \subpage <n> ‘‘(t)’’ creates a sub-page of name n.
\image <format> <file> ‘‘caption’’ \relatesalso <n> similar to \relates \section <l> (t) creates a section on a page with a label
places an image into the documentation with an \showinitializer shows the default value of a #define l and title t.
optional caption \struct <n> documentation block for struct n \subsection <l> (t) creates a sub-section on a page with a
\htmlonly starts a block for only HTML output. \typedef (t) documentation block for typedef t label l and title t.
\endhtmlonly ends an HMTL only block. \union <n> documentation block for union n \paragraph <n> (t) creates a paragraph on a page with a
\n forces a new line. \var (v) documentation block for variable v label l and title t.
\p <word> word font face. \weakgroup <n> equivalent to \addtogroup but has 2006 - Paul W. Joireman, joireman@fnal.gov
\verbatim starts a block included as verbatim text. lower priority when resolving group Based on the LATEX 2ε Cheat Sheet by Winston Chang
\endverbatim ends a verbatim text block. conflicts. For more detailed information consult the Doxygen manual
http://www.stack.nl/ dimitri/doxygen/manual.html
$Revision: 1.0 $, $Date: 2006/10/10 $.

You might also like