23

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 3

28

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::*
Sign up to request clarification or add additional context in comments.

2 Comments

I am working with c#, and I wanted to exclude one class "LogHandler". no combination worked for me. I tried "LogHandler", "LogHandler", "Fullnamespace.LogHandler", "Fullnamespace::LogHandler" .. nothing works! .. im giving up and using a work around of excluding files
I am also working with C# and Namespace::Subnamespace::*ClassSuffix worked for me. I watched the output produced by doxygen, and noticed it referencing my classes in this manner, so I used that syntax for the exclusion.
12

If \internal tag does not work, you can try \cond ... \endcond tags for marking a portion of code to be hidden from Doxygen.

EDIT

If you want to exclude specific files, you can use EXCLUDE_PATTERNS variable in Doxyfile configuration file.

1 Comment

no, that is not my problem. My problem is that my functions use QString, and doxygen tries to find documentation about QString. How can I prevent from Doxygen to document classes "I did not explicitly wrote in my project"
2

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!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.