嵌入式C语言中的Doxygen注释模板
2015-05-31 13:56
651 查看
嵌入式C语言开发中通常使用Doxygen进行文档的生成。Doxygen支持多种格式,非常灵活,但排版不好就会显的比较杂乱,不便于阅读。下面给出一份注释模板。
一、文件注释,放于文件的开头
[cpp] view
plaincopy
/**
* @file filename
* @brief This is a brief description.
* @details This is the detail description.
* @author author
* @date date
* @version A001
* @par Copyright (c):
* XXX公司
* @par History:
* version: author, date, desc\n
*/
二、函数注释,放于函数声明前
[cpp] view
plaincopy
/**
* This is a brief description.
* This is a detail description.
* @param[in] inArgName input argument description.
* @param[out] outArgName output argument description.
* @retval OK 成功
* @retval ERROR 错误
* @par 标识符
* 保留
* @par 其它
* 无
* @par 修改日志
* XXX于201X-XX-XX创建
*/
三、数据结构注释,放于数据结构定义前
[cpp] view
plaincopy
/**
* The brief description.
* The detail description.
*/
typedef struct
{
int var1;///<Description of the member variable
}XXXX;
四、宏定义注释,放于宏定义上方或者右侧
[html] view
plaincopy
/** Description of the macro */
#define XXXX_XXX_XX 0
或者
[html] view
plaincopy
#define XXXX_XXX_XX 0 ///< Description of the macro.
五、全局和静态变量注释
[cpp] view
plaincopy
/** Description of global variable */
int g_xxx = 0;
static int s_xxx = 0; ///< Description of static variable
嵌入式C语言开发中通常使用Doxygen进行文档的生成。Doxygen支持多种格式,非常灵活,但排版不好就会显的比较杂乱,不便于阅读。下面给出一份注释模板。
一、文件注释,放于文件的开头
[cpp] view
plaincopy
/**
* @file filename
* @brief This is a brief description.
* @details This is the detail description.
* @author author
* @date date
* @version A001
* @par Copyright (c):
* XXX公司
* @par History:
* version: author, date, desc\n
*/
二、函数注释,放于函数声明前
[cpp] view
plaincopy
/**
* This is a brief description.
* This is a detail description.
* @param[in] inArgName input argument description.
* @param[out] outArgName output argument description.
* @retval OK 成功
* @retval ERROR 错误
* @par 标识符
* 保留
* @par 其它
* 无
* @par 修改日志
* XXX于201X-XX-XX创建
*/
三、数据结构注释,放于数据结构定义前
[cpp] view
plaincopy
/**
* The brief description.
* The detail description.
*/
typedef struct
{
int var1;///<Description of the member variable
}XXXX;
四、宏定义注释,放于宏定义上方或者右侧
[html] view
plaincopy
/** Description of the macro */
#define XXXX_XXX_XX 0
或者
[html] view
plaincopy
#define XXXX_XXX_XX 0 ///< Description of the macro.
五、全局和静态变量注释
[cpp] view
plaincopy
/** Description of global variable */
int g_xxx = 0;
static int s_xxx = 0; ///< Description of static variable
相关文章推荐
- Linux C函数参考手册(PDF版)
- Lua和C语言的交互详解
- Lua教程(十七):C API简介
- C#实现打造气泡屏幕保护效果
- 关于C语言中参数的传值问题
- 深入C++中API的问题详解
- 基于C语言string函数的详解
- C语言内存对齐实例详解
- C/C++数据对齐详细解析
- c语言实现的带通配符匹配算法
- C语言实现顺序表基本操作汇总
- 探讨C语言的那些小秘密之断言
- 深入探讨C语言中局部变量与全局变量在内存中的存放位置
- C语言泛型编程实例教程
- C语言中使用lex统计文本文件字符数
- 基于C语言fflush()函数的使用详解
- C 语言基础教程(我的C之旅开始了)[三]
- C语言单链队列的表示与实现实例详解
- 关于C语言除0引发的思考