Problem

The Doxygen-generated documentation for a C++ class is missing. Where is it?

Solution

Answer:

Under a certain set of conditions, it is extremely possible Doxygen will not generate any documentation for a C++ class. This happens if:

  1. The class is created by using a typedef. This is commonly done in the ACS BACI module where classes are created by using a typedef in conjunction with another class which has template parameters.
  2. The header file in which this typedef is defined does not utilize the file tag.

Even if the file tag is used correctly, the documentation Doxygen produces for the class is quite hard to find to say the least. In as such, ACS uses the defgroup tag provided by Doxygen on the typedef which in turn places a link to the newly created class in modules.html (linked to from main.html). For example, say you have a header file which includes the following:

/** 
 * @file 
 * Header file BACI.
 */

//...

/**
 * The BACICallbackTable class is a templated typedef so there is no actual inline doc generated for it per-se.
 */
typedef Registrar<int, BACICallback*> BACICallbackTable;

Doxygen generates documentation for this in which you must know the name of the file the typedef is defined in (in this case baci.h). This is completely unacceptable. To make this more developer-friendly, the defgroup tag is used:

/** 
 * @file 
 * Header file BACI.
 */

//...

/** @defgroup BACICallbackTableTemplate BACICallbackTable Class
 * The BACICallbackTable class is a templated typedef so there is no actual inline doc generated for it per-se.
 * @{
 * Callback table
 */
typedef Registrar<int, BACICallback*> BACICallbackTable;
/** @} */

which produces an HTML file named BACICallbackTableTemplate.html and this file includes Doxygen documentation on everything between the first "@{" encountered and the closing "@}". Please ensure the name you give immediately after the defgroup tag does not conflict with other names defined in your header files. Also, the title ("BACICallbackTable Class" in this case) should be unique as well as this will be listed in modules.html.

For further information on use of any Doxygen tags discussed here, please consult the Doxygen tutorial itself: http://www.stack.nl/~dimitri/doxygen/download.html#latestman

-- DavidFugate - 10 Jan 2005