Doxygen groups and modules index

15,675

You have to write a dedicated .h file which contains only comments. For each group you define a comment like this:

/** @defgroup FooGroup
 *
 * This module does yada yada yada
 *
 */

Then you assign definition to the group (even on different files) like this:

/** @addtogroup FooGroup */
/*@{*/

/** Summon a goat
 *
 * @param name The name of the goat;
 * @return The summoned goat;
 */
Goat summon_goat (const char *name);

...
...

/*@}*/

EDIT:

Also this is how it becomes. See the "Detailed Description"? You can also add code snippet and examples within the @verbatim and @endverbatim commands.

Share:
15,675
cppdev
Author by

cppdev

Updated on June 16, 2022

Comments

  • cppdev
    cppdev about 2 years

    I am creating a Doxygen document for my project. Recently, I have grouped related classes using \addtogroup tag. After this, I have got a module tab in my documentation. It shows all modules. I want to add some description right below module name below the module name on the same page. How can I do it using Doxygen ?

    Here's my tag

    /*! \addtogroup test test
     *  Test Testing a group in doxygen
     *  @{
     */
    
  • Adrian
    Adrian over 12 years
    "Summon a goat" cracked me up. By the way, the SourceForge link seems to be broken as of Sept 28, 2011.
  • Foogod
    Foogod over 8 years
    Note that you do not need a separate header file to do this. You can put the @defgroup in the same file as the @addtogroups, or not have a @defgroup at all and just put the text into one of the @addtogroup blocks (they work the same as @defgroup for this). The trick is that in order for text to show up at the top of the module's page (and in the module index page) it needs to be the brief description (i.e. @brief), while anything else will show up under "Detailed Description" further down.
  • Scheff's Cat
    Scheff's Cat over 3 years
    I see this answer is aged - but still was the answer to what I just googled for. Too bad that your example link seems to be rotten. Could you insert it into the page as snippet?