38namespace welder::inline v0::rods::opaque_containers {
85 template <
class T,
auto Bases, std::size_t... I>
87 const char* , std::index_sequence<I...>) {
92 template <
class T, std::meta::info Decl,
auto Bases, std::size_t... I>
94 const char* , std::index_sequence<I...>) {
97 template <
class T,
auto Bases, std::size_t... I>
99 const char* ,
const char* ,
100 std::index_sequence<I...>) {
107 template <
class T, auto Ctors,
bool HasDefault,
bool Aggregate,
bool Copyable>
109 template for (
constexpr auto ctor : std::define_static_array(Ctors))
110 cls.
doc->template collect_callable<ctor, ::welder::naming::none>(
false);
116 template <std::meta::info Mem,
class Style = ::welder::naming::none>
118 cls.
doc->template collect<std::meta::type_of(Mem), Style,
119 std::meta::parent_of(Mem), Mem>(
126 template <
class T, std::meta::info Getter, std::meta::info Setter>
128 cls.
doc->template collect_callable<Getter, ::welder::naming::none>(
false);
129 if constexpr (Setter != std::meta::info{})
130 cls.
doc->template collect_callable<Setter, ::welder::naming::none>(
false);
133 template <auto Fns,
class Style = ::welder::naming::none>
135 template for (
constexpr auto fn : std::define_static_array(Fns))
136 cls.
doc->template collect_callable<fn, Style>(
true);
138 template <auto Fns,
class Style = ::welder::naming::none>
140 template for (
constexpr auto fn : std::define_static_array(Fns))
141 cls.
doc->template collect_callable<fn, Style>(
true);
143 template <
class T, auto Fns>
145 template for (
constexpr auto fn : std::define_static_array(Fns))
146 cls.
doc->template collect_callable<fn, ::welder::naming::none>(
false);
148 template <
class T, auto Fns, auto Covered>
150 template <
class T, std::meta::info Fn>
157 const ::welder::detail::enum_doc&) {
162 const ::welder::detail::enum_doc&) {
165 template <std::meta::info,
class = ::welder::naming::none>
176 template <auto Fns,
class Style = ::welder::naming::none>
178 template for (
constexpr auto fn : std::define_static_array(Fns))
179 m.
doc->template collect_callable<fn, Style>(
true);
184 template <std::meta::info Var,
class Style = ::welder::naming::none>
186 m.
doc->template collect<std::meta::type_of(Var), Style,
187 std::meta::parent_of(Var), Var>(
false,
true);
206 template <std::meta::info Ns,
class Style = ::welder::naming::none>
208 static_assert(std::meta::is_namespace(Ns),
209 "welder: opaque_containers::generate<Ns>: Ns must reflect a "
220static_assert(::welder::rod<rod>,
221 "welder::rods::opaque_containers::rod must satisfy welder::rod");
The contract a rod (a welder backend, welder::rods::…::rod) must satisfy to plug into the generic dri...
The one opt-out mark of the opaque-container generator (welder::rods::opaque_containers::rod): welder...
consteval std::string namespace_name(std::meta::info ns)
The fully-qualified spelling of namespace ns for a namespace X { … } header block (no leading :: — ge...
consteval bool marked_by_value(std::meta::info entity)
Does entity carry a by_value 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 opaque-container generator rod: the collector that gathers the ref...
The accumulator threaded through the rod's emission hooks: the deduped set of reference containers th...
The per-class handle: it carries the document so the per-member hooks (add_field / add_method / …) ca...
The enum handle — enums use no containers, so it carries nothing.
A copyable handle onto the growing document threaded through every emission primitive (the rod's modu...
No deferred module state.
static void set_module_doc(module_type &, const char *)
module_handle module_type
static enum_handle make_enum(module_type &, const char *, const ::welder::detail::enum_doc &)
static session open_module(module_type &)
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); the generator keys off member t...
static void add_stringifier(class_handle &)
static void add_field(class_handle &cls)
Collect the container(s) in data member Mem's type — excluded when Mem carries [[=welder::rods::pytho...
static void add_static_method(class_handle &cls)
static void generate(std::ostream &os)
Emit the opaque-container header for the welded types in namespace Ns to os.
static void finish_enum(enum_handle &)
static module_type add_submodule(module_type &m, const char *name)
Recurse into a nested namespace, carrying the document through.
class_handle class_handle_type
enum_handle enum_handle_type
static consteval const char * special_method_name(std::meta::info)
No operators expose special names here (containers are collected from operator signatures directly).
static void add_enumerator(enum_handle &)
static void add_method(class_handle &cls)
static constexpr bool has_native_caster
Permissive: the generator only reads the welded surface to find containers, so it does not need a bac...
static class_handle make_class(module_type &m, const char *, const char *, std::index_sequence< I... >)
static constexpr lang language
Opaque containers are Python-only.
static void add_property(class_handle &cls, const char *)
Collect from the property accessor signatures (getter return, setter param).
static class_handle make_nested_class(module_type &m, class_handle &, const char *, const char *, std::index_sequence< I... >)
static void add_operator(class_handle &cls)
static void close_module(module_type &, session &)
static enum_handle make_nested_enum(module_type &, class_handle &, const char *, const ::welder::detail::enum_doc &)
static void add_variable(module_type &m, session &, const char *=nullptr)
Collect the container(s) in a namespace variable's type (a Style-aware site).
static void add_constructors(class_handle &cls)
Collect from each participating constructor's parameter types.
static void add_comparisons(class_handle &)
static void add_function(module_type &m, const char *=nullptr)
Collect from a free function's overload group signatures (a Style-aware site).
welder's binding entry point, parameterized on a rod.
welder's binding entry point: the welder::welder struct.