Question

For a class Foo that contains one classic function and one operator

bool Foo::function(int x)

bool Foo::operator()(int a, int b, int c, int d)

When referencing those from my doxygen block, doxygen recognizes the function (and adds a link to it) but not the operator although I use the same syntax inside my doxygen block for both, that is

 /*! 
 \file 
 *
 *   This one creates a link to the function   
 * 
 *   Foo::function(int x)
 *
 *   but this one doesn't create a link to the operator
 *   
 *   Foo::operator()(int a, int b, 
 *              int c, int d)
 *
 *   Although no error or warning is generated
 * 
 *  
 */

On the manual page of Doxygen (http://www.doxygen.nl/manual/autolink.html) the possibilities that are offered are:

<functionName>"("<argument-list>")"
<functionName>"()"
"::"<functionName>
(<className>"::")n<functionName>"("<argument-list>")"
(<className>"::")n<functionName>"("<argument-list>")"<modifiers>
(<className>"::")n<functionName>"()"
(<className>"::")n<functionName>

and there none of them really fits to the operator case, that requires something like:

(<className>"::")n<functionName>"()"("<argument-list>")"

Anyone has clue? Thanks.

Was it helpful?

Solution

I fount the problem that I had. In fact my operator has many arguments. So i worte it on two lines and It seems Doxygen didnt like that

 /*! 
 \file 
 *
 *   This one creates a link to the operator   
 * 
 *   Foo::operator()(int a, int b, int c, int d)
 *
 *   but this one doesn't create a link to the operator
 *   
 *   Foo::operator()(int a, int b, 
 *           int c, int d)
 *
 *   Although no error or warning is generated
 * 
 *  
 */

OTHER TIPS

You can refere here for how autolinks works in doxygen

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top