Doxygen Getting Started

简单上手

1.安装
$brew install doxygen

2.生成配置文件
$doxygen -g [filename]

3.运行
$doxygen [configfile]
默认会生成html和latex

注释

类或者函数之前

1
2
3
4
5
/** \brief some brief description
* brief description continued
*
* Detailed description
*/

一般函数或者成员变量

1
2
/// get name of node
std::string name() const;

1.希望有brief
一行

1
2
/// get name of node
std::string name() const;

2.没有brief,有Detailed description
两行以上

1
2
3
/// get name of node
/// \return std::string
std::string name() const;

3.希望既有brief,又有detailed description
隔开的///

1
2
3
4
/// brief description

/// \return std::string
std::string name() const;

多行注释

1
2
3
4
5
6
7
/**
* \brief brief description
*
* detailed desc start
* here
*/
std::string name() const;

单行注释加多行注释

1
2
3
4
5
6
/// brief description
/** detailed description start
* here, like
*\return std::string
*/
std::string name() const;