【发布时间】:2010-05-06 17:58:31
【问题描述】:
我从第 3 方供应商(用于嵌入式平台)处获得了一些使用全局变量(用于速度和空间优化)的 C 代码。我正在记录代码,转换为Doxygen 格式。
如何在函数文档中注明函数对全局变量和函数的要求?
Doxygen 具有用于注释参数和返回值的特殊命令,如下所述:Doxygen Special Commands。我没有看到任何全局变量的命令。
示例 C 代码:
extern unsigned char data_buffer[]; //!< Global variable.
/*! Returns the next available data byte.
* \return Next data byte.
*/
unsigned char Get_Byte(void)
{
static unsigned int index = 0;
return data_buffer[index++]; //!< Uses global variable.
}
在上面的代码中,我想添加Doxygen cmets,该函数依赖于全局变量data_buffer。
【问题讨论】:
标签: c documentation global-variables doxygen