如何解析 C/C++ doxygen 的头文件(现在调用 doxygen 的 API 吗?)

发布于 2024-10-31 02:36:36 字数 155 浏览 4 评论 0原文

我用 doxygen 语法注释了我的源文件,例如:

/**
 * @brief get Root tree
 */
void get() {}

现在我想通过 doxygen 的 API 获取函数的简短消息,谁可以帮助我该怎么做?

I commented my source file with doxygen syntax, example:

/**
 * @brief get Root tree
 */
void get() {}

Now I want to get the function's brief message by doxygen's API, who can help me how to do it?

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

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

发布评论

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

评论(2

一个人练习一个人 2024-11-07 02:36:36

我发现访问此类信息的最佳方法是 使用 Doxygen 生成 XML 文件,然后使用您最喜欢的 XML 解析库来访问它。

I find the best way to get access to this kind of information is to generate XML file using Doxygen and then use your favorite XML parsing library to access it.

海的爱人是光 2024-11-07 02:36:36

XML 输出是提取 doxygen 收集的信息的首选方式。

您可以使用您最喜欢的 XML 解析器或下载 doxygen 源代码包,并在 addon/doxmlparser 中查找 C++ API 来与 doxygen 的 XML 输出交互。该解析器经过优化,可以有效地处理 doxygen 生成的潜在大量 XML 输出。

作为替代方案,您还可以直接与 doxygen 的内部接口连接。有关示例,请查看源包中的 addon/doxyapp。请注意,这是一个更不稳定的接口,使用这种方法您必须遵守 GPL v2 的条款。

The XML output is the preferred way to extract information gathered by doxygen.

You can use your favorite XML parser or download doxygen source package and look in addon/doxmlparser for a C++ API to interface with doxygen's XML output. This parser is optimized to deal with the potentially large amount of XML output produced by doxygen in an efficient way.

As an alternative you can also directly interface with doxygen's internals. For an example look at addon/doxyapp in the source package. Note this is a more volatile interface and that with this approach you are bound to the terms of the GPL v2.

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