Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen (1.8.8) putting C++ constructors / public member functions on group page rather than class page

Tags:

c++

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);
    ...
  }
}
/**
 * @}
 */

The following documentation is produced for the class ToyTagger:

enter image description here

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:

enter image description here

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:

enter image description here

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

like image 706
jwimberley Avatar asked Nov 04 '15 18:11

jwimberley


1 Answers

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...

like image 183
Thomas Ayoub Avatar answered Nov 03 '22 04:11

Thomas Ayoub