Doxygen可以生成两种格式的代码注释文档
(1)html
(2)latex
本人目前只使用过html格式的,具体操作步骤如下:
1、下载Doxygen工具
2、工具的使用
运行后,在doxygen储存位置下就会出现两个文件夹,点击html文件夹,用浏览器打开任意文件,即可看到标识过的代码。
3、注释命令
命令 | 字段名 | 语法 |
---|---|---|
@file | 文件名 | file [< name >] |
@brief | 简介 | brief { brief description } |
@author | 作者 | author { list of authors } |
@mainpage | 主页信息 | mainpage [(title)] |
@date | 年-月-日 | date { date description } |
@author | 版本号 | version { version number } |
@copyright | 版权 | copyright { copyright description } |
@param | 参数 | param [(dir)] < parameter-name> { parameter description } |
@return | 返回 | return { description of the return value } |
@retval | 返回值 | retval { description } |
@bug | 漏洞 | bug { bug description } |
@details | 细节 | details { detailed description } |
@pre | 前提条件 | pre { description of the precondition } |
@see | 参考 | see { references } |
@link | 连接(与@see类库,{@link http://www.google.com}) | link < link-object> |
@throw | 异常描述 | throw < exception-object> { exception description } |
@todo | 待处理 | todo { paragraph describing what is to be done } |
@warning | 警告信息 | warning { warning message } |
@deprecated | 弃用说明。可用于描述替代方案,预期寿命等 | deprecated { description } |
@example | 弃用说明。可用于描述替代方案,预期寿命等 | deprecated { description } |