3
votes

Is it possible to order the groups (i.e. Modules) listing in Doxygen PDF output? For example if I build my current C project, the group for commands is listed in the resulting PDF before status as it follows a alphabetical ordering by default whereas I would like status to be listed before commands.

I tried changing the group name and leaving the tag name the same for the module title, but this did not seem to have any effect, e.g.

/** @defgroup g1 Status */   =   /** @defgroup status Status */

Thanks

3
Typically i handle 'ordering' problems in Doxygen by fiddling with the file order in the INPUT command - listing individual files in the order I want things listed in the document. However, groups should be file-agnostic so I don't know if that will help in this case.Cheeseminer

3 Answers

2
votes

You can set your group order in a block of @defgroup at the first of the code page or befor the first group definition. You don't need a group scope for the defgroup part.

/**
* @defgroup A_group Group of Macro A
* @defgroup B_group Group of Macro B
* @defgroup C_group Group of Functions
*/

Than define each group with @ingroup in order your code is needed.

/**
* @ingoup b_group
* @{
*/
... 
/** @} */
...
/**
* @ingroup a_group
* @{
*/
...
/** @} */
...
/**
* @ingroup c_group
* @{
*/
...
/** @} */
0
votes

I used @Cheeseminer's advice here and fiddled with the settings so that only group documentation is shown, then added the files only individually via the INPUT command, listing them in the order I would like.

Downside is that every time I add a new file to my code-base I have to remember to add it to the INPUT command :\

0
votes

Create a file that has the groups in the order you want, then put that first in the input line along with . so:

file index.c:

/** @addtogroup status
    @addtogroup commands
*/

and in the INPUT var in .doxygen

INPUT = index.c .

This will sort the items as you want, but not add any new symbols, and you can still use the default gathering of source files without worrying about order.