List of functions in the ude.parsers.doxygen_base namespace.

Entity NameDescription
_resolve_accessNarrows a raw Doxygen prot attribute value to the access Literal MethodModel/VariableModel/ConstantModel declare – real Doxygen XML only ever emits one of these four values (or omits the attribute), but that isn’t something a bare .get() call lets mypy verify on its own.
_visibleWhether a Doxygen prot value should survive the min_visibility cascade.
_is_forward_declaration_misparseWhether a <memberdef kind="variable">’s <type> marks it as a Doxygen forward-declaration-with-export-macro misparse, not a real variable.
_is_pointer_or_reference_type_textWhether a memberdef’s <type> text denotes a pointer or reference type (as opposed to a plain object type) – a crude but sufficient check since */& never appear in a plain (non-pointer, non-reference) C++ type’s own spelling.
_is_top_level_const_qualifiedWhether a namespace-scope variable’s own TYPE (not a pointer/reference target) is const-qualified – i.e. “const T”/“T const”, not “const T*” (the pointer itself stays reassignable) or any reference type.
_is_typedef_misparsed_as_variableWhether a <memberdef kind="variable">’s own type text is actually a real typedef declaration that real Doxygen misparsed as a variable.
_aliased_type_from_misparsed_variableStrips the macro-prefix + typedef keyword from a misparsed variable’s type text (see _is_typedef_misparsed_as_variable()), returning just the real aliased type – e.g. “CV__DEBUG_NS_END typedef const _InputArray &”
_is_self_referential_c_style_typedefWhether a <memberdef kind="typedef"> is the classic C idiom typedef struct Name { ... } Name; (or class/union/enum), not a real, distinct type alias.
_clean_py_typeNormalizes a raw Python type-hint string for signature display.
_compile_py_signatureComposes a Python-style call signature string for a method or function.
_is_generic_swig_argChecks whether a parameter is an undocumented generic SWIG collector arg.
strip_export_macrosStrips compiler-specific export macros from the provided string.
_dots_to_scopeReplaces ‘.’ with ‘::’ everywhere except inside a literal ‘…’.
_render_highlight_textReconstructs a <highlight> node’s real text, restoring literal spaces.
_render_programlistingRenders a Doxygen <programlisting> (a \\code/\\endcode block) as a fenced Markdown code block, one source line per <codeline>.
_render_mixed_textLike element.itertext(), but recursively reconstructs any nested <programlisting> as a fenced code block via _render_programlisting() instead of silently losing every <sp/>-encoded space – a \\code block can appear inside a <simplesect>/<xrefsect>/exception description just as easily as directly under a top-level <para> (DEL-B40, confirmed real: a \\exception ... \\code ... \\endcode block collapsed to “intx=1;inty=2;” via plain itertext()).
_render_para_contentRenders one top-level <para>’s mixed content into ordered text chunks.
_extract_locationDefensively extracts file and line attributes from a <location> child element.

Generated with Flude

Copyright © 2026

Directory & Entity Index

Entity NameSummary / Description
_aliased_type_from_misparsed_variable function

Strips the macro-prefix + typedef keyword from a misparsed variable’s type text (see _is_typedef_misparsed_as_variable()), returning just the real aliased type – e.g. “CV__DEBUG_NS_END typedef const _InputArray &” -> “const _InputArray &”.

Methods

_aliased_type_from_misparsed_variable

_aliased_type_from_misparsed_variable(type_text: str) -> str

Strips the macro-prefix + typedef keyword from a misparsed variable’s type text (see _is_typedef_misparsed_as_variable()), returning just the real aliased type – e.g. “CV__DEBUG_NS_END typedef const _InputArray &” -> “const _InputArray &”.

ParameterTypeDescription
type_textstr

Generated with Flude

_clean_py_type function

Normalizes a raw Python type-hint string for signature display.

Returns:

The trimmed type text with surrounding quotes removed, or "" if t is falsy.

Methods

_clean_py_type

_clean_py_type(t: Optional) -> str

Normalizes a raw Python type-hint string for signature display.

Returns:

The trimmed type text with surrounding quotes removed, or "" if t is falsy.

ParameterTypeDescription
tOptionalRaw type text (possibly quoted, as in forward references), or None.

Generated with Flude

_compile_py_signature function

Composes a Python-style call signature string for a method or function.

Returns:

A signature string such as “name(self, x: int) -> str”.

Methods

_compile_py_signature

_compile_py_signature(name: str, parameters: List, return_type: Optional, has_self: bool) -> str

Composes a Python-style call signature string for a method or function.

Returns:

A signature string such as “name(self, x: int) -> str”.

ParameterTypeDescription
namestrThe method or function name.
parametersListParsed parameters to render, in order.
return_typeOptionalThe return type annotation text, or None/empty to omit it.
has_selfboolWhether to prepend a bare self parameter.

Generated with Flude

_dots_to_scope function

Replaces ‘.’ with ‘::’ everywhere except inside a literal ‘…’.

Doxygen sometimes embeds a variadic template pack’s literal three-dot ellipsis (e.g. “Args…”) directly inside a compound/nested-class name for a template specialization. A blind text.replace(".", "::") turns that ellipsis into “::::::” (DEL-B33 P0 – confirmed against real Doxygen 1.10.0 XML output, see tests/reference_corpus/cpp_edge_cases.md). Splitting on “…” first, replacing only within each piece (which by construction no longer contains “…”), then rejoining with the original ellipsis preserves any variadic pack unchanged while still converting every other ‘.’ to ‘::’.

_extract_location function

Defensively extracts file and line attributes from a <location> child element.

Returns:

A tuple of (file path or None, line number or None).

Methods

_extract_location

_extract_location(element: ET.Element) -> Tuple[Optional[str], Optional[int]]

Defensively extracts file and line attributes from a <location> child element.

Returns:

A tuple of (file path or None, line number or None).

ParameterTypeDescription
elementET.ElementA Doxygen XML compounddef or memberdef element.

Generated with Flude

_is_forward_declaration_misparse function

Whether a <memberdef kind="variable">’s <type> marks it as a Doxygen forward-declaration-with-export-macro misparse, not a real variable. example is found.

Methods

_is_forward_declaration_misparse

_is_forward_declaration_misparse(type_text: Optional, self_referential_scope: Optional, misparse, FeatureDefinitionBaseType) -> bool

Whether a <memberdef kind="variable">’s <type> marks it as a Doxygen forward-declaration-with-export-macro misparse, not a real variable. example is found.

ParameterTypeDescription
type_textOptionalThe memberdef’s own type text (see _member_type_text()).
self_referential_scopeOptionalWhen checking a CLASS-scope member, pass the
misparseAnyonly a match whose text-after-keyword is NOT identical
FeatureDefinitionBaseTypeAnypublic FeatureBaseType { … }` elsewhere in

Generated with Flude

_is_generic_swig_arg function

Checks whether a parameter is an undocumented generic SWIG collector arg.

Returns:

True if p is a bare, untyped, undocumented “args”/“kwargs”-style stand-in.

Methods

_is_generic_swig_arg

_is_generic_swig_arg(p: ParameterModel) -> bool

Checks whether a parameter is an undocumented generic SWIG collector arg.

Returns:

True if p is a bare, untyped, undocumented “args”/“kwargs”-style stand-in.

ParameterTypeDescription
p"ParameterModel"The parameter to check.

Generated with Flude

Copyright © 2026

_is_pointer_or_reference_type_text function

Whether a memberdef’s <type> text denotes a pointer or reference type (as opposed to a plain object type) – a crude but sufficient check since */& never appear in a plain (non-pointer, non-reference) C++ type’s own spelling.

Methods

_is_pointer_or_reference_type_text

_is_pointer_or_reference_type_text(type_text: Optional) -> bool

Whether a memberdef’s <type> text denotes a pointer or reference type (as opposed to a plain object type) – a crude but sufficient check since */& never appear in a plain (non-pointer, non-reference) C++ type’s own spelling.

_is_self_referential_c_style_typedef function

Whether a <memberdef kind="typedef"> is the classic C idiom typedef struct Name { ... } Name; (or class/union/enum), not a real, distinct type alias.

Confirmed 2026-08-28 against real Drawings/cpp XML: DbField.h declares typedef struct OdFd { ... } OdFd; – Doxygen parses this as TWO separate top-level entities of the identical name “OdFd” at the same scope: a real struct (with real content) and a typedef whose own <type> is exactly "struct OdFd" (aliased_type in the parsed TypeAliasModel). The typedef is not a distinct type – purely a C compatibility shim, self-referential by construction – but its identical fully-qualified name silently overwrites the real struct’s own rendered page (same collision shape as rules 25/26, a third distinct root cause: neither a scope-split ambiguity nor a macro misparse, but a genuine, doubly-declared pair Doxygen represents as two separate, same-named entities).

_is_top_level_const_qualified function

Whether a namespace-scope variable’s own TYPE (not a pointer/reference target) is const-qualified – i.e. “const T”/“T const”, not “const T*” (the pointer itself stays reassignable) or any reference type.

Confirmed 2026-09-06 via a real doxygen probe on a genuine bug: a namespace-scope const DiagnosticCode DIAG_SUCCESS = ...; (no static keyword) reports static="no" in real Doxygen XML – static there reflects only the literal C++ keyword, unrelated to const-qualification. C++’s own semantics don’t need static for this: a namespace-scope const variable already has internal linkage and a single, fixed compile-time value regardless of whether static is (redundantly) written too – so relying on static alone as the “is this a constant” signal (as _parse_constant_member’s caller previously did) silently misclassified this extremely common idiom as a mutable VariableModel. Pointer/reference types are deliberately excluded here (kept as plain variables, unchanged behavior) – “const T*” leaves the pointer itself reassignable, and a reference binding can’t meaningfully be “reassigned” either way, so const-qualification doesn’t carry the same “this name is a single fixed value” meaning for those shapes.

_is_typedef_misparsed_as_variable function

Whether a <memberdef kind="variable">’s own type text is actually a real typedef declaration that real Doxygen misparsed as a variable.

Confirmed real 2026-09-06 via the full LLVM/OpenCV corpus (found while verifying the forward-declaration-misparse fix above, a distinct root cause): opencv2/core/mat.hpp’s CV__DEBUG_NS_END typedef const _InputArray& InputArray; – the unexpanded CV__DEBUG_NS_END inline- namespace macro immediately before typedef confuses real Doxygen’s own C++ parser into treating the whole declaration as a variable, with “typedef” swallowed into what it thinks is the return type. This is a genuine Doxygen bug (confirmed via its own XML: kind="variable" on the memberdef itself, not a mistake in our own extraction), but – unlike the forward-declaration-misparse case above, which has no real content worth keeping – this one IS recoverable: typedef never legitimately appears as a token in a real variable’s own type spelling, so its presence here is an unambiguous, safe signal that this is really a type alias, not a variable at all. Native already correctly extracts this same declaration as a type alias (confirmed: real-corpus TYPE_ALIASES precision showed it as an “extra” before this fix), so recovering it here restores parity by fixing OUR side to match native’s already-correct answer, not the other way around.

_render_highlight_text function

Reconstructs a <highlight> node’s real text, restoring literal spaces.

Doxygen’s <programlisting> encodes each source-code space as its own empty <sp/> element rather than a literal space character (so it can preserve exact source formatting even through XML whitespace handling) – element.itertext() silently drops these (they carry no text), collapsing e.g. “int x = 1;” into “intx=1;”. Confirmed real via a real doxygen capture (DEL-B40).

Returns:

The element’s text content with every <sp/> restored as a space.

_render_mixed_text function

Like element.itertext(), but recursively reconstructs any nested <programlisting> as a fenced code block via _render_programlisting() instead of silently losing every <sp/>-encoded space – a \\code block can appear inside a <simplesect>/<xrefsect>/exception description just as easily as directly under a top-level <para> (DEL-B40, confirmed real: a \\exception ... \\code ... \\endcode block collapsed to “intx=1;inty=2;” via plain itertext()).

Returns:

The element’s text content, with nested code blocks preserved as

Methods

_render_mixed_text

_render_mixed_text(elem: ET.Element) -> str

_render_para_content function

Renders one top-level <para>’s mixed content into ordered text chunks.

Doxygen bundles a member’s free-flowing prose paragraphs together with structured sections (<simplesect>, <xrefsect>, <parameterlist>, <programlisting>) as siblings inside the SAME enclosing <para> – a naive element.findall(".//para") (matching at any depth) both loses each section’s own semantic label (Doxygen attaches it via a kind attribute or a separate <xreftitle> sibling element, not as part of the text itself) and re-visits each nested <para> a second time on top of the outer para’s own full-recursive itertext() – confirmed real via a real doxygen capture (DEL-B40): “This method is thread-safe.” and “BugKnown bug here.” (the xreftitle “Bug” glued directly onto its own description, no separating whitespace in the source XML) each appeared TWICE in the resulting docstring. docstring.

_render_programlisting function

Renders a Doxygen <programlisting> (a \\code/\\endcode block) as a fenced Markdown code block, one source line per <codeline>.

Returns:

The reconstructed code, wrapped in a Markdown code fence.

Methods

_render_programlisting

_render_programlisting(programlisting: The XML element to render.) -> str

Renders a Doxygen <programlisting> (a \\code/\\endcode block) as a fenced Markdown code block, one source line per <codeline>.

Returns:

The reconstructed code, wrapped in a Markdown code fence.

_resolve_access function

Narrows a raw Doxygen prot attribute value to the access Literal MethodModel/VariableModel/ConstantModel declare – real Doxygen XML only ever emits one of these four values (or omits the attribute), but that isn’t something a bare .get() call lets mypy verify on its own.

Methods

_resolve_access

_resolve_access(prot: Optional) -> Literal["public", "protected", "private", "package"]

Narrows a raw Doxygen prot attribute value to the access Literal MethodModel/VariableModel/ConstantModel declare – real Doxygen XML only ever emits one of these four values (or omits the attribute), but that isn’t something a bare .get() call lets mypy verify on its own.

_visible function

Whether a Doxygen prot value should survive the min_visibility cascade.

min_visibility names the least-visible level still kept: "protected" keeps public+protected, "private" keeps everything (this is the engine’s unchanged default – see BaseDoxygenParser.init).

A prot value this module doesn’t rank (currently anything but "public"/"protected"/"private" – e.g. Java’s "package", not yet scoped into this filter) always passes, so a language path that hasn’t explicitly opted a ranked value in is never affected by this filter.

strip_export_macros function

Strips compiler-specific export macros from the provided string.

Returns:

The processed string with macros removed and normalized whitespace.

Methods

strip_export_macros

strip_export_macros(text: Optional, macros: Optional]) -> Optional[str]

Strips compiler-specific export macros from the provided string.

Returns:

The processed string with macros removed and normalized whitespace.

ParameterTypeDescription
textOptionalThe input text to process.
macrosOptional]Custom list of macros to strip. Defaults to

Generated with Flude