From 497e6a820f74a3ba45f21691b3b731015f4c0010 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 13 Sep 2018 18:44:43 +0200 Subject: [PATCH] doxygen: ignore private non-virtual functions in user-defined groups. Only documented virtual private functions are shown. --- doxygen/dox2html5.py | 5 +++++ doxygen/test/compound_listing/Directory/Sub/Class.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index c3d68f50..0fac50f1 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -2473,6 +2473,11 @@ def parse_xml(state: State, xml: str): list += [('typedef', typedef)] if typedef.has_details: compound.has_typedef_details = True elif memberdef.attrib['kind'] == 'function': + # Gather only private functions that are virtual and + # documented + if memberdef.attrib['prot'] == 'private' and (memberdef.attrib['virt'] == 'non-virtual' or (not memberdef.find('briefdescription').text and not memberdef.find('detaileddescription').text)): + continue + func = parse_func(state, memberdef) if func: list += [('func', func)] diff --git a/doxygen/test/compound_listing/Directory/Sub/Class.h b/doxygen/test/compound_listing/Directory/Sub/Class.h index 9440e57f..7b12ba85 100644 --- a/doxygen/test/compound_listing/Directory/Sub/Class.h +++ b/doxygen/test/compound_listing/Directory/Sub/Class.h @@ -110,6 +110,9 @@ class Class { /** @brief Private virtual function in a group */ virtual int doStuff() = 0; + /** @brief Private non-virtual function in a group shouldn't appear in the docs */ + int doStuffIgnored(); + /*@}*/ /** @brief This shouldn't appear in the docs */ -- 2.30.2