2013-08-25 13 views
1

Doxygen是一个很好的C++代码文档工具。我想知道它是否具有将类中的许多相关方法进行分组并赋予其意义评论的功能。例如:如何使用Doxygen将类中的多个方法分组?

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

    //! ... 
    void b1(); 

    //! ... 
    void b1(); 

    //// End group 

}; 

而组信息显示在Doxgen生成的类文档中。谢谢。

回答

1

您可以使用@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); 
//@} 

它产生以下输出: enter image description here

相关问题