Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
IR::ContentBuilder Class Reference

Converts Atom chains to QList<IR::ContentBlock> trees. More...

#include <contentbuilder.h>

Collaboration diagram for IR::ContentBuilder:

Public Member Functions

QList< ContentBlockbuild (const Atom *firstAtom)
 Walks the atom chain starting at firstAtom and returns a list of ContentBlock trees representing the structured documentation body.

Detailed Description

Converts Atom chains to QList<IR::ContentBlock> trees.

ContentBuilder walks a linked list of Atom nodes (QDoc's internal documentation representation) and produces a structured tree of ContentBlock and InlineContent values suitable for template rendering.

Handled atom types: \list

  • ParaLeft, ParaRight – Paragraph blocks.
  • String – Text inline content.
  • C – Inline code spans.
  • Code, CodeBad, Qml – Code blocks with language attribute.
  • SectionLeft, SectionRight – Section containers.
  • SectionHeadingLeft, SectionHeadingRight – Section headings with level.
  • FormattingLeft, FormattingRight – Bold, italic, teletype, underline, subscript, superscript, parameter, uicontrol, trademark, link, index, notranslate, span.
  • ListLeft, ListRight – Ordered and unordered lists.
  • ListItemLeft, ListItemRight – List items.
  • ListItemNumber – List start number metadata.
  • NoteLeft, NoteRight – Note admonition blocks.
  • WarningLeft, WarningRight – Warning admonition blocks.
  • BriefLeft, BriefRight – Brief exclusion (skipped in body).
  • Link, NavLink – Explicit links with unresolved target.
  • AutoLink, NavAutoLink – Auto-linked type names with unresolved target.
  • BR – Line break inline.
  • HR – Horizontal rule block.
  • Nop – No-operation (skipped).
  • BaseName – No-operation (skipped).
  • TableLeft, TableRight – Table containers with style attribute.
  • TableHeaderLeft, TableHeaderRight – Table header rows.
  • TableRowLeft, TableRowRight – Table data rows.
  • TableItemLeft, TableItemRight – Table cells with optional colspan/rowspan.
  • ListTagLeft, ListTagRight – Value list tag items (ListItem blocks).
  • SinceTagLeft, SinceTagRight – Version tag items (skipped).
  • AnnotatedList – Placeholder Div.
  • GeneratedList – Placeholder Div. \endlist

Format-conditional atoms (FormatIf, FormatElse, FormatEndif) are skipped unconditionally. The template generator builds a format-agnostic IR that serves all output formats from a single build pass.

ContentBuilder depends only on Atom (for reading the chain) and IR types (for producing output).

See also
ContentBlock, InlineContent

Definition at line 19 of file contentbuilder.h.

Member Function Documentation

◆ build()

QList< ContentBlock > IR::ContentBuilder::build ( const Atom * firstAtom)

Walks the atom chain starting at firstAtom and returns a list of ContentBlock trees representing the structured documentation body.

Returns an empty list if firstAtom is \nullptr.

The builder is reset before processing, so a single ContentBuilder instance can be reused for multiple build() calls.

Definition at line 99 of file contentbuilder.cpp.


The documentation for this class was generated from the following files: