How to bind class methods in doxygen html

I have a setup where I use doxygen to describe the suite on unit tests (I use QtTest to run the tests). Test results are parsed by a small piece of Python that creates a good and accurate report. Now I would like to associate the report with each test case, i.e. Private slot method, in doxygen material. However, the bindings defined by doxygen are as follows:

<a class="anchor" id="a2a0e066d4dad8e0dff6c9231bf65fd65"></a> <!-- doxytag: member="PRadioTunerTst::scanFM" ref="a2a0e066d4dad8e0dff6c9231bf65fd65" args="()" --> 

Of course, I could parse the doxygen html and map the whole method to the reference key, but I would have a pretty comfortable read. I do not overload any case unit test methods, so listing them will not be a problem - I would just be able to select the first and only one. I would even be happy to calculate the identifier itself. I just need to know how to do this.

So basically the questions are:

  • Does anyone know how to configure doxygen to create readable anchors
  • if not, how do i calculate the hash?
+4
source share
2 answers

Instead of trying to restore the hash (which is the md5 checksum by the method definition described by doxygen, see MemberDef :: setAnchor () in the code). I would suggest letting doxygen generate the tag file (GENERATE_TAGFILE) and then parse it. A tag file is a simple XML file that has both a name and an anchor for each member.

+4
source

I also need link targets, in my case for the first docs, to point to the html created using breathing / doxygen. Here is what I did:

To better understand how doxygen creates bindings, I recompiled doxygen, with this at the end of setAnchor ():

printf("memAnchor=%s sigStr=%s\n", memAnchor.data(), sigStr.data());

which produces the output, for example:

 memAnchor=const int SomeNamespace::GetStateGetState(SomeNamespace::State *state) sigStr=f2c41a8a6a152602c92fefb80bd0862a 

I already had my function signatures, so I created lines similar to memAnchor above, and passed them through md5sum to get a hash, and then added it to a line that is common to all anchors. In my first document, I then set the type definitions:

 .. _GetState: `project0class_SomeNamespace_1f2c41a8a6a152602c92fefb80bd0862a`_ 

Not sure about the first question about readable anchors.

0
source

All Articles