Exclude some classes from doxygen documentation

Viewed 24126

I am building a Qt based project, and many Qt classes are found in the target documentation.

How can I tell Doxygen to disable documentation generation for some classes? For Q.*?

3 Answers

Working under the assumption that what you have is something like this: (The question is a little unclear in this regard)

/**
 * Some documentation for class X
 */
class X: public osg::Drawable {
...
}

And your problem is that you want to include documentation for class X, but not for class osg::Drawable, the proper technique is to use EXCLUDE_SYMBOLS. For example, in the case above use

EXCLUDE_SYMBOLS = osg::Drawable

If you want to be slightly more rigorous, you can use

EXCLUDE_SYMBOLS = osg::Drawable \
                  Drawable

Wild-cards are also allowed, so this will also work

EXCLUDE_SYMBOLS = osg::*

Its not the best way but one can mark some portion of the documentation (class, members, ...) with the private. This prevents the piece of code from being included in the output documentation. (I use this to hide copy/move constructors/operators from appearing in the API documentation.)

/*!
 * \brief This is included.
 */
class API
{
public:
    /*!
     * \brief So is this.
     */
    API() noexcept;
    /// \private
    ~API() noexcept; /* But this not, though technically public. */
private:
    int m_version; /* This is not either. */
}

One should note though that this is a Doxygen extension for PHP, which according to the documentation they should not be used.

For PHP files there are a number of additional commands, that can be used inside classes to make members public, private, or protected even though the language itself doesn't support this notion.

The other option is to use the solution mouviciel provided, but it requires at least two lines.


Though not the correct answer for the detailed question it might be helpful for readers of the question title (like me). It works for classe too!

Related