Luis Vega - 2016-02-02

When a C++ class is defined as an interface (ie: pure virtual), Doxygen will title the class documentation as "Interface" but at the same time it will tag the title with an "abstract" label instead of "pure virtual". The methods are correctly tagged as "pure virtual".

While not a big deal, the mislabeling could potentialy cause some confusion. Since it could be a bit difficult to correctly guess when a class is pure virtual vs when the user wants it to be abstract, I suggest that when the class is documented with @interface, the label on the tittle should be set to "pure virtual" to avoid confusion.

The following sample code and documentation can used to duplicate the labling error (using v1.8.11)

/**
 * @interface PureVirtualClass PureVirtualClass.hpp "PureVirtualClass.hpp"
 * Sample pure virtual (interface) class.
 */
class PureVirtualClass
{
public:
    /**
     * Some function that does something.
     * @return void
     */
    virtual void someFunction() = 0;

    /**
     * Another function that has an input and an output parameter. And when the
     * function its done doing something it returns a status bool.
     * @param [in]  someParam   some input parameter.
     * @param [out] retParam    reference to some output parameter.
     * @return @c true if successful, otherwise @c false.
     */
    virtual bool anotherFunction( int someParam, int& retParam ) = 0;

    /**
     * Class destructor.
     */
    virtual ~PureVirtualClass()
    {}

};
 

Last edit: Luis Vega 2016-02-02