API Reference

Complete C++ API documentation for Docraft’s loom engine β€” auto-generated from source code comments. See About Docraft for how these pieces fit together as a pipeline.

Core Components

πŸ“„ Orchestrator

DocraftLoomPdfCreator β€” the entry point that owns the node tree and drives Measure β†’ Layout β†’ Pagination β†’ Rendering.

Orchestrator
⚠️ Exceptions

Domain-driven exception hierarchy used across parser, layout, rendering, backend, and templating subsystems.

Exceptions

Node Tree

🧱 Node Tree β€” Base & Text

DocraftLoomNode, LayoutBox, and text-family nodes β€” Text, Title, Subtitle, PageNumber, Paragraph, Image, Blank, NewPage.

Node Tree β€” Base & Text
πŸ”· Shapes

Geometric primitives β€” Rectangle, Circle, Triangle, Line, Polygon with a composed DocraftLoomShapeStyle (fill/stroke/border).

Shapes
πŸ“¦ Containers

Stacking layout β€” VStack/HStack, Table/TableCell, List (ordered/unordered) for composing complex structures.

Containers
🏷️ Types & Enums

Shared geometry/color types, DocraftDocumentMetadata, and loom enums β€” TextAlignment, ListKind, ImageFormat, page format, and more.

Types & Enums

Pipeline

πŸ“ Pipeline

The four visitor passes β€” Measure, Layout, Pagination, Rendering β€” plus the shared visitor interfaces and weighted-column helper.

Pipeline
πŸ”Œ Backend

Capability-split rendering interfaces β€” currently implemented with libharu (DocraftHaruBackend), consumed but not yet swappable from the loom orchestrator.

Rendering Backend

Template & Parsing

πŸ“ Craft Parser

Generic XML parsing (docraft::craft) plus the loom-specific bridge (DocraftLoomCraftLanguageParser, DocraftLoomTreeBuilder) that builds the node tree.

Craft Language Parser
πŸ”„ Templating Engine

Data binding and template expansion β€” ${variables}, <Foreach> loops, and JSON model integration.

Templating

Utilities

πŸ› οΈ Utilities

Helper functions for color parsing, font registration/resolution, logging, and base64 decoding.

Utilities