Verified Commit eda13711 authored by Marc Vef's avatar Marc Vef
Browse files

Parse doxygen private members with Exhale

parent d5471fa5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -585,12 +585,14 @@ function(sphinx_add_docs _target)

    file(APPEND "${_target_sphinx_conf}"
        "\n# Setup the exhale extension"
        "\nfrom exhale import utils"
        "\nexhale_args = {"
        "\n    'containmentFolder': '${_exhale_containment_folder}',"
        "\n    'rootFileName': '${_exhale_root_file_name}',"
        "\n    'rootFileTitle': '${_exhale_root_file_title}',"
        "\n    'doxygenStripFromPath': '${CMAKE_SOURCE_DIR}',"
        "\n    'createTreeView': True"
        "\n    'createTreeView': True,"
        "\n    'customSpecificationsMapping': utils.makeCustomSpecificationsMapping(specificationsForKind)"
        "\n}")
  endif()

+20 −0
Original line number Diff line number Diff line
@@ -84,3 +84,23 @@ html_static_path = ['_static']

# -- Extension configuration -------------------------------------------------
copybutton_prompt_text = '$ '

# -- Modify Exhale parsing behavior ------------------------------------------
def specificationsForKind(kind):
    '''
    For a given input ``kind``, return the list of reStructuredText specifications
    for the associated Breathe directive.
    Refer to https://breathe.readthedocs.io/en/latest/directives.html for
    the corresponding available doxygen directives
    '''
    # Change the defaults for .. doxygenclass:: and .. doxygenstruct::
    if kind == "class" or kind == "struct":
        return [
          ":members:",
          ":protected-members:",
          ":private-members:",
          ":undoc-members:"
        ]
    # An empty list signals to Exhale to use the defaults
    else:
        return []