dimanche 3 septembre 2023

Doxygen duplicating documentation of virtual methods [duplicate]

I have a C++ project with a base class containing a virtual method, and a derived class which implements that method. Doxygen seems to be duplicating the documentation for that method in the derived class.

I've tried researching for solutions of people having duplicate documentation problems, but I couldn't find anything quite within the same context of what I'm encountering here.

So this is the shortest example that I could come up with:

/** @brief This is the base class. */
class BaseClass
{
public:
    /** @brief Initialization method from base class. */
    virtual void Initialize();
};

/** @brief This is the derived class. */
class DerivedClass : public BaseClass
{
public:
    void Initialize() override;   // not documented in Derived class...
};

If I run Doxygen and visit the documentation for the Derived class, I get the method Initialize() being listed twice there (even though I haven't documented the method in the Derived class).

enter image description here

My expectation was that the method only got listed once, because I have only documented it in the base class. Is there something I'm missing here?

Extra information:

  • I'm using Doxygen v1.9.7.
  • I'm using a fresh standard Doxyfile, directly generated with doxygen -g and without any alterations.
  • Even if I declare the method as virtual void Initialize() or just void Initialize() in the Derived class (without using the override keyword), the result is the same - duplicate entries in the documentation.

Aucun commentaire:

Enregistrer un commentaire