在doxygen中引用运算符的问题

时间:2014-04-01 08:01:37

标签: c++ doxygen

对于包含一个经典函数和一个运算符

的类Foo
bool Foo::function(int x)

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

当引用来自doxygen块的那些时,doxygen识别该函数(并添加一个链接)但不是操作符,尽管我在doxygen块中使用了相同的语法,即

 /*! 
 \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
 * 
 *  
 */

在Doxygen(http://www.doxygen.nl/manual/autolink.html)的手册页上,提供的可能性是:

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

并且它们都不适合操作员案例,这需要类似:

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

有人有线索吗? 感谢。

2 个答案:

答案 0 :(得分:1)

您可以参考here了解自动链接在doxygen中的工作原理

答案 1 :(得分:1)

我讲述了我遇到的问题。实际上我的运算符有很多参数。所以我在两条线上w and It似乎Doxygen不喜欢那样

 /*! 
 \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
 * 
 *  
 */
相关问题