一 Javadoc style
/**
* @brief this is a javadoc style comment1.
*/
/**
@brief this is a javadoc style comment2.
*/
/** @brief this is a javadoc style comment3.*/
class JavaDocStyle{
};
Javadoc风格最主要的特征是开始的两个*;单行多行均可,例如上面的comment1和commen3;中间的*可以省略,例如上面的comment2.
二 Qt style
/*!
* @brief this is a Qt style comment.
*/
class QtStyle{
};
区别是两个*换成了*!。
三 third style
///
/// @brief this is a third style comment1.
///
//!
//! @brief this is a third style comment2.
//!
class ThirdStyle{
};
不同风格可以混合使用,但从清晰度考虑,不推荐。
四 html效果
五 参考