Documentation hints when using doxygen
This web page will give you some
hints for using doxygen
(all commands)
for mathematical C++ code.
- There are several formats how to specify a comment block as doxygen
documentation. All of them are valid - choose what you like best or even
mix it. I prefer the format with the
@
in this text.
- Mathematical formulas in the
documentation via math. LaTeX commands (read,
read):
@f$ v_n = \frac{1}{n^2} \sum_{k=1}^n
\frac{6k^2-2k}{n+3}\qquad\forall n=1,\ldots,m
@f$
results in
If LaTeX is installed then the appropriate formula can be seen as above.
Else the LaTeX-source code is placed into the html. You don't have to
install LaTeX if you do not use it otherwise.
- Hyperlinks can be directly
included via
<a
href="http://de.wikipedia.org/wiki/Grundumsatz#Harris-Benedict-Formel">Harris-Benedict-Formel</a>
resulting in the hyperlink Harris-Benedict-Formel,
see the source file.
- Variables from the parameter
list of a function can be marked in the text via
@p
followed by the variable name, e.g.,
we refer to @p m a
s the last element
- Input/output/inout parameters
of a function can be marked in the documentation via
@param[in] in_var
This is an input variable.
@param[out] out_var
This is an output variable.
@param[in,out]
inout_var This variable is input
as well as output.
- Template parameters can be commented as
@tparam C STL container
@tparam T type of container
elements
- You can include warnings for
the potential user of your function.,
@warning This function is buggy and will destroy your data.
- cnt ...
G. Haase: Feb 18,
2021