使用doxygen 生成文档时,发现不带参数的接口可以显示相关描述,而带参数的就是无法显示。
解决办法:
方法一:删除 @fn 这一行。
方法二: @fn 后面跟函数声明
例如: @fn void test(int a, int b)
解决依据:
\fn (function declaration)
Indicates that a comment block contains documentation for a function (either global or as a member of a class). This command is only needed if a comment block is not placed in front (or behind) the function declaration or definition.
If your comment block is in front of the function declaration or definition this command can (and to avoid redundancy should) be omitted.
A full function declaration including arguments should be specified after the
\fncommand on a single line, since the argument ends at the end of the line!翻译:
\fn(函数声明)
指示注释块包含函数的文档(全局或作为类的成员)。只有当注释块没有放在函数声明或定义的前面(或后面)时,才需要此命令。
如果注释块在函数声明或定义前面,则可以省略此命令(为了避免冗余,应该省略)。
包含参数的完整函数声明应该在命令之后的单行上指定,因为参数在行的末尾!
总结: 注释放函数前面时,可以不使用 @fn。 如果使用 @fn 必须放完整的函数声明
本文介绍了在使用doxygen生成文档时,不带参数的接口能显示描述但带参数的无法显示的问题。解决方法包括删除不必要的@fn行或确保@fn后紧跟完整函数声明,以避免冗余。

3798

被折叠的 条评论
为什么被折叠?



