Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds argument to doxygengroup to display just the description. #718

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions breathe/directives/content_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class _DoxygenContentBlockDirective(BaseDirective):
"private-members": flag,
"undoc-members": flag,
"no-link": flag,
"desc-only": flag,
}
has_content = False

Expand Down
3 changes: 3 additions & 0 deletions breathe/renderer/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ def create_render_filter(self, kind: str, options: Dict[str, Any]) -> Filter:
if "members" in filter_options:
filter_options["members"] = ""

if "desc-only" in filter_options:
return self._create_description_filter(True, "compounddef", options)

node = Node()
grandparent = Ancestor(2)
has_grandparent = HasAncestorFilter(2)
Expand Down
10 changes: 6 additions & 4 deletions documentation/source/directives.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,16 @@ group. A doxygen group can be declared with specific doxygen markup in the
source comments as covered 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`` and ``undoc-members`` options.
and additionally the ``content-only``, ``desc-only``, ``members``,
``protected-members``, ``private-members`` and ``undoc-members`` options.

::

.. doxygengroup:: <group name>
:project: ...
:path: ...
:content-only:
:desc-only:
:outline:
:members:
:protected-members:
Expand Down Expand Up @@ -307,8 +308,8 @@ doxygennamespace
This directive generates the appropriate output for the contents of a namespace.

It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options
and additionally the ``content-only``, ``members``, ``protected-members``,
``private-members`` and ``undoc-members`` options.
and additionally the ``content-only``, ``desc-only``, ``members``,
``protected-members``, ``private-members`` and ``undoc-members`` options.

To reference a nested namespace, the full namespaced path must be provided, e.g.
``foo::bar`` for the ``bar`` namespace inside the ``foo`` namespace.
Expand All @@ -319,6 +320,7 @@ To reference a nested namespace, the full namespaced path must be provided, e.g.
:project: ...
:path: ...
:content-only:
:desc-only:
:outline:
:members:
:protected-members:
Expand Down
9 changes: 7 additions & 2 deletions documentation/source/group.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ 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.
and additionally the ``content-only``, ``desc-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.

``desc-only``
If specified, only the description and name of the group will be
displayed.

``members``
If specified, the public members of any classes in the group output will be
displayed. Unlike the ``doxygenclass`` ``members`` option, this does not
Expand Down
8 changes: 6 additions & 2 deletions documentation/source/namespace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ This directive generates the appropriate output for the contents of a
namespace.

It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options
and additionally the ``content-only``, ``members``, ``protected-members``,
``private-members`` and ``undoc-members`` options.
and additionally the ``content-only``, ``desc-only``, ``members``,
``protected-members``, ``private-members`` and ``undoc-members`` options.

``content-only``
If this flag is specified, then the directive does not output the name of the
namespace or the namespace description and instead outputs the contents of
the namespace. This can be useful for structuring your documentation but
leaving out the namespace declaration itself which is often undocumented.

``desc-only``
If specified, only the description and name of the namespace will be
displayed.

``members``
If specified, the public members of any classes in the namespace output will be
displayed. Unlike the ``doxygenclass`` ``members`` option, this does not
Expand Down