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

Stitch-welding resolution: bind only where welder's markers say to. More...

#include <welder/carriage.hpp>

Static Public Member Functions

static consteval bool participates (std::meta::info entity, lang L)
 A type/function/variable participates iff welded for L.
static consteval bool is_native_base (std::meta::info base, lang L, std::meta::info)
 A base is a separately-registered native base iff the user welded it.
template<std::meta::info T, lang L>
static consteval auto native_bases ()
 T's native (welded) base list, for the class handle.
static consteval bool member_participates (std::meta::info mem, lang L, policy_kind pol, std::meta::info)
 A namespace member (class/enum/function/variable) participates.
static consteval bool alias_participates (std::meta::info mem, lang L, policy_kind pol, std::meta::info)
 A namespace-scope alias to a class-template specialization participates: welded via the alias's own weld (precedence) or the template's (read through the instantiation), with the usual scope-policy/marks resolution against the instantiation.
static consteval bool class_member_participates (std::meta::info mem, lang L, policy_kind pol, std::meta::info)
 A class member (field / method / operator / constructor — and, loosely, an enumerator) participates: its scope's policy + its own marks decide.
static consteval bool protected_participates (std::meta::info mem, lang L, std::meta::info)
 A protected member is admitted iff its declaring class says so — a policy::weld_protected annotation covering L (also the carriage's default when a resolution declares no hook; spelled out here as the documented contract).
static consteval bool namespace_participates (std::meta::info ns, lang L, policy_kind pol, std::meta::info)
 A nested namespace participates (recurse + submodule).
static consteval bool counts_as_registered (std::meta::info type, lang L)
 The gate's registration oracle: welded ⇒ registered (the welder::welded_registration rule), plus the nested-type rule — a class-scoped type registers with its enclosing class's binding, so it counts iff it resolves as a member of a counting outer (see detail::nested_type_registered, the exact mirror of the carriage's nested-type sweep).

Detailed Description

Stitch-welding resolution: bind only where welder's markers say to.

A leaf entity participates iff it carries a weld for the language and resolves as bound under its scope's policy and marks; a base is native iff the user welded it; a namespace becomes a submodule iff it holds welded content. This is the default — an intermittent, marker-directed weld, like a stitch weld.

Definition at line 254 of file carriage.hpp.

Member Function Documentation

◆ alias_participates()

consteval bool welder::carriages::marker_resolution::alias_participates ( std::meta::info mem,
lang L,
policy_kind pol,
std::meta::info  )
inlinestaticconsteval

A namespace-scope alias to a class-template specialization participates: welded via the alias's own weld (precedence) or the template's (read through the instantiation), with the usual scope-policy/marks resolution against the instantiation.

See also
welder::alias_welded_for

Definition at line 283 of file carriage.hpp.

References welder::alias_welded_for(), and welder::member_bound().

◆ class_member_participates()

consteval bool welder::carriages::marker_resolution::class_member_participates ( std::meta::info mem,
lang L,
policy_kind pol,
std::meta::info  )
inlinestaticconsteval

A class member (field / method / operator / constructor — and, loosely, an enumerator) participates: its scope's policy + its own marks decide.

Resolved per overload, so a mark on one overload (or one constructor) excludes just that one. The trailing reflection is the entity whose binding receives the member — the welded type, held fixed through the base-flattening recursion (== parent_of(mem) except for a flattened base's member); context for bespoke rules, unused here.

Definition at line 296 of file carriage.hpp.

References welder::member_bound().

◆ counts_as_registered()

consteval bool welder::carriages::marker_resolution::counts_as_registered ( std::meta::info type,
lang L )
inlinestaticconsteval

The gate's registration oracle: welded ⇒ registered (the welder::welded_registration rule), plus the nested-type rule — a class-scoped type registers with its enclosing class's binding, so it counts iff it resolves as a member of a counting outer (see detail::nested_type_registered, the exact mirror of the carriage's nested-type sweep).

A pure predicate of the declaration — never a visited-set — so welding in several passes and forward references between welded types stay order-independent.

Definition at line 330 of file carriage.hpp.

References welder::is_nested_type(), welder::detail::nested_type_registered(), and welder::welded_for().

◆ is_native_base()

consteval bool welder::carriages::marker_resolution::is_native_base ( std::meta::info base,
lang L,
std::meta::info  )
inlinestaticconsteval

A base is a separately-registered native base iff the user welded it.

The trailing reflection is the type whose direct base list is being walked (context for bespoke rules; unused here).

Definition at line 262 of file carriage.hpp.

References welder::welded_for().

◆ member_participates()

consteval bool welder::carriages::marker_resolution::member_participates ( std::meta::info mem,
lang L,
policy_kind pol,
std::meta::info  )
inlinestaticconsteval

A namespace member (class/enum/function/variable) participates.

The trailing reflection is the namespace being swept (== parent_of(mem); context for bespoke rules; unused here).

Definition at line 274 of file carriage.hpp.

References welder::member_bound(), and welder::welded_for().

◆ namespace_participates()

consteval bool welder::carriages::marker_resolution::namespace_participates ( std::meta::info ns,
lang L,
policy_kind pol,
std::meta::info  )
inlinestaticconsteval

A nested namespace participates (recurse + submodule).

The trailing reflection is the parent namespace (== parent_of(ns); unused here).

Definition at line 317 of file carriage.hpp.

References welder::member_bound(), and welder::detail::namespace_has_bound().

◆ native_bases()

template<std::meta::info T, lang L>
consteval auto welder::carriages::marker_resolution::native_bases ( )
inlinestaticconsteval

T's native (welded) base list, for the class handle.

Definition at line 268 of file carriage.hpp.

References welder::detail::native_base_types().

◆ participates()

consteval bool welder::carriages::marker_resolution::participates ( std::meta::info entity,
lang L )
inlinestaticconsteval

A type/function/variable participates iff welded for L.

Definition at line 256 of file carriage.hpp.

References welder::welded_for().

◆ protected_participates()

consteval bool welder::carriages::marker_resolution::protected_participates ( std::meta::info mem,
lang L,
std::meta::info  )
inlinestaticconsteval

A protected member is admitted iff its declaring class says so — a policy::weld_protected annotation covering L (also the carriage's default when a resolution declares no hook; spelled out here as the documented contract).

Public members are always admitted and private members never are — both decided before this hook (see detail::member_access_admitted), so it arbitrates protected only. The trailing reflection is the entity whose binding receives the member — a bespoke hook can key on it ("admit this mixin's protected members, but only into Derived"); the shipped rule reads the declaring class.

Definition at line 311 of file carriage.hpp.

References welder::protected_welded().


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