氧气1.8.10
在一个类中,我有一个在其中声明内部类的函数。
/*! This is a test class
*/
class TestClass {
/*! \brief A function which does something
* \param param_A this is the first parameter of doSomething function
* \param param_B this is the second parameter of doSomething function
*/
void doSomething(int param_A, int param_B) {
/*! This is an inner Test Class
*/
class InnerTestClass {
/*! \brief A constructor for InnerTestClass
* \param param_C this is the parameter for the InnerTestClass inner class constructor
*/
InnerTestClass (int param_C) {
}
}
当我为上述类生成doxygen文档时,函数doSomething的文档与内部类InnerTestClass之间会发生混淆。
没有创建名为classInnerTestClass.html的内部类文档文件。
在classTestClass.html的文档中,InnerTestClass的文档包含在该函数的文档中,如下所示:
doSomething(int param_A
int param_B
)
做某事的功能
参量
param_A这是doSomething函数的第一个参数
param_B这是doSomething函数的第二个参数
这是内部测试类
参量
param_C这是InnerTestClass内部类构造函数的参数
显示警告消息,表明未记录param_A和param_B,并且在doSomething的参数列表中未找到param_C。
最佳答案
在函数/方法中定义的结构/类被视为实现细节,无法记录(就像您无法为循环或if语句记录单个对象一样)。
考虑将doxygen作为记录公共API的工具。如果仍要显示实现,请用常规注释将其记录下来,然后在配置文件中将INLINE_SOURCES
设置为YES
。
关于c++ - Doxygen混淆了函数文档和内部类,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32497002/