ores.cpp.presentation
Table of Contents
This page is the node for the ores.cpp.presentation facet of the
codegen template library, part of the ores.cpp technical space. Each
archetype below is documented, and holds its mustache source, in
its own linked page — this page is the facet-level summary and the
routing table to them.
Summary
Two templates — an hpp/cpp pair — for an entity's history-diff field
mapper: render_{entity}_fields(), which turns a domain value into
an ordered list of ores::diff::domain::field_value for display.
presentation profile.
The ores.cpp.presentation facet
Server-side rendering of a domain type for display, per History Diff
Architecture layer 1: one call per field, in mapper order, no
runtime reflection. Dispatch is driven by a set of render_is_*
flags computed directly from each column's raw cpp_type string —
deliberately distinct from the is_uuid=/=is_nullable_string=/
=is_already_optional=/=is_plain_string flags ores.cpp.repository/
ores.sql.schema use, since those encode a nullable-to-optional
promotion for the storage layer that the domain class itself does
not apply — the mapper must match the domain struct's actual field
types, not the storage layer's.
This first cut is scoped to flat entities only (no
has_identity_group=/=has_audit_group); enum columns are not yet
rendered; primary/natural keys support string and uuid only —
see the covering task's Notes for the full remaining list.
Archetypes
| Archetype | Description |
|---|---|
| ores.cpp.presentation.history_field_mapper_header | Declares render_{entity}_fields(). presentation profile. |
| ores.cpp.presentation.history_field_mapper_impl | One field_value push per field, dispatched on the column's render_is_* type flags. presentation profile. |
See also
- ores.cpp — the parent technical space's generated facet/archetype catalogue and shared Mustache conventions.
- C++ Technical Space — the domain-concept overview of this technical space.
- Codegen template library — the groups overview.
- History Diff Architecture — the layered rendering model this facet implements layer 1 of.