为什么 Doxygen 文档仅针对多个相邻组中的最后一个出现?

发布于 2024-10-19 01:50:42 字数 467 浏览 6 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

讽刺将军 2024-10-26 01:50:42

为此,您需要在配置中启用 DISTRIBUTE_GROUP_DOC。代码指定为:

//@{
//! Same documentation for both members. Details ...
void func1InGroup1();
void func2InGroup1();
//@}

如果您想命名分组部分:

//! @name Group name
//@{
//! Same documentation for both members. Details ...
void func1InGroup1();
void func2InGroup1();
//@}

For this to work you need to have DISTRIBUTE_GROUP_DOC on in your config. And code specified as:

//@{
//! Same documentation for both members. Details ...
void func1InGroup1();
void func2InGroup1();
//@}

And if you want to name the grouped section:

//! @name Group name
//@{
//! Same documentation for both members. Details ...
void func1InGroup1();
void func2InGroup1();
//@}
两个我 2024-10-26 01:50:42

解决了!

要为每个功能组分解的文档必须位于左大括号之前:

//! @brief Some documentation
// @{
int func1(void);
int func2(void);
// @}

//! @brief Some other documentation
// @{
int func3(void);
int func4(void);
// @}

Solved!

The documentation to be factored out for each function group must precede the opening braces:

//! @brief Some documentation
// @{
int func1(void);
int func2(void);
// @}

//! @brief Some other documentation
// @{
int func3(void);
int func4(void);
// @}
心凉 2024-10-26 01:50:42

只是想一想:Doxygen 对空白很挑剔。确保使用“//@{”而不是“// @{”。

Just a thought: Doxygen is picky when it comes to whitespace. Make sure to use '//@{' and not '// @{'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文