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::Builder Class Reference

Assembles IR Documents from pre-extracted metadata. More...

#include <builder.h>

Collaboration diagram for IR::Builder:

Public Member Functions

 Builder ()=default
Document buildPageIR (PageMetadata pm) const

Detailed Description

Assembles IR Documents from pre-extracted metadata.

Builder consumes PageMetadata, a value-type struct populated by the driver-side extraction layer (NodeExtractor). It copies pre-extracted fields into an IR::Document without touching Node subclass headers, Atom chains, or the documentation database.

This separation means Builder has no dependencies on the legacy Node layer and is eligible for QDocLib migration. Generators receive pre-built IR and focus purely on formatting output.

Content arrives pre-built as a list of ContentBlock values in PageMetadata::body. ContentBuilder (called at extraction time) handles the atom-to-block transformation, including brief exclusion. Format-conditional atoms are skipped unconditionally since the IR is format-agnostic. Builder's role is assembly, not transformation.

Builder computes a flat text representation from the structured body for {content.text}. This is transitional — templates will consume {content.blocks} directly once content rendering is in place.

See also
IR::Document, IR::PageMetadata, TemplateGenerator

Definition at line 14 of file builder.h.

Constructor & Destructor Documentation

◆ Builder()

IR::Builder::Builder ( )
default

Member Function Documentation

◆ buildPageIR()

Document IR::Builder::buildPageIR ( PageMetadata pm) const
nodiscard

Assemble an IR Document from pre-extracted PageMetadata.

Classification, identity, and content fields are moved from pm. The body (a list of ContentBlock values built by ContentBuilder at extraction time) is transferred as-is. A flat text fallback is computed until templates consume the structured body directly.

Definition at line 59 of file builder.cpp.

References IR::Document::access, IR::PageMetadata::access, IR::Document::genus, IR::PageMetadata::genus, IR::Document::nodeType, IR::PageMetadata::nodeType, IR::Document::status, and IR::PageMetadata::status.

Referenced by TemplateGenerator::generatePageNode().

Here is the caller graph for this function:

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