Doxygen:如何引用函数,但带有参数值 [英] Doxygen: How to reference a function, but with arguments values
本文介绍了Doxygen:如何引用函数,但带有参数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我生成此类的文档时:
When I generate the documentation for this class:
class MyClass
{
/** Some description
* \param inhibit some description
*/
virtual void inhibitSaving( bool inhibit = true ) = 0;
/** \return true if @ref inhibitSaving with parameter set to true has been called previously */
virtual bool isSavinginhibited() const = 0;
};
isSavingInhibited
的描述中有一个超链接 inhibitSaving
。
isSavinginhibited
's description has a hyperlink to inhibitSaving
.
但是,如果我写如下描述:
However, if I write the description as below:
/** \return true if @ref inhibitSaving(true) has been called previously */
virtual bool isSavinginhibited() const = 0;
isSavinginhibited
的描述没有链接到 inhibitSaving
。
考虑此讨论,它应该可以工作。为什么我没有超链接。我在做什么错?
Considering this discussion, it's supposed to work. Why am I not getting a hyperlink. What am I doing wrong?
推荐答案
正如ArturKink所说, inhibitSaving(true)
不是有效的类型引用,只有 inhibitSaving(bool)
是。
As commented by ArturKink, inhibitSaving(true)
is not a valid type reference, only inhibitSaving(bool)
is.
因此应创建链接由 \refhibitedSaving inhibitSaving(true)
或 \refhibitSaving inhibitSaving(true)
这篇关于Doxygen:如何引用函数,但带有参数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文