c - 使用 doxygen 文件头作为模块描述

标签 c documentation grouping doxygen

我想知道是否有可能将 doxygen 文件头描述也用于模块描述。

/**
   \file               
   \brief         Some brief info
   \details       more Details
*/
/**
   \defgroup Views
   \brief (Same as header doxy)
   \details (Same as header doxy)
*/

为了避免冗余,我不会复制文本。如果我将 defgroup 移动到文件顶部,我只会得到模块中提到的文件名,而不是描述。我已经尝试了一些组合,但从未实现我的目标。详细和简要文本位于模块文档或文件文档中。有人知道如何重用文本吗?

非常感谢,

强尼

最佳答案

我自己找到了解决方案。 您可以使用 doxy 命令@copydoc 来复制文档。

我的 test.h 代码如下所示:

/**
   \file          test.h
   \brief         Some brief info
   \details       more Details
*/
/**
   \defgroup Views
   @copydoc view.h
*/

关于c - 使用 doxygen 文件头作为模块描述,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38343282/

相关文章:

c - 使用 glib 时如何打印 guint64 值?

c - 在 C 中使用指针对字符串数组进行排序

PHP 注释格式 : auto generated or User created?

python - 在 Pandas/Numpy 中,如何使用 2 个不同的列在每个 block 内实现滚动功能?

postgresql - 使用 distinct on 分组时无法正确排序结果

c - malloc 一个 char[][]

iphone - 在 objective-c 中使用 c 库

php - 在为文档编写注释头时,如何指定该函数返回另一个函数?

node.js - 如何访问 Node 模块文档 - eslint

Python:具有最常见条目的数据子集