Exclude some classes from doxygen documentation

前端 未结 3 1452
执念已碎
执念已碎 2020-12-31 03:57

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 clas

相关标签:
3条回答
  • 2020-12-31 04:25

    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::*
    
    0 讨论(0)
  • 2020-12-31 04:35

    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.

    0 讨论(0)
  • 2020-12-31 04:42

    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!

    0 讨论(0)
提交回复
热议问题