ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_rabook_ctx_t Struct Reference

Builder state: the arenas plus running counts and a sticky-fail flag. More...

#include <rabook_compile.h>

Collaboration diagram for ra8_rabook_ctx_t:

Data Fields

ra8_rabook_buffers_t buf
 Caller-provided arenas.
uint32_t chapter_count
 Chapters appended so far.
uint32_t node_count
 Nodes appended so far.
uint32_t attr_count
 Attributes appended so far.
uint32_t stylesheet_count
 Stylesheets appended so far.
uint32_t image_count
 Images appended so far.
uint32_t string_size
 String-pool bytes used.
uint32_t image_pool_size
 Image-pool bytes used.
uint32_t title_off
 Metadata: title string offset.
uint32_t author_off
 Metadata: author string offset.
uint32_t language_off
 Metadata: language string offset.
uint32_t identifier_off
 Metadata: identifier string offset.
uint32_t cover_image_index
 Cover image index, or nil.
uint32_t flags
 Reserved header flags (0 in v1).
uint8_t image_pool_mode
 Internal builder storage mode.
bool failed
 Sticky: an arena overflowed.

Detailed Description

Builder state: the arenas plus running counts and a sticky-fail flag.

Initialise with rabook_compile_init; treat the fields as private. failed latches on the first arena overflow so the caller can build optimistically and check once at ra8_rabook_finalize.

Invariant
Each table count and the string size never exceeds its matching cap.
An internal image pool never exceeds image_pool_cap; an external pool is instead bounded by the uint32 wire-format size.
Since
Version 0.1.0

Definition at line 98 of file rabook_compile.h.

Field Documentation

◆ attr_count

uint32_t ra8_rabook_ctx_t::attr_count

Attributes appended so far.

Definition at line 102 of file rabook_compile.h.

Referenced by internal_append_attrs(), internal_compute_layout(), internal_make_header(), and ra8_rabook_add_element().

◆ author_off

uint32_t ra8_rabook_ctx_t::author_off

Metadata: author string offset.

Definition at line 108 of file rabook_compile.h.

Referenced by internal_make_header(), and ra8_rabook_set_metadata().

◆ buf

◆ chapter_count

uint32_t ra8_rabook_ctx_t::chapter_count

Chapters appended so far.

Definition at line 100 of file rabook_compile.h.

Referenced by internal_compute_layout(), internal_make_header(), and ra8_rabook_add_chapter().

◆ cover_image_index

uint32_t ra8_rabook_ctx_t::cover_image_index

Cover image index, or nil.

Definition at line 111 of file rabook_compile.h.

Referenced by internal_make_header(), ra8_rabook_set_metadata(), and rabook_compile_init().

◆ failed

◆ flags

uint32_t ra8_rabook_ctx_t::flags

Reserved header flags (0 in v1).

Definition at line 112 of file rabook_compile.h.

Referenced by internal_make_header().

◆ identifier_off

uint32_t ra8_rabook_ctx_t::identifier_off

Metadata: identifier string offset.

Definition at line 110 of file rabook_compile.h.

Referenced by internal_make_header(), and ra8_rabook_set_metadata().

◆ image_count

uint32_t ra8_rabook_ctx_t::image_count

◆ image_pool_mode

uint8_t ra8_rabook_ctx_t::image_pool_mode

◆ image_pool_size

◆ language_off

uint32_t ra8_rabook_ctx_t::language_off

Metadata: language string offset.

Definition at line 109 of file rabook_compile.h.

Referenced by internal_make_header(), and ra8_rabook_set_metadata().

◆ node_count

uint32_t ra8_rabook_ctx_t::node_count

◆ string_size

uint32_t ra8_rabook_ctx_t::string_size

◆ stylesheet_count

uint32_t ra8_rabook_ctx_t::stylesheet_count

Stylesheets appended so far.

Definition at line 103 of file rabook_compile.h.

Referenced by internal_compute_layout(), internal_make_header(), and ra8_rabook_add_stylesheet().

◆ title_off

uint32_t ra8_rabook_ctx_t::title_off

Metadata: title string offset.

Definition at line 107 of file rabook_compile.h.

Referenced by internal_make_header(), and ra8_rabook_set_metadata().


The documentation for this struct was generated from the following file: