如何从名称中带空格的对象中@copydoc?

时间:2015-02-27 20:23:25

标签: doxygen

http://www.doxygen.nl/manual/commands.html#cmdcopydoc

在@copydoc指令中提到了不使用空格的感叹号。

但是当副本的源是一个本身包含空格的对象时,你会怎么做,例如:

class Base
{
public:
    /**
     * True if blah blah blah
     */
    virtual operator bool() const = 0;

    /**
     * Messages about any rules that were broken
     */
    virtual const std::vector<Err> & errors() const = 0;
...

class Derived : public Base
{
public:
    /*! @copydoc Base::operator bool()
     * This doesn't work.
     */
    operator bool() const;

    /*! @copydoc Base::errors()
     * This does work.
     */
    const std::vector<Err> & errors() const;
...

我也试过

/*! @copydoc SomeOtherClass::operatorbool()

/*! @copydoc SomeOtherclass::bool()

就像随机猜测一样,但都没有效果。

1 个答案:

答案 0 :(得分:0)

我设法通过如下定义虚拟方法来解决这个问题:

virtual operatorbool()const = 0;

您在派生类中也需要这个:

/*! @copydoc Base::operatorbool
 *  random info here
 */

这是一个可能的错误,也许这需要一张票,除非我错过了什么......

适用于doxygen 1.8.6