说明
Doxygen 是一个程序的文件产生工具,可将程序中的特定注释转换成为说明文件。他能将文件的注释,类的注释,函数的注释,结构体的注释,按照一定的规则,生成文档,可以支持跳转,文档格式可以生成html供线上使用,也可以转成pdf格式本地查看,非常方便。如果你做的是对外的sdk接口,可以配合jenkins等持续集成工具,自动生成文档说明。
安装
平台:Ubuntu
sudo apt-get install graphviz
sudo apt-get install doxygen
sudo apt-get install doxygen-gui
sudo apt-get install texlive-full
使用
#doxygen -h
Doxygen version 1.8.13
Copyright Dimitri van Heesch 1997-2015
You can use doxygen in a number of ways:
1) Use doxygen to generate a template configuration file:
doxygen [-s] -g [configName]
If - is used for configName doxygen will write to standard output.
2) Use doxygen to update an old configuration file:
doxygen [-s] -u [configName]
3) Use doxygen to generate documentation using an existing configuration file:
doxygen [configName]
If - is used for configName doxygen will read from standard input.
4) Use doxygen to generate a template file controlling the layout of the
generated documentation:
doxygen -l [layoutFileName.xml]
5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
RTF: doxygen -w rtf styleSheetFile
HTML: doxygen -w html headerFile footerFile styleSheetFile [configFile]
LaTeX: doxygen -w latex headerFile footerFile styleSheetFile [configFile]
6) Use doxygen to generate a rtf extensions file
RTF: doxygen -e rtf extensionsFile
If -s is specified the comments of the configuration items in the config file will be omitted.
If configName is omitted `Doxyfile' will be used as a default.
-v print version string