问题描述
我的代码需要一些函数指针类型,例如
My code needs some function pointer types like
/**
* \brief Callback function type "foo"
*/
typedef int (*foo)(int a, int b);
我想记录函数自变量的语义,但是\brief
语句旁边的\param[in,out]
似乎并没有添加额外的文档.
I would like to document the semantics of the function arguments, but a \param[in,out]
next to the \brief
statement does not seem to add extra documentation.
有没有办法让doxygen将参数文档添加到type-defs函数中?
Is there a way to get doxygen add parameter documentation to function type-defs?
TIA寻求任何帮助!
TIA for any help!
推荐答案
从您的问题尚不清楚,当您放置\ param时,您到底尝试了什么.
It is not clear from your question what exactly you tried when you placed \param.
以下对我有用(使用doxygen 1.8.6):
The following works for me (using doxygen 1.8.6):
/**
* \brief Callback function type "foo"
*
* A longer description of foo.
* \param a Description for a
* \param b Description for b
* \return Description for return value
*/
typedef int (*foo)(int a, int b);
在输出中,它创建简要描述和详细描述,具有参数a和b的Parameters
部分以及具有返回值描述的Returns
部分.
In the output, it creates the brief and long descriptions, a Parameters
section with parameters a and b, and a Returns
section with the description of the return value.
安迪
这篇关于Doxygen:记录函数指针类型(ANSI-C)的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!