46namespace welder::inline v0::rods::trampolines {
104 template <
class T,
auto Bases, std::size_t... I>
106 const char* , std::index_sequence<I...>) {
109 m.
doc->template add<^^T>();
120 template <
class T, std::meta::info Decl,
auto Bases, std::size_t... I>
122 const char* , std::index_sequence<I...>) {
125 m.
doc->template add<Decl>();
129 template <
class T, auto Ctors,
bool HasDefault,
bool Aggregate>
131 template <std::meta::info,
class = ::welder::naming::none>
133 template <auto Fns,
class = ::welder::naming::none>
135 template <auto Fns,
class = ::welder::naming::none>
145 template <std::meta::info,
class = ::welder::naming::none>
153 template <auto Fns,
class = ::welder::naming::none>
155 template <std::meta::info,
class = ::welder::naming::none>
177 template <std::meta::info Ns,
class Style = ::welder::naming::none>
179 static_assert(std::meta::is_namespace(Ns),
180 "welder: trampolines::generate<Ns>: Ns must reflect a namespace");
188static_assert(::welder::rod<rod>,
189 "welder::rods::trampolines::rod must satisfy welder::rod");
The contract a rod (a welder backend, welder::rods::…::rod) must satisfy to plug into the generic dri...
consteval std::vector< std::meta::info > overridable_virtuals(std::meta::info type)
Every overridable virtual slot of type — the ones welder routes through a trampoline — folding in vir...
consteval bool bound_flat(std::meta::info entity)
Does entity (a type or a member function) carry a bind_flat mark?
consteval detail::doc_spec< N > doc(const char(&s)[N])
Attach a docstring to a namespace, class, function, or function parameter.
lang
The target languages welder ships rods for — but not the whole value space.
@ py
Python (via the pybind11 and nanobind backends).
The text-emitting core of welder's trampoline-generator rod: the consteval routine that renders a han...
The growing generated header: the trampoline struct bodies and their trampoline_for registrations,...
The class handle the driver threads to the per-member hooks.
A copyable handle onto the growing document that the driver threads through every emission primitive ...
No deferred module state.
static consteval const char * special_method_name(std::meta::info)
No operators are emitted (they are covered as virtuals when overridable), so none are "special".
static void add_field(class_handle &)
module_handle module_type
static void add_constructors(class_handle &)
static session open_module(module_type &)
static class_handle make_class(module_type &m, const char *, const char *, std::index_sequence< I... >)
Emit T's trampoline iff it has overridable virtuals and is not a whole-type bind_flat.
enum_handle enum_handle_type
static void add_function(module_type &, const char *=nullptr)
static void generate(std::ostream &os)
Emit the trampoline header for the welded types in namespace Ns to os.
static void add_method(class_handle &)
static void add_operator(class_handle &)
class_handle class_handle_type
The class / enum handles the per-class / per-enum hooks receive — exactly what make_class / make_enum...
static void set_module_doc(module_type &, const char *)
static constexpr lang language
Trampolines are a Python concept.
static void add_static_method(class_handle &)
static enum_handle make_enum(module_type &, const char *, const char *)
static void close_module(module_type &, session &)
static module_type add_submodule(module_type &m, const char *name)
Recurse into a nested namespace, carrying the document handle through.
static void add_variable(module_type &, session &, const char *=nullptr)
static class_handle make_class(module_type &m, const char *, const char *, std::index_sequence< I... >)
The declaring-entity-aware form the carriage prefers (see bind_type): Decl is the spelling of T — ^^T...
static constexpr bool has_native_caster
Permissive: the generator only reproduces virtual signatures (via splices, which work for any type),...
static void finish_enum(enum_handle &)
static void add_enumerator(enum_handle &)
welder's binding entry point, parameterized on a rod.
welder's binding entry point: the welder::welder struct.