Erik
Erik

Reputation: 2436

How to have Doxygen only generate documentation for methods that have a comment

I would like to generate a documentation of certain parameters that the Save-Method of various classes in my program generate. For that purpose, I would like to write a comment at the top of my save method, and these comments should go to a html and PDF file.

I would like to use doxygen to parse the source- and header files of my C++ project, however by default, doxygen generates a documentation for all the members and classes in my project, which is not what I actually want.

Is it possible to customize doxygen to generate documentation for only one single method which always has the same signature and Name (int Save();), and nothing else? How can that be achieved?

Upvotes: 0

Views: 2685

Answers (1)

Phil
Phil

Reputation: 6164

Have you looked at ENABLED_SECTIONS and the cond command? Here is a snippet of the example:

/// @cond DEV
/*
 *  The implementation of the interface
 */
class Implementation : public Intf
{
  public:
    void func();

    /// @cond TEST
    void test();
    /// @endcond

    /// @cond
    /** This method is obsolete and does
     *  not show up in the documentation.
     */
    void obsolete();
    /// @endcond
};

/// @endcond

The output will be different depending on whether or not ENABLED_SECTIONS contains TEST, or DEV.

If this does not help, please clarify your question.

Upvotes: 3

Related Questions