C++ template group
Table of Contents
This page documents the cpp group of the codegen template
library — the namespace that gathers related facets. Each facet is a
literate org document in this directory whose mustache blocks tangle
to the .mustache artefacts consumed by generator.py; this page
explains what the group's facets have in common and indexes them.
Summary
The C++ projection across eight facets, cut by entity-lifecycle layer and profile membership: the value type and its companions (cpp_domain), tabular presentation (cpp_table), the persistence triplet (cpp_repository), the Qt ensemble (cpp_qt), the entity's NATS surface (cpp_messaging), the component-service scaffold (cpp_service_app), the new-component skeleton (cpp_component), and standalone model formats (cpp_model_types). Entity facets are driven by the entity org-models; component facets by the component manifest.
Facets
The table below is generated — run
projects/ores.codegen/scripts/regenerate_facet_inventories.py after
adding or changing facet docs; do not edit it by hand.
| Facet | Templates | Description |
|---|---|---|
| C++ Qt templates | 0 | Qt UI classes per entity: client model, controller, detail and history dialogs, and MDI window (hpp/cpp pairs). |
| C++ component templates | 0 | Component skeleton: component header, export macros, the stub header/impl/test trio and the Catch2 test main. |
| C++ domain templates | 0 | The entity's value type and its immediate companions: domain class (temporal and non-temporal), reflect-cpp JSON IO, and the faker test-data generator. |
| C++ messaging templates | 0 | The entity's NATS surface end-to-end: protocol message types, changed-event, subject handler, and the per-entity service that backs them. |
| C++ model type templates | 0 | Standalone model formats: the enum class and the field-group struct. |
| C++ repository templates | 0 | The entity's persistence triplet: sqlgen entity, mapper and repository, in temporal and non-temporal variants. |
| C++ service application templates | 0 | The component-service scaffold: application and host classes, config options and parser with exceptions, main entry point and stub test. |
| C++ table templates | 0 | libfort tabular presentation of entity collections: table adapter and its stream IO. |
Shared conventions
{{{cpp_license}}}triple-stache injects the licence header.- Headers guard with
full_name_upper-derived macros and export via the component's export macro header. - Column loops dispatch on per-field type flags (
is_string,is_boolean,is_timestamp, …);{{^last}}places commas. - Temporal/non-temporal template twins persist until the Phase-3
{{#is_temporal}}unification.
See also
- Codegen template library — the groups overview.
- MASD — the methodology these templates instantiate.
- Applied MASD — the facet catalogue and codegen routes.
- facet_catalogue.org — profile → template/output mapping.