GNOME Bugzilla – Bug 336023
Redocumenting inherited members
Last modified: 2018-07-30 10:50:49 UTC
[ forwarded from http://bugs.debian.org/324117 ] I'm having trouble with redocumenting inherited members. Here is an example: // Interface for a Consumer struct Consumer { /// Consume an item virtual void consume(item) = 0; /// Consume a container of items virtual void consumeItems(items) { // Default implementation for (Items::iterator i = items.begin(); i != items.end(); i++) consume(*i); } }; // Interface for a Collection. Uses Consumer as a way to be populated. struct Collection : public Consumer { /// Retrieve an item virtual void getItem(item) = 0; } struct Storage : public Collection { void consume(item) { do something } void getItem(item) { do something } } Now, I'd like to redocument the consume and consumeItems methods in Collection, as I know more about their context and I want to show that their function is to insert items into the collection. Unfortunately, I found no way to do that to date. ----- The current version of doxygen (1.4.5) is still afflicted by this bug. Looking at my sources, it's apparent this only affects /pure virtual/ methods. Other virtual methods are correctly documented in derived classes, where the documentation is taken from the base class. This also affects the "Reimplemented in" section of the detailed method documentation. It never says a pure virtual method is reimplemented. IMO this behaviour is incorrect. You can certainly reimplement a pure virtual function (there may be a default implementation you can chain up to, even if you are forced to provide your own). And for most virtual functions, the behaviour of each reimplementation is identical to the documentated behaviour of the base class method, leading to a lot of annoying cutting and pasting, and then the effort of keeping several copies of the same text up-to-date.
This defect likely related to http://bugzilla.gnome.org/show_bug.cgi?id=344860.
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to https://github.com/doxygen/doxygen/issues All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github. Hence I am closing this GNOME Bugzilla ticket. Please use the corresponding ticket in Github instead. Thanks a lot!