|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
Classes | |
| struct | rod |
| The LuaBridge3 rod: a stateless policy type satisfying welder::rod. More... | |
Typedefs | |
| template<class... A> | |
| using | ctor_sig = void(A...) |
| The alias void(A...) — a LuaBridge3 constructor signature (a function type whose parameters are the constructor arguments; the return type is ignored). | |
Functions | |
| template<class T, class... A> | |
| T | make_object (A... args) |
| A factory that constructs T from the constructor arguments (works for normal constructors and, via C++26 parenthesized init, aggregates). | |
| consteval const char * | lua_metamethod_name (std::meta::info f) |
| Map a member operator to its Lua metamethod __name, or nullptr if welder does not expose it (which also gates operator eligibility in the driver). | |
| using welder::rods::luabridge::ctor_sig = void(A...) |
|
consteval |
Map a member operator to its Lua metamethod __name, or nullptr if welder does not expose it (which also gates operator eligibility in the driver).
Unary vs binary is told apart by arity (a member operator takes 0 parameters when unary, 1 when binary), disambiguating the operators with both forms (+, -, *, &, ~). In-place compound assignments (operator+=, …), <=>, &&, ||, ++, -- and = are not mapped (same as the Python rods).
| f | a reflection of the operator function. |
Definition at line 49 of file metamethods.hpp.
Referenced by welder::rods::luabridge::rod::add_operator(), and welder::rods::luabridge::rod::special_method_name().
| T welder::rods::luabridge::make_object | ( | A... | args | ) |
A factory that constructs T from the constructor arguments (works for normal constructors and, via C++26 parenthesized init, aggregates).
Registered as the idiomatic T.new(…) static function — addConstructor alone only sets the call form T(…), but welder's Lua rods (like sol2) expose both. A namespace-scope template so &make_object<T, A...> is a plain function pointer to splice.
Definition at line 125 of file rod.hpp.
Referenced by welder::rods::luabridge::rod::_factory_array().