user1899020
user1899020

Reputation: 13575

How to group a number of methods in a class with doxygen?

Doxygen is a very good c++ code documentation tool. I am wondering if it has the feature to group a number of related methods in a class and give them a meaning comments. For example:

class A : public B
{
public:
    //// Begin group: Methods to implement class B's interface.

    //! ...
    void b1();

    //! ...
    void b1();

    //// End group

};

And the group information is shown in the doxygen generated class document. Thanks.

Upvotes: 3

Views: 2261

Answers (1)

nogard
nogard

Reputation: 9716

You can use @name tag to reach the similar functionality. Take a look at the example, that's easy.

/**
 * @name Appends data to the container.
 *
 * @param tag Name of the data entry
 * @param value Data value
 */
//@{
/**
 * @brief Documentation for this overload
 */
void append(const std::string & tag, bool value);

/**
 * @brief Documentation for this overload
 */
void append(const std::string & tag, int8_t value);

void append(const std::string & tag, int16_t value);
void append(const std::string & tag, int32_t value);
//@}

It produces the following output: enter image description here

Upvotes: 3

Related Questions