Doxygen是一个 C++、C、Java、Objective-C、Python、IDL(CORBA和Microsoft flavors)、Fortran、VHDL、PHP、C#和D语言的文檔生成器。可以在大多数类Unix的系统上执行,以及Mac OS X操作系统和Microsoft Windows。初始版本的Doxygen使用了一些旧版本DOC++的源代码;随后,Doxygen源代码由Dimitri van Heesch重写。
Doxygen是一个编写软件参考文檔的工具。该文檔是直接写在源代码中,因此比较容易保持更新。Doxygen可以交叉引用文檔和源代码,使文件的读者可以很容易地引用实际的源代码。
KDE 使用Doxygen作为其部分文档且KDevelop具有内置的支持。 Doxygen的发布遵守GNU General Public License,并且是*软件。
如同Javadoc,Doxygen提取文件从源文件的注解。除了Javadoc的语法,Doxygen支持Qt使用的文档标记,并可以输出成HTML、以及CHM、RTF、PDF、LaTeX、PostScript或man pages。
注释文档一般用两个星号标志:
/**
* <A short one line description>
*
* <Longer description>
* <May span multiple lines or paragraphs as needed>
*
* @param Description of method‘s or function‘s input parameter
* @param ...
* @return Description of the return value
*/
但也能和HeaderDoc一样使用*!的标志。 例如:
/*!
* <A short one line description>
*
* <Longer description>
* <May span multiple lines or paragraphs as needed>
*
* @param Description of method‘s or function‘s input parameter
* @param ...
* @return Description of the return value
*/
以下说明如何使C++的源文件产生文件。请确保参数EXTRACT_ALL在Doxyfile设置为YES。
/** * @file * @author John Doe <jdoe@example.com> * @version 1.0 * * @section LICENSE * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or(at your option)any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details at * http://www.gnu.org/copyleft/gpl.html * * @section DESCRIPTION * * The time class represents a moment of time. */ class Time { public: /** * Constructor that sets the time to a given value. * * @param timemillis Number of milliseconds * passed since Jan 1, 1970. */ Time(int timemillis){ // the code } /** * Get the current time. * * @return A time object set to the current time. */ static Time now () { // the code } };
另一种方法是首选的一些参数的记录如下。这将产生同样的文件。
/** * Constructor that sets the time to a given value. * */ Time(int timemillis ///< Number of milliseconds passed since Jan 1, 1970. ) { // the code }
安装配置:
http://blog.csdn.net/lostaway/article/details/6446786
http://blog.csdn.net/fly542/article/details/7164633
http://www.ibm.com/developerworks/cn/aix/library/au-learningdoxygen/