有没有办法说服 Doxygen 解析数组初始化中的文档块

发布于 2025-01-21 03:11:30 字数 613 浏览 1 评论 0原文

我想记录数组的元素,如下所示:

typedef struct Tokens
{
  const char *name;
  int value;
} Tokens;

/** @addtogroup token_reference
    @{
*/

/** @brief The set of tokens */
static Tokens tokens[] = {
  /** @par Token A 
      Stuff about A
   */
  { "A", 1 },
  /** @par Token B 
      Stuff about B
   */
  { "B", 2 }
}

/** @} */

我的 Doxyfile 设置了 EXTRACT_STATIC=YES,并且我可以在输出中看到 The set of tokens 文档,但初始化代码中没有 @par

有什么方法可以说服 Doxygen 查看初始化代码中的注释吗?这里的动机是在将新令牌添加到列表中时通过记录条目本身来保持文档最新,而不是在其他地方保留单独的文档集。

Doxygen 版本: 1.9.3

I would like to document the elements of an array like the following:

typedef struct Tokens
{
  const char *name;
  int value;
} Tokens;

/** @addtogroup token_reference
    @{
*/

/** @brief The set of tokens */
static Tokens tokens[] = {
  /** @par Token A 
      Stuff about A
   */
  { "A", 1 },
  /** @par Token B 
      Stuff about B
   */
  { "B", 2 }
}

/** @} */

My Doxyfile has EXTRACT_STATIC=YES set, and I can see the The set of tokens documentation in the output, but none of the @pars in the initializer code.

Is there any way to convince Doxygen to look inside the initializer code for comments? The motivation here is to keep the documentation up to date when new tokens are added to the list by documenting the entries themselves, rather than keeping a separate documentation set elsewhere.

Doxygen Version: 1.9.3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文