Optionally, the comment block may also contain more detailed information about the group. This block should contain the (or \name) command and is used to specify the header of the group. Note that the members of the group should be physically inside the member group's body.īefore the opening marker of a block a separate comment block may be placed. For instance, because you feel that members of different (syntactic) types belong to the same (semantic) group.Ī member group is defined by a or a if you prefer C style comments. Doxygen already automatically groups things together on type and protection level, but maybe you feel that this is not enough or that that default grouping is wrong. a class or file) has many members, it is often desired to group them together. Example:įor the corresponding HTML documentation that is generated by doxygen. c files without having to duplicate the hierarchy exactly. h files to define the hierarchy and \weakgroup in. It was added to allow "lazy" grouping definitions: you can use commands with a higher priority in your. The \weakgroup command is exactly like \addtogroup with a lower priority. The priorities of grouping definitions are (from highest to lowest): \ingroup, \defgroup, \addtogroup, \weakgroup. To use a custom link name, you can put the name of the links in double quotes after the label, as shown by the following example This is the \ref group_label "link" to this group. The first argument of the \ref command should be group's label. Int \ref command can be used to refer to a group. * \defgroup IntVariables Global integer variablesĮxtern int \defgroup Variables Global a variable in group A */ The following example puts VarInA into group A and silently resolves the conflict for IntegerVariable by putting it into group IntVariables, because the second instance of IntegerVariable is undocumented: /** An explicit \ingroup overrides an implicit grouping definition via Conflicting grouping definitions with the same priority trigger a warning, unless one definition was for a member without any explicit documentation. Note that compound entities (like classes, files and namespaces) can be put into multiple groups, but members (like variable, functions, typedefs and enums) can only be a member of one group (this restriction is in place to avoid ambiguous linking targets in case a member is not documented in the context of its class, namespace or file, but only visible as part of a group).ĭoxygen will put members into the group whose definition has the highest "priority": e.g. * add additional members to a group that is defined in more detail elsewhere. The title of the group is optional for this command, so you can use /** \addtogroup It can be used exactly like \defgroup, but when the group has been defined already, then it silently merges the existing documentation with the new one. If you don't want doxygen to enforce unique labels, then you can use \addtogroup instead of \defgroup. You will get an error message when you use the same group label more than once. Groups themselves can also be nested using these grouping markers. The markers can be put in the documentation of the group definition or in a separate documentation block. To avoid putting \ingroup commands in the documentation for each member you can also group members together by the open marker before the group and the closing marker after the group. You can make an entity a member of a specific group by putting a \ingroup command inside its documentation block. The second argument is the name or title of the group as it should appear in the documentation. The first argument of the command is a label that should uniquely identify the group. To define a group, you should put the \defgroup command in a special comment block. Members of a group can be files, namespaces, classes, concepts, modules, functions, variables, enums, typedefs, and defines, but also other groups. You can document a group as a whole, as well as all individual members. Grouping is a way to group things together on a separate page, called a topic. For pages there is a third grouping mechanism referred to as subpaging. The second mechanism works within a member list of some compound entity, and is referred to as a 'member groups'. These groups are called 'topics' in the documentation. One mechanism works at a global level, creating a new page for each group. Doxygen has three mechanisms to group things together.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |