


The option has the same effect for multi-line special C++ comments: /// Brief description which ends at this dot. Here is an example: /** Brief description which ends at this dot. If JAVADOC_AUTOBRIEF is set to YES in the configuration file, then using Javadoc style comment blocks will automatically start a brief description which ends at the first dot followed by a space or new line. Here is an example: /*! \brief Brief description. This command ends at the end of a paragraph, so the detailed description follows after an empty line. One could use the \brief command with one of the above comment blocks.

Or /************************************************įor the corresponding HTML documentation that is generated by doxygen.įor the brief description there are also several possibilities: Note: be careful when using a reformatter like clang-format as it may see this type of comment as 2 separate comments and introduce spacing between them. Note: the 2 slashes to end the normal comment block and start a special comment block. Some people like to make their comment blocks more visible in the documentation. Note that a blank line ends a documentation block in this case.

In both cases the intermediate *'s are optional, so /*!Ī third alternative is to use a block of at least two C++ comment lines, where each line starts with an additional slash or an exclamation mark. Or you can use the Qt style and add an exclamation mark (!) after the opening of a C-style comment block, as shown in this example: /*! You can use the Javadoc style, which consist of a C-style comment block starting with two *'s, like this: /** There are several ways to mark a comment block as a detailed description: For the HTML output brief descriptions are also used to provide tooltips at places where an item is referenced. An "in body" description can also act as a detailed description or can describe a collection of implementation details. Having more than one brief or detailed description is allowed (but not recommended, as the order in which the descriptions will appear is not specified).Īs the name suggest, a brief description is a short one-liner, whereas the detailed description provides longer, more detailed documentation. For methods and functions there is also a third type of description, the so called in body description, which consists of the concatenation of all comment blocks found within the body of the method or function.
#DOXYGEN CHEATSHEET CODE#
The next section presents the various styles supported by doxygen.įor Python, VHDL, and Fortran code there are different commenting conventions, which can be found in sections Comment blocks in Python, Comment blocks in VHDL, and Comment blocks in Fortran respectively.Ĭomment blocks for C-like languages (C/C++/C#/Objective-C/PHP/Java)įor each entity in the code there are two (or in some cases three) types of descriptions, which together form the documentation for that entity a brief description and detailed description, both are optional.
#DOXYGEN CHEATSHEET HOW TO#
How to put comments in your code such that doxygen incorporates them in the documentation it generates.
