【问题标题】:Doxygen confused between documentation of function and inner classDoxygen 混淆了函数文档和内部类
【发布时间】:2015-09-10 08:39:29
【问题描述】:

Doxygen 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 的文档之间出现了混淆。

  1. 没有创建名为 classInnerTestClass.html 的内部类文档文件。
  2. 在classTestClass.html的文档中,InnerTestClass的文档包含在函数的文档中,如下:

    doSomething(int param_A int param_B )

做某事的函数

参数 param_A 这是 doSomething 函数的第一个参数 param_B 这是doSomething函数的第二个参数

这是一个内部测试类

参数 param_C 这是InnerTestClass内部类构造函数的参数

  1. 显示警告消息,表明 param_A 和 param_B 未记录,并且在 doSomething 的参数列表中未找到 param_C。

【问题讨论】:

标签: c++ function doxygen inner-classes


【解决方案1】:

在函数/方法中定义的结构/类被视为实现细节,无法记录(就像您无法记录单个 for 循环或 if 语句一样)。

将 doxygen 视为记录 public API 的工具。如果您还想展示实现,请使用普通 cmets 记录并在配置文件中将 INLINE_SOURCES 设置为 YES

【讨论】:

    猜你喜欢
    • 2013-10-14
    • 2018-06-07
    • 1970-01-01
    • 2011-12-20
    • 2014-06-12
    • 1970-01-01
    • 2011-08-06
    • 2021-11-21
    • 2020-01-12
    相关资源
    最近更新 更多