Doxygen 参数警告和过载

Doxygen 参数警告和过载,doxygen,Doxygen,我想使用@重载特殊命令,并将WARN_NO_PARAMDOC Doxyfile参数设置为YES,但是当我尝试时,我从所有重载函数中得到警告,这些参数没有记录在案。@重载标记的工作原理与生成的文档中的公告相同,只是带有警告。我是否误解了@overload命令的意图 具体来说,导致问题的代码段如下所示: class ExampleClass { public: /// Test Function /// @details Details on the test function API

我想使用@重载特殊命令,并将WARN_NO_PARAMDOC Doxyfile参数设置为YES,但是当我尝试时,我从所有重载函数中得到警告,这些参数没有记录在案。@重载标记的工作原理与生成的文档中的公告相同,只是带有警告。我是否误解了@overload命令的意图

具体来说,导致问题的代码段如下所示:

class ExampleClass {
public:
  /// Test Function
  /// @details Details on the test function API
  /// @param[out]    output Output parameter, by pointer
  /// @param[out]    optionalOutput
  ///                Output parameter, by pointer, nullptr if not there
  /// @param[in,out] mixed  Mixed use parameter, by pointer
  /// @param[in]     input  Input parameter, by reference
  /// @param[in]     defaultParam  Default input parameter
  /// @returns       Return new value
  int testFunction(ExampleClass* output, ExampleClass* optionalOutput,
                   ExampleClass* mixed, 
                   const ExampleClass& input, int defaultParam=1);

  /// @overload 
  int testFunction(ExampleClass* output, 
                   ExampleClass* mixed, 
                   const ExampleClass& input, int defaultParam=1) {
    return testFunction(output, nullptr, mixed, input, defaultParam);
  }
};
产生的警告如下所示:

example_class.h:99: warning: parameters of member ExampleClass::testFunction are not (all) documented
example_class.h:99: warning: return type of member ExampleClass::testFunction is not documented
我使用的是Ubuntu 16.04下的Doxygen版本1.8.11

我是否误解了@overload命令的意图

这些警告是由于
WARN_NO_PARAMDOC
导致的,只要没有记录参数和返回值,这些警告就会发出吠声。它不会忽略未记录的参数和重载函数的返回值,重载函数可能会记录在前面的注释块中

@重载
的目的是显示占位符描述,并确保重载函数的函数描述分组在一起。以下几点可以更好地证明这一点:

class ExampleClass {
public:
  /// Test Function
  /// @details Details on the test function API
  /// @param[out]    output Output parameter, by pointer
  /// @param[out]    optionalOutput
  ///                Output parameter, by pointer, nullptr if not there
  /// @param[in,out] mixed  Mixed use parameter, by pointer
  /// @param[in]     input  Input parameter, by reference
  /// @param[in]     defaultParam  Default input parameter
  /// @return       Return new value
  int testFunction(ExampleClass* output, ExampleClass* optionalOutput,
                   ExampleClass* mixed,
                   const ExampleClass& input, int defaultParam=1);

  /// Another function
  /// @details some stuff
  /// @param[out]    output Output parameter, by pointer
  void someOther(ExampleClass* output );


  /// @overload
  /// @param[out]    output Output parameter, by pointer
  /// @param[in,out] mixed  Mixed use parameter, by pointer
  /// @param[in]     input  Input parameter, by reference
  /// @param[in]     defaultParam  Default input parameter
  /// @return       Return new value
  int testFunction(ExampleClass* output,
                   ExampleClass* mixed,
                   const ExampleClass& input, int defaultParam=1);

  /// @overload
  /// @details some stuff
  void someOther();    
};

尽管
testFunction
somether
函数重载是相互交织的,但它们在生成的文档中被分组在一起。

。谢谢你的澄清