Doxygen的注释规范:http://www.doxygen.nl/manual/docblocks.html
代码块的注释风格推荐下面两种:
// 中间行的开头的星号可省略.
// brief和param命令前的反斜杠\可用@代替, 两者等价.
// 简介与详述之间要空一行.
/**
* ... text ...
*/
/** \brief Brief description.
* Brief description continued.
*
* Detailed description starts here.
*/
/** \brief Brief description.
* Brief description continued.
*
* Detailed description starts here.
*
* \param var1 This is ...
* \param var2 This is ...
*/
/*!
* ... text ...
*/
/*! \brief Brief description.
* Brief description continued.
*
* Detailed description starts here.
*/
/*! \brief Brief description.
* Brief description continued.
*
* Detailed description starts here.
*
* \param var1 This is ...
* \param var2 This is ...
*/
在变量后面进行注释, 在对类, 结构体, 枚举等的数据成员进行注释时比较有用, 推荐以下风格:
int var; /*!< Detailed description after the member */
int var; /**< Detailed description after the member */
int var; //!< Detailed description after the member
//!<
// Most often one only wants to put a brief description after a member.
int var; //!< Brief description after the member