开发者

How to parse a C/C++ header file by doxygen(Now to invoke doxygen's API?)

I commented my source file with doxygen sy开发者_开发知识库ntax, 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?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜