为什么 Doxygen 文档仅针对多个相邻组中的最后一个出现?
我正在尝试使用 Doxygen 组同时记录几个类似的函数。我希望这些函数共享相同的文档,如此处示例所示。
// @{
//! @brief Some documentation
int func1(void);
int func2(void);
// @}
// @{
//! @brief Some other documentation
int func3(void);
int func4(void);
// @}
但是,当我运行 doxygen 时,只有第二组在 HTML 输出中显示 @brief 消息。我做错了什么,还是这是一个潜在的错误?
请注意,我不尝试嵌套组,doxygen 文档说这是不允许的。
I'm trying to document several similar functions at once using Doxygen groups. I would like the functions to share the same documentation as shown in the example here.
// @{
//! @brief Some documentation
int func1(void);
int func2(void);
// @}
// @{
//! @brief Some other documentation
int func3(void);
int func4(void);
// @}
However, when I run doxygen, only the 2nd group displays the @brief message in the HTML output. Am I doing something wrong, or is this a potential bug?
Note, I am not trying to nest groups, which the doxygen documentation says is not allowed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为此,您需要在配置中启用 DISTRIBUTE_GROUP_DOC。代码指定为:
如果您想命名分组部分:
For this to work you need to have DISTRIBUTE_GROUP_DOC on in your config. And code specified as:
And if you want to name the grouped section:
解决了!
要为每个功能组分解的文档必须位于左大括号之前:
Solved!
The documentation to be factored out for each function group must precede the opening braces:
只是想一想:Doxygen 对空白很挑剔。确保使用“//@{”而不是“// @{”。
Just a thought: Doxygen is picky when it comes to whitespace. Make sure to use '//@{' and not '// @{'.