Doxygen(1.8.8)将C ++构造函数/公共成员函数放在组页面而不是类页面上 [英] Doxygen (1.8.8) putting C++ constructors / public member functions on group page rather than class page

查看:54
本文介绍了Doxygen(1.8.8)将C ++构造函数/公共成员函数放在组页面而不是类页面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Doxygen记录一些代码.我有一个称为Doxygen组的库,并且在单独的头文件中有许多类.许多构造函数在类页面上显示为公共成员函数,但它们的文档显示在组页面上,而不是在构造函数中.类页面上的析构函数部分.有些不是;我还没有完全弄清楚模式.

I am trying to document some of my code with Doxygen. I have a library which I'm calling a Doxygen group, and many classes in separate header files. A number of the constructors are shown as public member functions on the class pages, but their documentation is shown on the group page rather than in the Constructors && Destructors section on the class page. Some are not; I haven't exactly figured out the pattern yet.

这里是一个失败的地方:

Here is one that fails:

/**
 * @addtogroup gr_espresso
 * @{
 */

/**
 * @file ToyTagger.hh
 */
...
namespace Espresso {
  ...
  /**
   * @class ToyTagger
   * @brief Fake tagging algorithm
   * @details ...
   *
   */
  class ToyTagger {
  public:

    /**
     * @brief Simple constructor.
     * @details ...
     */
    ToyTagger(CalibrationMode _mode, const Distribution& _pdf, const Calibration* _smear_cal = nullptr);
    ...
  }
}
/**
 * @}
 */

以下是针对ToyTagger类的文档:

The following documentation is produced for the class ToyTagger:

上面以伪代码显示的构造函数在公共成员函数"下列出,但未在构造函数&"下列出.析构函数文档.而是,更多信息"链接指向组gr_espresso的页面.对于另一个构造函数,以及三个成员函数之一,都是相同的:

The constructor shown above in pseudocode is listed under Public Member Functions, but not under Constructors & Destructor documentation. Instead, the "More info" link leads to the page for the group gr_espresso. The same thing is true for another constructor, and also for one of the three member functions:

我没有显示第二个构造函数或三个成员函数的代码,但是没有明显的区别.

I haven't shown the code for the second constructor or three member functions, but there is no apparent difference.

另一方面,这是成功的地方:

On the other hand, here is one that succeeds:

/**
 * @addtogroup gr_espresso
 * @{
 */

/**
 * @file StandardCalibration.hh
 */
...
namespace Espresso
{
  ...
  class StandardCalibration : public Calibration {
  public:
   /**
    * @brief Default constructor
    * @details Simple constructor that creates a trivial calibration
    * where \f$\omega(\eta) = \eta\f$
    */
    StandardCalibration();
    ...
  }
}

/**
 * @}
 */

这将生成我期望的文档:

This generates the documentation I would expect:

有人知道这是怎么回事吗?我是否做错了导致这种(显然)不可预测的行为?

Does anyone know what's going on here? Am I doing something wrong that leads to such (apparently) unpredictable behavior?

推荐答案

您应该尝试生成 MCVE 来跟踪问题

You should try to produce an MCVE to track the issue.

此外,尝试检查将哪个文件添加到哪个组:有时可能会导致奇怪的行为……

Also, try to check what file you add to which group: it may leads to weird behavior sometimes...

这篇关于Doxygen(1.8.8)将C ++构造函数/公共成员函数放在组页面而不是类页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆