- 简介
- 比较Popular
- 现在还持续更新着,意味着有维护
- 开源免费
- 几个资源:
- 下载:http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc 目前最新版:1.5.7.1 (200810.5)
- GraphViz: http://www.graphviz.org/ 可用作内嵌类图绘制工具
- 基本使用
- 注释
rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cryang%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml">
- /**
- * … Comments …
- */
单行的注释为
- /** Comments */
- int iCount; /**< The total number of students */
- Doxygen命令
下面这个例子演示了如何给一个函数作注释:
- /** @brief A plus function.
- *
- * This method pluses a with b.
- * @param a The first number
- * @param b The second number
- * @return The sum result
- */
- int MyPlusFunc(int a, int b);
下面给出几个常用的Doxygen命令: rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cryang%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml">
--File
We MUST add comment at the beginning of file for the file
We SHOULD use multiple lines comment, like:
/** @file
* This file includes definition of test class. A more elaborate class description.
*
* @author Your name
*/
--Class
We MUST add comment before the class definition.
We SHOULD use multiple lines comment, like:
/**
* Brief description. Detailed description that can
* be on many lines.
*/
--Field
For comment field, you may choose add comment before or after, multiple lines or single line base on your circumstances.
char* fQuestion; ///< the question
int fAnswer; //*< the answer */
-- Method
We MUST add comment before method definition; we SHOULD NOT add comment to method declaration. That means if we declare a method in .h file and define it in .cpp file, we should not add comments in .h file for it, instead we should add comment in .cpp file.
We SHOULD use multiple lines comment, like:
/** A useful method.
*
* This method does unbelievably useful things.
* And returns exceptionally useful results.
* Use it everyday with good health.
* @param level an integer setting how useful to be
* @return Output that is extra useful
*/
void* VeryUsefulMethod(bool level);
--Commands
We recommend you use below doxygen’s commands if you need.
Item | Commands |
General | todo bug see remarks code example |
File | file date author |
Method | param exceptions return retval |
- GraphViz
GraphViz采用一种结构语言来描述网络节点之间的关系,用户只需要编辑该文件,GraphViz就会生成相应的网状图。关于GraphViz得更详细介绍及参考手册,请参阅其官方网站:http://www.graphviz.org/
安装GraphViz后,用户就可以在Doxygen Wizard中的Dot页设置相应的属性。
- 其他
-学习用Doxygen生成源代码文档 http://www.ibm.com/developerworks/cn/aix/library/au-learningdoxygen/?S_TACT=105AGX52&S_CMP=tec-csdn