问题
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:
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?
回答1:
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...
来源:https://stackoverflow.com/questions/33529466/doxygen-1-8-8-putting-c-constructors-public-member-functions-on-group-page