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

Fix doc #509

Merged
merged 2 commits into from
Apr 18, 2020
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
3 changes: 3 additions & 0 deletions breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,9 @@ def render_signature(file_data, doxygen_target, name, kind):
# We store both the identified and appropriate title text here as we want to define the order
# here and the titles for the SectionDefTypeSubRenderer but we don't want the repetition of
# having two lists in case they fall out of sync
#
# If this list is edited, also change the sections option documentation for
# the doxygen(auto)file directive in documentation/source/autofile.rst.
sections = [
("user-defined", "User Defined"),
("public-type", "Public Types"),
Expand Down
3 changes: 3 additions & 0 deletions documentation/source/autofile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
autodoxygenfile Directive Example
=================================

For more details and directive documentation please see :ref:`file-example`,
which is very similar to this directive.

Working Example
---------------

Expand Down
68 changes: 64 additions & 4 deletions documentation/source/file.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,68 @@

.. _file-example:

doxygenfile Directive Example
=============================
doxygenfile Directive
=====================

This directive generates the appropriate output for a single source file. It
takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options
and additionally the ``sections`` options.

For the standard option refer to the documentation on the main directives page.
The directive-specific options are documented below.

``sections``
Limit the sections to render for the given source file to the given list.
Many of the names come from Doxygen and Breathe internals and may not make
sense from an external point of view. Nevertheless it is hoped this table is
useful.

.. csv-table:: Section types
:header: "Type", "Description"

"briefdescription", "Brief description"
"dcop-func", "DCOP Function"
"define", "Define"
"derivedcompoundref", "Derived compound reference"
"detaileddescription", "Detailed description"
"enum", "Enumerator"
"event", "Event"
"friend", "Friend"
"func", "Function"
"innerclass", "**Must be given to show sections inside a class**"
"innernamespace", "**Must be given to show sections inside a namespace**"
alephzero marked this conversation as resolved.
Show resolved Hide resolved
"package-attrib", "Package attribute"
"package-func", "Package function"
"package-static-attrib", "Package static attribute"
"package-static-func", "Package static function"
"package-type", "Package type"
"private-attrib", "Private attribute"
"private-func", "Private function"
"private-slot", "Private slot"
"private-static-attrib", "Private static attribute"
"private-static-func", "Private static function"
"private-type", "Private type"
"property", "Property"
"protected-attrib", "Protected attribute"
"protected-func", "Protected function"
"protected-slot", "Protected slot"
"protected-static-attrib", "Protected static attribute"
"protected-static-func", "Protected static function"
"protected-type", "Protected type"
"prototype", "Prototype"
"public-attrib", "Public attribute"
"public-func", "Public function"
"public-slot", "Public slot"
"public-static-attrib", "Public static attribute"
"public-static-func", "Public static function"
"public-type", "Public type"
"related", "Related"
"signal", "Signal"
"typedef", "Type definition"
"user-defined", "User defined"
"var", "Variable"

.. contents::

Example
-------
Expand Down Expand Up @@ -31,15 +91,15 @@ sections, in that order::

.. doxygenfile:: nutshell.h
:project: nutshell
:sections: briefdescription public-type
:sections: briefdescription innerclass public-type

It produces this output:

----

.. doxygenfile:: nutshell.h
:project: nutshell
:sections: briefdescription public-type
:sections: briefdescription innerclass public-type

Example with Nested Namespaces
------------------------------
Expand Down