welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
welder::rods::trampolines::document Struct Reference

The growing generated header: the trampoline struct bodies and their trampoline_for registrations, kept apart so the structs can share one namespace generated { … } block and the registrations sit at global scope. More...

#include <welder/rods/python/trampolines/document.hpp>

Public Member Functions

template<std::meta::info Type>
void add ()
 Append the generated trampoline + registration for welded virtual Type.
std::string render () const
 The finished, self-contained header text.

Public Attributes

std::string structs {}
 Accumulated trampoline struct definitions.
std::string registrations {}
 Accumulated trampoline_for specializations.

Detailed Description

The growing generated header: the trampoline struct bodies and their trampoline_for registrations, kept apart so the structs can share one namespace generated { … } block and the registrations sit at global scope.

Definition at line 174 of file document.hpp.

Member Function Documentation

◆ add()

template<std::meta::info Type>
void welder::rods::trampolines::document::add ( )
inline

Append the generated trampoline + registration for welded virtual Type.

A template rather than a runtime parameter: std::meta::info is a consteval-only type, so the reflection must arrive as a non-type template argument (which is exactly what the rod's make_class<T> has via ^^T). The rendered text is materialized to a const char* and appended at runtime.

Definition at line 185 of file document.hpp.

References registrations, welder::rods::trampolines::render_registration(), welder::rods::trampolines::render_trampoline(), and structs.

◆ render()

std::string welder::rods::trampolines::document::render ( ) const
inline

The finished, self-contained header text.

Definition at line 202 of file document.hpp.

References registrations, and structs.

Member Data Documentation

◆ registrations

std::string welder::rods::trampolines::document::registrations {}

Accumulated trampoline_for specializations.

Definition at line 176 of file document.hpp.

Referenced by add(), and render().

◆ structs

std::string welder::rods::trampolines::document::structs {}

Accumulated trampoline struct definitions.

Definition at line 175 of file document.hpp.

Referenced by add(), and render().


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