ores.cpp.scaffold

Table of Contents

This page is the node for the ores.cpp.scaffold 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.

1. Summary

The files a component needs so its CMake targets link and its test runner passes before any real code exists: the umbrella header, a placeholder domain type with its implementation, and a placeholder Catch2 test (one archetype for the flat, api and core kinds, and a separate one for a service, whose targets differ). Every one of them is deleted as the component's first real model lands.

2. The ores.cpp.scaffold facet

This facet is #+default: disabled, so a normal regeneration of a component emits nothing from it. A component opts in, once, by adding one line to its overview's :PROPERTIES: drawer:

:ores.cpp.scaffold.enabled: true

The line is scaffolding, not configuration: it is removed together with the files, once the component has a real model to generate. While it is present, every regeneration of that component re-emits the four files, which is what the line is asking for.

The split exists because the scaffold used to be part of ores.cpp.component and ores.cpp.service-app, keyed on #+component_kind: alone. Any non-composite component therefore re-emitted the stubs whenever it was regenerated — including a mature component with hundreds of real files, and any component newly listed in the codegen catalogue. The umbrella header went the same way: a component that had deleted it as dead code had it recreated on the next run.

3. Archetypes

Archetype Description
ores.cpp.scaffold.service_stub_test Placeholder Catch2 test keeping the tests target linking. component-service profile.
ores.cpp.scaffold.stub_header Placeholder declaration so the library target has a header.
ores.cpp.scaffold.stub_impl Placeholder implementation so the library target has a TU.
ores.cpp.scaffold.stub_test Placeholder Catch2 test so the tests target runs.
ores.cpp.scaffold.umbrella_header Umbrella header with the component's namespace docs.

Emacs 29.3 (Org mode 9.6.15)