了解doxygen的注释规范
2014-05-20 17:54
148 查看
了解了下doxygen这个神器, 怎么安装就不说了,用的是1.8.7版,还是主要在于怎么使用,刚接触也不怎么懂,看了主页http://www.stack.nl/~dimitri/doxygen/上的一些说明,头都大了,基本上都知道是这样生成文档的:
1、生成一个默认的配置文件:doxygen -g xtank.cfg.
2、按需求自定义修改这个默认生成的xtank.cfg.
3、根据配置文件生成文档: doxygen xtank.cfg
当然,前提是需要按照器规定的方法在代码中写好特定风格的注释。
这里摘抄了doxygen_manual-1.8.7.pdf中的一个比较容易理解的例子,其使用JavaDoc风格的, 有删减,
注意要在配置文件中设置JAVADOC_AUTOBRIEF项为YES.
/**
* A test class.
* A more elabore class description
*/
class Test
{
public:
/**
* An enum.
* More detailed enum description.
*/
enum TEnum
{
Tval1; /**< enum value Tval1. */
Tval2; /**< enum value Tval2. */
Tval3; /**< enum value Tval3. */
}
*enumPtr, /**< enum poniter. details. */
enumVal; /**< enum variable. details. */
/**
* A constructor.
* A more elaborate details of the constructor here.
*/
Test(void);
/**
* A deconstructor.
* A more details of deconstructor here
*/
~Test(void);
/**
* a normal member taking two arguments and returning an integer value
* @param a an integer argument.
* @param s a constant character pointer.
* @return The test result
*/
int testMe(int a, const char *s);
/**
* A pure virural member.
* @param c1 the first argument.
* @param c2 the second argument.
*/
virtual void testMeToo(char c1, char c2) = 0;
/**
* A public variable
* details here.
*/
int publicVal;
/**
* a function variable.
* Details.
*/
int (*handler)(int a, int b);
};
还需进一步了解。
1、生成一个默认的配置文件:doxygen -g xtank.cfg.
2、按需求自定义修改这个默认生成的xtank.cfg.
3、根据配置文件生成文档: doxygen xtank.cfg
当然,前提是需要按照器规定的方法在代码中写好特定风格的注释。
这里摘抄了doxygen_manual-1.8.7.pdf中的一个比较容易理解的例子,其使用JavaDoc风格的, 有删减,
注意要在配置文件中设置JAVADOC_AUTOBRIEF项为YES.
/**
* A test class.
* A more elabore class description
*/
class Test
{
public:
/**
* An enum.
* More detailed enum description.
*/
enum TEnum
{
Tval1; /**< enum value Tval1. */
Tval2; /**< enum value Tval2. */
Tval3; /**< enum value Tval3. */
}
*enumPtr, /**< enum poniter. details. */
enumVal; /**< enum variable. details. */
/**
* A constructor.
* A more elaborate details of the constructor here.
*/
Test(void);
/**
* A deconstructor.
* A more details of deconstructor here
*/
~Test(void);
/**
* a normal member taking two arguments and returning an integer value
* @param a an integer argument.
* @param s a constant character pointer.
* @return The test result
*/
int testMe(int a, const char *s);
/**
* A pure virural member.
* @param c1 the first argument.
* @param c2 the second argument.
*/
virtual void testMeToo(char c1, char c2) = 0;
/**
* A public variable
* details here.
*/
int publicVal;
/**
* a function variable.
* Details.
*/
int (*handler)(int a, int b);
};
还需进一步了解。
相关文章推荐
- [C] c99int(让VC等编译器自动兼容C99的整数类型)V1.02。源码托管到github、添加CMake编译配置文件、使用doxygen规范注释
- [C] tcharall(让所有平台支持TCHAR)v1.1。源码托管到github、添加CMake编译配置文件、使用doxygen规范注释
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- Doxygen的安装与配置及简单注释规范
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- 符合doxygen规范的文档注释
- Doxygen的安装与配置及简单注释规范
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- doxygen的文档生成,注释规范
- 符合Doxygen规范的注释宏ForVS2005
- IOS学习笔记-9Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- 按照Doxygen工具规范给程序添加注释
- Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成
- 《从零开始学Swift》学习笔记(Day 57)——Swift编码规范之注释规范: