Quantcast

Doxygen labels C++ interfaces (pure virtual) as abstract

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Doxygen labels C++ interfaces (pure virtual) as abstract

Vega, Luis A

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 potentially 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 labeling 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()

    {}

};


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Loading...