doxygengroup Directive¶
This directive generates the appropriate output for the contents of a doxygen group. A doxygen group can be declared with specific doxygen markup in the source comments as cover in the doxygen grouping documentation.
It takes the standard project
, path
, outline
and no-link
options
and additionally the content-only
, members
, protected-members
,
private-members
, undoc-members
and inner
options.
content-only
If this flag is specified, then the directive does not output the name of the group or the group description and instead outputs the contents of the group. This can be useful if the groups are only used for organizational purposes and not to provide additional information.
members
If specified, the public members of any classes in the group output will be displayed. Unlike the
doxygenclass
members
option, this does not optionally take a list of member names to display as this will be applied across multiple classes within the group.protected-members
If specified, the protected members of any classes in the group output will be displayed.
private-members
If specified, the private members of any classes in the group output will be displayed.
undoc-members
If specified, the undocumented members of any classes in the group output will be displayed provided the appropriate
members
orprivate-members
options are specified as well.
If you would like to always specify some combination of members
,
protected-members
, private-members
and undoc-members
then you can
use the breathe_default_members configuration
variable to set it in the conf.py
.
inner
If specified, the groups that were defined inside this group, by either defining them inside the scope of another group, or by using the Doxygen ingroup command, are also parsed and loaded.
目录
Basic Example¶
The plain doxygengroup
directive will output the group name and description
and any top level publicly visible members of the group.
.. doxygengroup:: mygroup
:project: group
It produces this output:
Content-Only Example¶
The content-only
option changes the output to only include the content of
the group and not the group name or description. So this:
.. doxygengroup:: mygroup
:project: group
:content-only:
Produces this output:
-
void groupedFunction()¶
This function is in MyGroup.
-
class GroupedClassTest¶
- #include <group.h>
first class inside of namespace
注解
As you can see from the output, section headings like ‘Functions’ are missing from the :content-only: display. This is due to an implementation detail. If post an issue on github if you’d like it addressed.
Members Example¶
The members
option changes the output to include the public members of any
classes. The output for any class in the group should be the same as if it had
be produced by the doxygenclass directive with the
members
option specified.
.. doxygengroup:: mygroup
:project: group
:members:
It produces this output:
- group mygroup
This is the first group.
Functions
-
void groupedFunction()¶
This function is in MyGroup.
-
void groupedFunction()¶
Protected Members Example¶
The protected-members
option changes the output to include the protected
members of any classes. The output for any class in the group should be the same
as if it had be produced by the doxygenclass directive
with the protected-members
option specified.
.. doxygengroup:: mygroup
:project: group
:protected-members:
It produces this output:
- group mygroup
This is the first group.
Functions
-
void groupedFunction()¶
This function is in MyGroup.
-
void groupedFunction()¶
Private-Members Example¶
The private-members
option changes the output to include the private members
of any classes. The output for any class in the group should be the same as if
it had be produced by the doxygenclass directive with the
private-members
option specified.
.. doxygengroup:: mygroup
:project: group
:private-members:
Produces this output:
- group mygroup
This is the first group.
Functions
-
void groupedFunction()¶
This function is in MyGroup.
-
void groupedFunction()¶
Undocumented Members Example¶
The undoc-members
option changes the output to include any undocumentated
members from the sections (public, protected, private) that are being displayed
for the classes in the group output.
.. doxygengroup:: mygroup
:project: group
:private-members:
:undoc-members:
Produces this output:
- group mygroup
This is the first group.
Functions
-
void groupedFunction()¶
This function is in MyGroup.
-
void groupedFunction()¶
注解
Undocumented classes are still not shown in the output due to an implementation issue. Please post an issue on github if you would like this resolved.
Inner Example¶
The inner
option changes the output to include groups that are defined
inside other groups.
.. doxygengroup:: mygroup
:project: group
:inner:
Produces this output:
Outline Example¶
This displays only the names of the members of the group and not their documentation. The other options determine which members are displayed.
.. doxygengroup:: mygroup
:project: group
:members:
:outline:
It produces this output:
Failing Example¶
This intentionally fails:
.. doxygengroup:: madeupgroup
:project: group
It produces the following warning message:
警告
Cannot find file “madeupgroup” in doxygen xml output for project “group” from directory: ../../examples/specific/group/xml/