Doxygen:如何引用函数,但带有参数值

Doxygen: How to reference a function, but with arguments values

当我为此 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.

的超链接

但是,如果我这样写描述:

/** \return true if @ref inhibitSaving(true) has been called previously */
virtual bool isSavinginhibited() const = 0;

isSavinginhibited 的描述没有指向 inhibitSaving.

的超链接

考虑到 this discussion,它应该可以工作。为什么我没有得到超链接。我做错了什么?

正如 ArturKink 评论的那样,inhibitSaving(true) 不是有效的类型引用,只有 inhibitSaving(bool) 是。

所以 link 应该由 \ref inhibitSaving(bool) "inhibitSaving(true)"\ref inhibitSaving "inhibitSaving(true)"

创建