C++ style guide: Difference between revisions

276 bytes added ,  22 September 2017
→‎Doxygen Style Guide: more Doxygen style recommendations
m (→‎Doxygen Style Guide: Apply the rest of the guide ;-))
(→‎Doxygen Style Guide: more Doxygen style recommendations)
Line 221: Line 221:
Doxygen allows for a variety of commenting styles. In order to maintain uniformity across the entire project the following rules should be applied:
Doxygen allows for a variety of commenting styles. In order to maintain uniformity across the entire project the following rules should be applied:


* For Doxygen comments use only {{codeline|//!}} and NOT {{codeline|/*! ... */}}
* For Doxygen comments use only {{codeline|//!}} and NOT {{codeline|/*! ... */}}, regardless of the size of the block comment
* Use {{codeline|@}} for any [https://www.stack.nl/~dimitri/doxygen/manual/commands.html Doxygen Special Commands]
* Use {{codeline|@}} for any [https://www.stack.nl/~dimitri/doxygen/manual/commands.html Doxygen Special Commands]
* Use as little formatting as possible.  Restrict to [https://www.stack.nl/~dimitri/doxygen/manual/markdown.html Markdown] and avoid HTML-markup.
* Use as little formatting as possible.  Restrict to [https://www.stack.nl/~dimitri/doxygen/manual/markdown.html Markdown] and avoid HTML-markup.
* Do NOT use the {{codeline|@brief}} command, the first sentence will automatically be used as the summary description.
* The first sentence should describe briefly what the function does and and with a period.
* Leave a blank line between the Doxygen comment and function definition.
* Leave a blank line between the Doxygen comment and function definition.


Line 229: Line 231:


<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
//! @brief Some cool function.
//! Does something interesting with its arguments.
//!
//!
//! Long comment with **bold** special commands.
//! Long comment with **bold** special commands.
296

edits