Doxygen:将特定的 doxygen 定义提取到单独的文档中
Doxygen: extract specific doxygen defines into separate documentaion
我有一些带有现有 doxygen 参数的源代码(STM32 外围设备库),我的 Doxygen 可以毫无问题地构建这些参数。
对于我的项目,我想生成一个文档,其中包含每个文件中的所有函数以及我想添加到函数中的特定信息。但我想保留另一个 doxygen 配置的旧信息。
这可能吗?
我已经添加了这个进行测试:
\ifnot "SECTION_DEFINE"
<normal Doxygen Parameters from original Source Code>
\elsif "SECTION_DEFINE"
@brief Function Check TODO
\endif
有了这个我可以停用现有的文档,但我需要将这个 \ifnot \elsif \endif 写入每个函数。
我可以只声明一个标签并只生成这个特定标签的文档吗?
亲切的问候
安迪
您可以创建一个 "related page",其中只有您的附加信息将与 \xrefitem
command. As \xrefitem
will also create a special text section within your original documentation you may want to combine it with your original idea of using section labels and conditional documentation. To top this concept off, use aliases 一起显示,以使您的文档更具可读性。
考虑这个示例代码:
/** ST documentation
* foobar
* \exclusive for andi's function \endif
*/
void andreas(void);
/** ST documentation
* foobar
* \exclusive for beni's function \endif
*/
void benjamin(void);
您可以在您的 Doxyfile 中使用这个别名:exclusive=\if SECTION_DEFINE \xrefitem viparea "Exclusive" "VIPs"
.
只要 SECTION_DEFINE
未定义,"exclusive" 信息就不会包含在您的文档中。一旦定义了该部分,就会在您的 HTML documentation 中创建一个 "related page"(此处:viparea.html
),其中包含您记录的项目(此处:andreas
和 benjamin
) 以及命令后面的专用段落。结果:
我有一些带有现有 doxygen 参数的源代码(STM32 外围设备库),我的 Doxygen 可以毫无问题地构建这些参数。
对于我的项目,我想生成一个文档,其中包含每个文件中的所有函数以及我想添加到函数中的特定信息。但我想保留另一个 doxygen 配置的旧信息。
这可能吗?
我已经添加了这个进行测试:
\ifnot "SECTION_DEFINE"
<normal Doxygen Parameters from original Source Code>
\elsif "SECTION_DEFINE"
@brief Function Check TODO
\endif
有了这个我可以停用现有的文档,但我需要将这个 \ifnot \elsif \endif 写入每个函数。 我可以只声明一个标签并只生成这个特定标签的文档吗?
亲切的问候 安迪
您可以创建一个 "related page",其中只有您的附加信息将与 \xrefitem
command. As \xrefitem
will also create a special text section within your original documentation you may want to combine it with your original idea of using section labels and conditional documentation. To top this concept off, use aliases 一起显示,以使您的文档更具可读性。
考虑这个示例代码:
/** ST documentation
* foobar
* \exclusive for andi's function \endif
*/
void andreas(void);
/** ST documentation
* foobar
* \exclusive for beni's function \endif
*/
void benjamin(void);
您可以在您的 Doxyfile 中使用这个别名:exclusive=\if SECTION_DEFINE \xrefitem viparea "Exclusive" "VIPs"
.
只要 SECTION_DEFINE
未定义,"exclusive" 信息就不会包含在您的文档中。一旦定义了该部分,就会在您的 HTML documentation 中创建一个 "related page"(此处:viparea.html
),其中包含您记录的项目(此处:andreas
和 benjamin
) 以及命令后面的专用段落。结果: