ores.cpp.component.umbrella_header

Table of Contents

The aggregate include header for a component's outermost namespace. It declares the namespace and documents it with the @brief and the description the component model states, which is what Doxygen renders and what the diagram conventions read when they label the component.

Every component keeps one for its whole life, so it belongs with the export macros and the test main rather than with the first-generation scaffolding: it is generated on every regeneration, and editing the model's #+description: updates it.

A multi-module component keeps one per module. The composite that groups them keeps none, because it has no namespace of its own; each of its parts carries the purpose it states. An adapter's modules share their parent's include root, so its header is named for the part and lands beside the parent's own.

The description reaches this template as one line, and clang-format wraps it. A description that arrives pre-wrapped is left as it is, because clang-format does not join lines that already fit – so the loader collapses the model's value before it gets here.

See the Template variable reference for the complete list of available variables and their semantics.

1. Template

The full template source. Edit here and re-tangle with compass build --direct tangle_codegen_templates to regenerate library/templates/cpp_component_header.hpp.mustache.

{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/ores.cpp.component.umbrella_header.org. Edit the org source. }}
{{{cpp_license}}}
{{#component}}
#ifndef ORES_{{name_upper}}_HPP
#define ORES_{{name_upper}}_HPP

/**
 * @brief {{brief}}
 *
 * {{description}}
 */
namespace {{namespace}} {}

#endif
{{/component}}

2. See also

Emacs 29.3 (Org mode 9.6.15)