3

Doxygen 是一个非常好的 c++ 代码文档工具。我想知道它是否具有将许多相关方法分组到一个类中并给它们一个有意义的注释的功能。例如:

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

    //! ...
    void b1();

    //! ...
    void b1();

    //// End group

};

并且组信息显示在 doxygen 生成的类文档中。谢谢。

4

1 回答 1

3

您可以使用@name 标签来实现类似的功能。看例子,很简单。

/**
 * @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);
//@}

它产生以下输出: 在此处输入图像描述

于 2013-08-25T20:17:53.107 回答