简体   繁体   中英

Custom Doxygen permalinks to c++ functions

We use Doxygen for documenting our C++ code and we include the Doxygen results in our Sphinx HTML documentation using the Breathe plugin. We want to jump directly to functions within the HTML documentation using named anchors in a HTML link like this:

http://path/MyClassDocumentation.html#myFunction(params)

The idea is to automatically jump to functions using their signature which we can retrieve dynamically at run time. How can we create these named anchors in our C++ Doxygen comments? Breathe creates HTML elements which address the functions using their signature and a md5 sum. Example:

<span id="my_class_my_function_1a21be2544e55395e0218006fca87a2a82"></span>

This is not helpful, because we cannot jump to these ids at run time using the signature of the function. Therefore we want to add our own named anchors which should look like this:

MyClass::MyFunc(paramList)

I tried using "\\anchor" in our comments, but it seems they are ignored. Is there a way to get named anchors which we can define within our C++ code comments? Or is there another way for achieving this?

EDIT: I think what we need is something to define custom html permalinks addressing the functions in our C++ code from within the Doxygen comments.

I have a similar problem, wanting to link to doxygen documentation for C from a docbook document.

The solution is to generate a tagfile from doxygen using the GENERATE_TAGFILE configuration parameter.

I then parse the tagfile using some custom scripts to extract the anchor value for each function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM