【问题标题】:doxygen function parameter documentation (//!< vs @param)doxygen 函数参数文档 (//!< vs @param)
【发布时间】:2011-12-09 15:38:21
【问题描述】:

如果我对函数参数使用“成员之后”文档,例如,在每个参数之后使用//!&lt;,而不是标题中的@param,“参数”部分总是放在生成的“返回”之后输出文件。

是否可以定义顺序,使“参数”放在“返回”之前?

/**
 *****************************************************************************************
 *  @brief      Test API
 *
 *  @usage      This API can be called at any time
 *
 *  @return     0 if successful; or 1 if failed
 ****************************************************************************************/

int TestAPI(
    int argument1,       //!< first argument
    int argument2        //!< second argument
    );

【问题讨论】:

  • “会员之后”的文档记录在哪里?
  • +1,正是我要找的,我们也可以指明方向 //!

标签: doxygen


【解决方案1】:

我刚刚使用 Doxygen 1.7.5.1 试用了您的代码,并确认使用您的代码,输出中的参数列表位于 Return 的描述之后。

这很遗憾,因为//!&lt; 样式比必须用@param 重新声明所有参数的名称要好得多:

/**
 *****************************************************************************************
 *  @brief      Test API
 *
 *  @usage      This API can be called at any time
 * 
 *  @param      argument1 first argument
 *  @param      argument2 second argument
 *
 *  @return     0 if successful; or 1 if failed
 ****************************************************************************************/

int TestAPI2(
    int argument1,
    int argument2
    );

我查看了Doxygen Bugzilla bug database,看看它是否是一个相对较新的错误(然后您可以尝试恢复到较旧的安装)。

相信您已经找到Doxygen Bug 316311: 'parameter documentation after return documentation by using inline cmets',2005 年 9 月报告,尚未修复。

所以,遗憾的是,恐怕您的问题的答案是否可以定义顺序,以便将“参数”放在“返回”之前?几乎可以肯定。 p>

编辑

我刚刚向 Doxygen Bug 316311 添加了一条注释,要求将其更改为 Status=CONFIRMED。

【讨论】:

  • 在 Doxygen 1.9.1 中使用了十年,仍然是同样的问题。而且链接已经过时了
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-01-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-07-30
  • 1970-01-01
  • 2012-04-23
相关资源
最近更新 更多