|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
welder sol2 Lua rod (header-only). More...
#include <array>#include <cstddef>#include <functional>#include <meta>#include <type_traits>#include <utility>#include <vector>#include <welder/welder.hpp>#include <welder/rods/lua/sol2/metamethods.hpp>#include <welder/bind_traits.hpp>#include <sol/sol.hpp>Go to the source code of this file.
Classes | |
| struct | welder::rods::sol2::rod |
| The sol2 rod: a stateless policy type satisfying welder::rod. More... | |
| struct | welder::rods::sol2::rod::session |
| Per-module session: the deferred state for live namespace variables. More... | |
| struct | welder::rods::sol2::rod::_enum_binding< E > |
| A welded enum's binding: the name→value table, how to mirror a name onto the enclosing scope, and whether the enum is scoped (an unscoped enum also mirrors its names onto the enclosing scope, like C++). More... | |
Namespaces | |
| namespace | welder |
| namespace | welder::rods |
| namespace | welder::rods::sol2 |
Typedefs | |
| template<class T, class... A> | |
| using | welder::rods::sol2::ctor_sig = T(A...) |
| The alias T(A...) — a constructor call signature, built by substitute (a namespace-scope alias so it can be reflected as ^^ctor_sig). | |
welder sol2 Lua rod (header-only).
This is a thin rod: it implements welder's rod contract (<welder/welder.hpp>) for sol2 and hands the traversal/resolution off to welder's generic driver. All the language-agnostic work — deciding which members bind, gating bindability, walking bases and namespaces — lives in the core; only the sol2 emission primitives are here. It targets a loadable Lua C module: Lua's require finds the shared object on package.cpath and enters it through the luaopen_<name> symbol, which welder's entry macro emits; the module registers its types onto a fresh table and returns it. sol2 is used through a sol::state_view over the borrowed lua_State* (welder does not own the interpreter).
Requires the welder vocabulary first (#include <welder/vocabulary.hpp>). This header exposes exactly one thing: the rod type welder::rods::sol2::rod, to plug into welder::welder:
or, more simply, via the backend-agnostic entry macro (include this directory's module.hpp instead):
Definition in file rod.hpp.