Skip to content

Fixed(docs): use doxygenclass for template class members in RST generation#477

Open
AAmbuj wants to merge 1 commit into
eclipse-score:mainfrom
AAmbuj:amsh_fix_doxygenclass_template_members_funtion
Open

Fixed(docs): use doxygenclass for template class members in RST generation#477
AAmbuj wants to merge 1 commit into
eclipse-score:mainfrom
AAmbuj:amsh_fix_doxygenclass_template_members_funtion

Conversation

@AAmbuj
Copy link
Copy Markdown
Contributor

@AAmbuj AAmbuj commented May 27, 2026

Breathe cannot resolve template member functions via doxygenfunction when Doxygen does not emit standalone XML entries for inline template method definitions. Detect template class members in extract_api_items.py and emit doxygenclass with :members: instead, with deduplication to avoid documenting the same class multiple times.

Comment thread docs/sphinx/utils/extract_api_items.py Outdated
Comment on lines +295 to +306
# Strip template parameters to get the raw class name for the
# doxygenclass directive. Handle nested templates by removing
# outermost balanced angle brackets from each segment.
segments = class_part.split('::')
clean_segments = []
for seg in segments:
idx = seg.find('<')
if idx != -1:
seg = seg[:idx]
clean_segments.append(seg)

return '::'.join(clean_segments)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about partial template specializations where a specialization contains namespace separators? (a::b<c::d, T>)
They will mess this algorithm up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the edge cases.

@AAmbuj AAmbuj force-pushed the amsh_fix_doxygenclass_template_members_funtion branch from 0872708 to 49569b9 Compare June 4, 2026 04:31
…ation

Breathe cannot resolve template member functions via doxygenfunction
when Doxygen does not emit standalone XML entries for inline template
method definitions. Detect template class members in extract_api_items.py
and emit doxygenclass with :members: instead, with deduplication to
avoid documenting the same class multiple times.
@AAmbuj AAmbuj force-pushed the amsh_fix_doxygenclass_template_members_funtion branch from 49569b9 to 5694b21 Compare June 4, 2026 04:36
@AAmbuj AAmbuj requested a review from LittleHuba June 4, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants