氧气:提取特定的氧气定义到单独的文档中 [英] Doxygen: extract specific doxygen defines into separate documentaion

查看:118
本文介绍了氧气:提取特定的氧气定义到单独的文档中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些带有现有doxygen参数的源代码(STM32外设库),我的Doxygen可以毫无问题地构建。

I have some source code (STM32 Peripherial Lib) with existing doxygen parameters which my Doxygen Builds without Problems.

对于我的项目,我想生成一个文档,其中包含每个文件中的所有功能以及要添加到功能中的特定信息。但是我想保留旧的信息以用于其他的氧气配置。

For my project I want to generate a document with all functions in each file and a specific information which I want to add to the functions. But I want to keep the old informations for another doxygen configuration.

有可能吗?

我已经添加了

\ifnot SECTION_DEFINE
<来自原始源代码的正常Doxygen参数>
\elsif SECTION_DEFINE
@brief函数检查TODO
\endif

使用此功能我可以停用现有文档,但是我需要将此ififnot elsif endif写入每个函数。
我可以只声明一个标签并仅生成该特定标签的文档吗?

With this I could deactivate the existing documentation, but I need to write this \ifnot \elsif \endif to every function. Can I just declare a Tag and only generate the documentation for this specific tag?

亲切的问候
Andi

Kind regards Andi

推荐答案

您可以创建一个相关页面,其中只有您的其他信息才会显示在 \xrefitem 命令。由于 \xrefitem 还将在原始文档中创建一个特殊的文本部分,因此您可能希望将其与使用部分标签和条件文档。要使此概念更重要,请使用别名,以使文档更具可读性

You may create a "related page" where only your additional information will be displayed with the \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 in order to make your documentation more readable.

请考虑以下示例代码:

/** 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专有 VIP

You may use this alias in your Doxyfile: exclusive=\if SECTION_DEFINE \xrefitem viparea "Exclusive" "VIPs".

只要 SECTION_DEFINE 未定义,专有信息将不包含在您的文档中。一旦定义了此部分,便会在您的此处: viparea.html )。 ://www.doxygen.nl/manual/config.html#cfg_generate_html rel = nofollow noreferrer>包含您所记录项目的HTML文档此处: andreas 和 benjamin ),并在命令后面加上专有段落。结果:

As long as SECTION_DEFINE is not defined, the "exclusive" information will not be included in your documentation. As soon as this section is defined, a "related page" (here: viparea.html) is created in your HTML documentation containing your documented items (here: andreas and benjamin) with the exclusive paragraph behind the command. The result:

这篇关于氧气:提取特定的氧气定义到单独的文档中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆