Debian Codegraph @

documentation/source/group.rst

raw
1
2 .. _group-example:
3
4 doxygengroup Directive
5 ======================
6
7 This directive generates the appropriate output for the contents of a doxygen
8 group. A doxygen group can be declared with specific doxygen markup in the
9 source comments as cover in the `doxygen grouping documentation`_.
10
11 It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options
12 and additionally the ``content-only``, ``desc-only``, ``members``,
13 ``protected-members``, ``private-members``, ``undoc-members`` and ``inner``
14 options.
15
16 ``content-only``
17 If this flag is specified, then the directive does not output the name of the
18 group or the group description and instead outputs the contents of the group.
19 This can be useful if the groups are only used for organizational purposes
20 and not to provide additional information.
21
22 ``desc-only``
23 If specified, only the description and name of the group will be
24 displayed.
25
26 ``members``
27 If specified, the public members of any classes in the group output will be
28 displayed. Unlike the ``doxygenclass`` ``members`` option, this does not
29 optionally take a list of member names to display as this will be applied
30 across multiple classes within the group.
31
32 ``protected-members``
33 If specified, the protected members of any classes in the group output will
34 be displayed.
35
36 ``private-members``
37 If specified, the private members of any classes in the group output will be
38 displayed.
39
40 ``undoc-members``
41 If specified, the undocumented members of any classes in the group output
42 will be displayed provided the appropriate ``members`` or ``private-members``
43 options are specified as well.
44
45 If you would like to always specify some combination of ``members``,
46 ``protected-members``, ``private-members`` and ``undoc-members`` then you can
47 use the :confval:`breathe_default_members` configuration
48 variable to set it in the ``conf.py``.
49
50 ``inner``
51 If specified, the groups that were defined inside this group, by either
52 defining them inside the scope of another group, or by using the Doxygen
53 \ingroup command, are also parsed and loaded.
54
55 .. _doxygen grouping documentation: https://www.doxygen.nl/manual/grouping.html
56
57
58
59 Basic Example
60 -------------
61
62 .. cpp:namespace:: @ex_group_basic
63
64 The plain ``doxygengroup`` directive will output the group name and description
65 and any top level publicly visible members of the group.
66
67 .. code-block:: rst
68
69 .. doxygengroup:: mygroup
70 :project: group
71
72 It produces this output:
73
74 .. doxygengroup:: mygroup
75 :project: group
76
77 Content-Only Example
78 --------------------
79
80 .. cpp:namespace:: @ex_group_content_only
81
82 The ``content-only`` option changes the output to only include the content of
83 the group and not the group name or description. So this:
84
85 .. code-block:: rst
86
87 .. doxygengroup:: mygroup
88 :project: group
89 :content-only:
90
91 Produces this output:
92
93 .. doxygengroup:: mygroup
94 :project: group
95 :content-only:
96 :no-link:
97
98 .. note::
99
100 As you can see from the output, section headings like 'Functions' are missing
101 from the ``:content-only:`` display. This is due to an implementation detail. If
102 post an issue on github if you'd like it addressed.
103
104
105 Members Example
106 ---------------
107
108 .. cpp:namespace:: @ex_group_members
109
110 The ``members`` option changes the output to include the public members of any
111 classes. The output for any class in the group should be the same as if it had
112 be produced by the :ref:`doxygenclass directive <class-example>` with the
113 ``members`` option specified.
114
115 .. code-block:: rst
116
117 .. doxygengroup:: mygroup
118 :project: group
119 :members:
120
121 It produces this output:
122
123 .. doxygengroup:: mygroup
124 :project: group
125 :members:
126 :no-link:
127
128 Protected Members Example
129 -------------------------
130
131 .. cpp:namespace:: @ex_group_members_protected
132
133 The ``protected-members`` option changes the output to include the protected
134 members of any classes. The output for any class in the group should be the same
135 as if it had be produced by the :ref:`doxygenclass directive <class-example>`
136 with the ``protected-members`` option specified.
137
138 .. code-block:: rst
139
140 .. doxygengroup:: mygroup
141 :project: group
142 :protected-members:
143
144 It produces this output:
145
146 .. doxygengroup:: mygroup
147 :project: group
148 :protected-members:
149 :no-link:
150
151 Private-Members Example
152 -----------------------
153
154 .. cpp:namespace:: @ex_group_members_private
155
156 The ``private-members`` option changes the output to include the private members
157 of any classes. The output for any class in the group should be the same as if
158 it had be produced by the :ref:`doxygenclass directive <class-example>` with the
159 ``private-members`` option specified.
160
161 .. code-block:: rst
162
163 .. doxygengroup:: mygroup
164 :project: group
165 :private-members:
166
167 Produces this output:
168
169 .. doxygengroup:: mygroup
170 :project: group
171 :private-members:
172 :no-link:
173
174 Undocumented Members Example
175 ----------------------------
176
177 .. cpp:namespace:: @ex_group_members_undocumented
178
179 The ``undoc-members`` option changes the output to include any undocumentated
180 members from the sections (public, protected, private) that are being displayed
181 for the classes in the group output.
182
183 .. code-block:: rst
184
185 .. doxygengroup:: mygroup
186 :project: group
187 :private-members:
188 :undoc-members:
189
190 Produces this output:
191
192 .. doxygengroup:: mygroup
193 :project: group
194 :private-members:
195 :undoc-members:
196 :no-link:
197
198 .. note::
199
200 Undocumented classes are still not shown in the output due to an implementation
201 issue. Please post an issue on github if you would like this resolved.
202
203
204 Inner Example
205 -------------
206
207 .. cpp:namespace:: @ex_group_inner
208
209 The ``inner`` option changes the output to include groups that are defined
210 inside other groups.
211
212 .. code-block:: rst
213
214 .. doxygengroup:: mygroup
215 :project: group
216 :inner:
217
218 Produces this output:
219
220 .. doxygengroup:: mygroup
221 :project: group
222 :inner:
223 :no-link:
224
225 Outline Example
226 ---------------
227
228 .. cpp:namespace:: @ex_group_outline
229
230 This displays only the names of the members of the group and not their
231 documentation. The other options determine which members are displayed.
232
233 .. code-block:: rst
234
235 .. doxygengroup:: mygroup
236 :project: group
237 :members:
238 :outline:
239
240 It produces this output:
241
242 .. doxygengroup:: mygroup
243 :project: group
244 :members:
245 :outline:
246 :no-link:
247
248 Failing Example
249 ---------------
250
251 .. cpp:namespace:: @ex_group_failing
252
253 This intentionally fails:
254
255 .. code-block:: rst
256
257 .. doxygengroup:: madeupgroup
258 :project: group
259
260 It produces the following warning message:
261
262 .. warning::
263 Cannot find file "madeupgroup" in doxygen xml output for project
264 "group" from directory: ../../examples/specific/group/xml/