diff --git a/c/apidoc/Doxyfile b/c/apidoc/Doxyfile index c291a91fc0..f7d8d2562b 100644 --- a/c/apidoc/Doxyfile +++ b/c/apidoc/Doxyfile @@ -500,7 +500,7 @@ EXTRACT_ALL = NO # be included in the documentation. # The default value is: NO. -EXTRACT_PRIVATE = NO +EXTRACT_PRIVATE = YES # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. diff --git a/docs/source/ext/doxygen_inventory.py b/docs/source/ext/doxygen_inventory.py index a86a179e66..3e969cadba 100644 --- a/docs/source/ext/doxygen_inventory.py +++ b/docs/source/ext/doxygen_inventory.py @@ -55,16 +55,19 @@ def scrape_links(item_id_to_url, root): if kind == "dir": # Ignore, this is generated for a directory continue - elif kind in ("file", "group", "struct"): + elif kind in ("class", "file", "group", "struct"): + outer_domain = "c" if kind == "file": name = compounddef.find("compoundname").text file_id = compounddef.attrib["id"] yield ("std", name, "doc", "", f"{file_id}.html") - elif kind == "struct": + elif kind in {"class", "struct"}: name = compounddef.find("compoundname").text anchor = compounddef.attrib["id"] url = item_id_to_url[anchor] - yield ("c", name, "struct", anchor, url) + if kind == "class" or "::" in name: + outer_domain = "cpp" + yield (outer_domain, name, kind, anchor, url) for memberdef in compounddef.findall(".//memberdef"): member_kind = memberdef.attrib.get("kind") @@ -73,21 +76,27 @@ def scrape_links(item_id_to_url, root): name = memberdef.find("name").text typ = "macro" elif member_kind == "function": - domain = "c" - name = memberdef.find("name").text + domain = outer_domain + qualified = memberdef.find("qualifiedname") + if qualified is not None: + name = qualified.text + else: + name = memberdef.find("name").text typ = "function" elif member_kind == "typedef": domain = "c" name = memberdef.find("name").text typ = "type" elif member_kind == "variable": - domain = "c" + domain = outer_domain name = memberdef.find("qualifiedname").text typ = "member" elif member_kind == "enum": domain = "c" name = memberdef.find("name").text typ = "enum" + elif member_kind == "friend": + continue else: raise NotImplementedError( f" not supported" @@ -124,6 +133,7 @@ def make_fake_domains( item_id_to_url = {} html_name = re.compile(r'name="([^\"]+)"') for index in html_root.rglob("*.html"): + item_id_to_url[index.stem] = str(index.relative_to(html_root)) with index.open() as source: matches = html_name.findall(source.read()) for m in matches: