|
| template<rod B, class E, class Style = naming::none> |
| static auto | bind_enum (typename B::module_type &m, const char *name=nullptr) |
| | Reflect over enum E and register it via rod B onto module m.
|
| template<rod B, class T, std::meta::info Decl, auto Bases> |
| static auto | make_class_of (typename B::module_type &m, const char *cls_name, const char *doc) |
| | Call the rod's class-creation primitive, preferring the extended declaring-entity-aware form when the rod provides one.
|
| template<rod B, class T, class Style = naming::none, std::meta::info Decl = std::meta::info{}> |
| static auto | bind_type (typename B::module_type &m, const char *name=nullptr) |
| | Reflect over T and register it via rod B onto module m.
|
| template<rod B, std::meta::info Fn, class Style = naming::none> |
| static auto | bind_function (typename B::module_type &m, const char *name=nullptr) |
| | Register free function Fn — with its participating overload siblings — as a module-level function of m.
|
| template<rod B, std::meta::info Var, class Style = naming::none> |
| static auto | bind_variable (typename B::module_type &m, const char *name=nullptr) |
| | Register a single namespace variable Var as an attribute of m.
|
| template<rod B, std::meta::info Ns, class Style = naming::none> |
| static void | bind_namespace (typename B::module_type &m) |
| | Reflect over a whole namespace Ns and expose its members on module m.
|
| template<rod B, std::meta::info Ns, class Style = naming::none> |
| static B::module_type | bind_namespace_as_submodule (typename B::module_type &m, const char *name=nullptr) |
| | Define a submodule of m and bind namespace Ns into it.
|
| template<rod B, std::meta::info Ns, class Style = naming::none, class Pre, class Post> |
| static void | build_module (typename B::module_type &m, Pre pre, Post post) |
| | Fill an existing module out of top-level namespace Ns: pre hook, bind the namespace, post hook.
|
|
| template<rod B, std::meta::info BoundInto, std::meta::info Src, class Style, class Cls> |
| static void | bind_members (Cls &cls) |
| | Flatten the eligible data members, methods and operators of Src onto the class handle cls (a handle for a type deriving from Src) — public ones, plus protected ones whose access is admitted (see detail::member_access_admitted; private never binds).
|
| template<rod B, class E, class Style, class EnumHandle> |
| static void | emit_enumerators (EnumHandle &e) |
| | The per-enumerator walk shared by bind_enum and bind_nested_enum: each enumerator resolves like a data member (the enum's policy + its own marks) and is emitted through the rod's add_enumerator.
|
| template<rod B, class T, class Style, class Cls> |
| static void | bind_class_interior (typename B::module_type &m, Cls &cls) |
| | Everything a class binding contains beyond the class handle itself — shared by bind_type (a module-scope class) and bind_nested_type (a class-scoped one).
|
| template<rod B, std::meta::info Outer, class Style, class Cls> |
| static void | bind_nested_types (typename B::module_type &m, Cls &cls) |
| | Register the participating member types of Outer onto its class handle cls — the nested-class / nested-enum walk.
|
| template<rod B, class T, class Style, std::meta::info Decl = std::meta::info{}, class OuterCls> |
| static void | bind_nested_type (typename B::module_type &m, OuterCls &outer, const char *name=nullptr) |
| | Register nested class T onto the class handle of its enclosing type — bind_type's class-scope sibling.
|
| template<rod B, class E, class Style, class OuterCls> |
| static void | bind_nested_enum (typename B::module_type &m, OuterCls &outer, const char *name=nullptr) |
| | Register nested enum E onto the class handle of its enclosing type — bind_enum's class-scope sibling (see bind_nested_type for the shared rationale; the fallback for a rod without make_nested_enum is the module-scope make_enum).
|
| template<rod B, class T, std::meta::info Decl, auto Bases, class OuterCls> |
| static auto | make_nested_class_of (typename B::module_type &m, OuterCls &outer, const char *cls_name, const char *doc) |
| | Call the rod's nested-class primitive when it declares one, else fall back to the module-scope factory (flat placement).
|
| template<rod B, class E, class OuterCls> |
| static auto | make_nested_enum_of (typename B::module_type &m, OuterCls &outer, const char *name, const char *doc) |
| | make_nested_class_of's enum counterpart: the rod's make_nested_enum when present, else the module-scope make_enum.
|
template<resolution Resolution>
struct welder::carriages::basic_carriage< Resolution >
A carriage: welder's reflection-driven traversal, parameterized on a Resolution (which markers it obeys).
In welding, the carriage (or tractor) is the mechanism that drives the torch — fed by the rod — steadily along the joint. Here it is the entity that walks a reflected type or namespace and drives a welder::rod's emission primitives along it: it owns all the traversal and emission orchestration (base flattening, the bindability gate, name resolution, sessions), delegating only the which participates decisions to Resolution and the framework-specific emission to the rod. It is a stateless policy struct of static member templates, each parameterized on the rod B and the name style Style.
Two are aliased for welder::welder's Carriage argument (defaulted to welder::stitch_welding_carriage): the marker-directed stitch carriage and the greedy tack carriage (welder::tack_welding_carriage). A user may inject either, or a bespoke basic_carriage<CustomResolution> — the seam is deliberately open. The members cross-reference each other (a namespace's class members bind via bind_type, a nested namespace recurses via bind_namespace), so a replacement is expected to be a coherent whole rather than a partial override.
- Template Parameters
-
Definition at line 467 of file carriage.hpp.
template<resolution Resolution>
template<rod B, class T, class Style, class Cls>
template<resolution Resolution>
template<rod B, class E, class Style = naming::none>
Reflect over enum E and register it via rod B onto module m.
Emits its docstring, then each enumerator that resolves as bound (an enumerator honors the enum's policy and its own exclude/include marks, exactly like a data member). finish_enum lets the backend apply a whole-enum finalizer — e.g. exporting an unscoped enum's values into the enclosing scope, mirroring C++.
- Template Parameters
-
| B | the rod. |
| E | the enum type. |
- Parameters
-
| m | the module handle to register onto. |
| name | the target name (used verbatim, beating any weld_as), or nullptr to resolve E's weld_as/styled name. |
- Returns
- the rod's enum handle.
Definition at line 941 of file carriage.hpp.
template<resolution Resolution>
template<rod B, std::meta::info Fn, class Style = naming::none>
Register free function Fn — with its participating overload siblings — as a module-level function of m.
The semi-manual leaf: gate then emit one name, without walking a namespace. Fn (which resolves the group's target name, and is welded even if its own marks would resolve it out — the explicit call is the stronger statement of intent) must be admitted by Resolution for B's language; its participating same-name siblings join the group, keeping the call consistent with the namespace walk on every rod (a one-value-per-name framework registers the complete set). Every group member's signature runs the bindability gate.
- Template Parameters
-
| B | the rod. |
| Fn | a reflection of the free function. |
- Parameters
-
| m | the module handle to register onto. |
| name | the target name (used verbatim, beating any weld_as), or nullptr to resolve Fn's weld_as/styled name. |
Definition at line 1068 of file carriage.hpp.
template<resolution Resolution>
template<rod B, std::meta::info BoundInto, std::meta::info Src, class Style, class Cls>
Flatten the eligible data members, methods and operators of Src onto the class handle cls (a handle for a type deriving from Src) — public ones, plus protected ones whose access is admitted (see detail::member_access_admitted; private never binds).
A base that Resolution treats as native is skipped here (it binds as a base of the class handle); the rest are recursed first so that, on a name clash, the member declared closer to the derived type wins. Constructors are never flattened (the derived type provides its own).
- Template Parameters
-
| B | the rod. |
| BoundInto | the welded type whose class handle receives the members — held fixed through the flattening recursion, and handed to the resolution hooks as their bound-into context. |
| Src | a reflection of the (base or derived) type whose members to flatten. |
| Style | the name style each member's name flows through. |
| Cls | the rod's class-handle type (deduced). |
- Parameters
-
| cls | the class handle to register onto. |
Definition at line 490 of file carriage.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_class_interior().
template<resolution Resolution>
template<rod B, std::meta::info Ns, class Style = naming::none>
template<resolution Resolution>
template<rod B, class E, class Style, class OuterCls>
Register nested enum E onto the class handle of its enclosing type — bind_enum's class-scope sibling (see bind_nested_type for the shared rationale; the fallback for a rod without make_nested_enum is the module-scope make_enum).
- Template Parameters
-
| B | the rod. |
| E | the nested enum type. |
| Style | the name style. |
- Parameters
-
| m | the module handle (the flat-placement fallback scope). |
| outer | the enclosing type's class handle. |
| name | the bound name (an alias-resolved override), or nullptr to resolve E's weld_as/styled name. |
Definition at line 851 of file carriage.hpp.
template<resolution Resolution>
template<rod B, class T, class Style, std::meta::info Decl = std::meta::info{}, class OuterCls>
Register nested class T onto the class handle of its enclosing type — bind_type's class-scope sibling.
Same interior (constructors, fail-safes, members, its own nested types — so nesting recurses), differing only in where the class handle is created: a rod implementing the optional make_nested_class places the new class under outer (the Python rods pass the enclosing class as the registration scope, yielding module.Outer.Inner); one that doesn't falls back to the module-scope make_class — a flat sibling under its usual resolved name, so two outers' same-named nested types then collide (rename with weld_as, or implement the hook).
No participates assert here: participation was the caller's member resolution (a nested type needs no weld).
- Template Parameters
-
| B | the rod. |
| T | the nested class type. |
| Style | the name style. |
| Decl | the declaring entity when it differs from ^^T — the MEMBER ALIAS a type was welded through (the alias is the one spellable name an aliased specialization has, which the text-emitting rods need); a null reflection for the declared-nested route. |
- Parameters
-
| m | the module handle (the flat-placement fallback scope). |
| outer | the enclosing type's class handle. |
| name | the bound name (an alias-resolved override), or nullptr to resolve T's weld_as/styled name. |
Definition at line 814 of file carriage.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_nested_types().
template<resolution Resolution>
template<rod B, std::meta::info Outer, class Style, class Cls>
Register the participating member types of Outer onto its class handle cls — the nested-class / nested-enum walk.
A nested type resolves like any other class member — the outer's policy plus the type's own exclude/include/only marks (class_member_participates), with the usual access admission — never via its own weld: nested types are interface helpers of their enclosing type, and the enclosing weld is the discovery marker. Deliberately skipped:
- member type aliases (binding one would re-register its target; the alias-welding route is namespace-scope only);
- unions (is_class_type excludes them), unnamed types (there is nothing to name them by — bind the member of that type or exclude it), and incomplete member types (nothing to register; a use of one also fails the gate);
- a flattened base's nested types: a nested type registers exactly once, with its DECLARING class — two derived types flattening one mixin would otherwise register it twice (a framework load error). A flattened signature naming one therefore fails the gate until the declaring base is welded (or the member trusted/excluded).
- Template Parameters
-
| B | the rod. |
| Outer | the enclosing (welded) type being bound. |
| Style | the name style. |
- Parameters
-
| m | the module handle (the flat-placement fallback scope). |
| cls | the outer type's class handle. |
Definition at line 708 of file carriage.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_class_interior().
template<resolution Resolution>
template<rod B, class T, class Style = naming::none, std::meta::info Decl = std::meta::info{}>
Reflect over T and register it via rod B onto module m.
Emits:
- native inheritance from T's native ancestors (per Resolution; each a base of the class handle — bind those bases separately, before T);
- T's own nested member types (classes + enums, recursively) that resolve as bound — like any member, under T's policy + their own marks, no weld of their own (bind_nested_types); a rod with the optional make_nested_class/make_nested_enum primitives places them under T's binding (Python: module.T.Inner), others fall back to flat module-scope placement;
- the default constructor (if any), each public non-copy/move constructor, and — for a baseless aggregate whose fields all bind — a synthesized field constructor;
- data members / methods / operators that resolve as bound (public, plus protected where detail::member_access_admitted admits them — see policy::weld_protected; private never), plus the eligible members of every flattened (non-native) public base.
- Template Parameters
-
| B | the rod. |
| T | the type to bind. |
| Decl | the declaring entity when it differs from ^^T — the namespace-scope alias a class-template specialization was welded through (set by bind_namespace's alias branch, which has already resolved participation); a null reflection for the direct route. |
- Parameters
-
| m | the module handle to register onto. |
| name | the target name (used verbatim, beating any weld_as), or nullptr to resolve T's weld_as/styled name. |
- Returns
- the rod's class handle, so callers can chain further registrations.
Definition at line 1018 of file carriage.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::bind_namespace().
template<resolution Resolution>
template<rod B, std::meta::info Var, class Style = naming::none>
Register a single namespace variable Var as an attribute of m.
The semi-manual leaf for a global/constant: a const/constexpr Var becomes a value snapshot, a mutable one a live get/set property (backend-dependent). Var must be admitted by Resolution for B's language; its type runs the bindability gate. The emission runs inside its own per-module session (opened and finalized here), so it composes with a later namespace/module weld onto the same handle.
- Template Parameters
-
| B | the rod. |
| Var | a reflection of the namespace-scope variable. |
- Parameters
-
| m | the module handle to register onto. |
| name | the target name (used verbatim, beating any weld_as), or nullptr to resolve Var's weld_as/styled name. |
Definition at line 1100 of file carriage.hpp.
template<resolution Resolution>
template<rod B, std::meta::info Ns, class Style = naming::none, class Pre, class Post>
Fill an existing module out of top-level namespace Ns: pre hook, bind the namespace, post hook.
- Template Parameters
-
| B | the rod. |
| Ns | a reflection of the (asserted top-level) namespace; its name is meant to be the module name. |
| Style | the name style each generated name flows through. |
| Pre | the pre-hook callable type. |
| Post | the post-hook callable type. |
- Parameters
-
| m | the module handle to fill. |
| pre | invoked with m before the namespace is bound. |
| post | invoked with m after the namespace is bound. |
Definition at line 1274 of file carriage.hpp.
template<resolution Resolution>
template<rod B, class T, std::meta::info Decl, auto Bases>
Call the rod's class-creation primitive, preferring the extended declaring-entity-aware form when the rod provides one.
Decl is the entity the type was declared through — ^^T, or the namespace-scope alias welding a class-template specialization. A helper (not a lambda in bind_type): std::meta::info is consteval-only, so a lambda referencing such a constexpr local escalates to consteval (P2564) and cannot take the runtime module handle; template parameters do not.
- Template Parameters
-
| B | the rod. |
| T | the type to bind. |
| Decl | the declaring entity handed to a spelling-aware rod. |
| Bases | the native base reflections. |
- Parameters
-
| m | the module handle to register onto. |
| cls_name | the resolved target-language name. |
| doc | the class docstring, or nullptr. |
- Returns
- the rod's class handle.
Definition at line 971 of file carriage.hpp.
Referenced by welder::carriages::basic_carriage< carriages::marker_resolution >::make_nested_class_of().
template<resolution Resolution>
template<rod B, class T, std::meta::info Decl, auto Bases, class OuterCls>
| auto welder::carriages::basic_carriage< Resolution >::make_nested_class_of |
( |
typename B::module_type & | m, |
|
|
OuterCls & | outer, |
|
|
const char * | cls_name, |
|
|
const char * | doc ) |
|
inlinestaticprivate |
Call the rod's nested-class primitive when it declares one, else fall back to the module-scope factory (flat placement).
A static helper, not a lambda in bind_nested_type, for the same P2564 reason as make_class_of.
A spelling-aware rod may declare the extended, declaring-entity-aware form make_nested_class<T, Decl, Bases> (preferred when Decl is set — the member alias an unnameable specialization was welded through); the flat fallback likewise threads Decl into make_class_of, so a text-emitting rod's extended make_class receives it too.
- Template Parameters
-
| B | the rod. |
| T | the nested class type. |
| Decl | the declaring member alias, or a null reflection. |
| Bases | the native base reflections. |
- Parameters
-
| m | the module handle. |
| outer | the enclosing type's class handle. |
| cls_name | the resolved target-language name. |
| doc | the class docstring, or nullptr. |
- Returns
- the rod's class handle for T.
Definition at line 882 of file carriage.hpp.
template<resolution Resolution>
template<rod B, class E, class OuterCls>