Is there an @inheritDoc equivalent in Doxygen?

11,029

Solution 1

There's the explicit copydoc which I think is closest to an equivalent although with more flexibility it therefore requires you specify the original to copy so is a bit more awkward. It's designed to let you pull in documentation from anywhere so it needs a parameter specifying the source.

By default, the default is to inherit documentation from parent classes.

Solution 2

With INHERIT_DOCS set to YES in your Doxygen configuration file (which is actually the default), just leave your overridden members completely uncommented and Doxygen will automatically insert the documentation from the base class.

@copydoc is useful for the case where you want to inherit base class comments, but then add some subclass-specific details.

Share:
11,029

Related videos on Youtube

Roberto
Author by

Roberto

Computer Engineer, MEng.

Updated on March 25, 2020

Comments

  • Roberto
    Roberto over 4 years

    I know Javadoc will compile {@inheritDoc}, but what's the Doxygen way to do this?

  • dangerousdave
    dangerousdave almost 4 years
    How do you add the subclass-specific details?