|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
welder pybind11 rod (header-only). More...
#include <array>#include <cstddef>#include <cstdint>#include <memory>#include <meta>#include <optional>#include <string>#include <type_traits>#include <utility>#include <welder/welder.hpp>#include <welder/rods/python/doc_style.hpp>#include <welder/rods/python/operators.hpp>#include <welder/rods/python/trampoline.hpp>#include <welder/bind_traits.hpp>#include <welder/doc.hpp>#include <pybind11/pybind11.h>#include <pybind11/native_enum.h>#include <pybind11/stl_bind.h>#include <welder/containers.hpp>#include <welder/rods/python/array_interface.hpp>Go to the source code of this file.
Classes | |
| struct | welder::rods::pybind11::rod< DocStyle > |
| The pybind11 rod: a stateless policy type satisfying welder::rod. More... | |
| struct | welder::rods::pybind11::rod< DocStyle >::enum_handle< E > |
| Owning handle for a py::native_enum<E>, plus the scope + name to reach the finalized enum object. More... | |
Namespaces | |
| namespace | welder |
| namespace | welder::rods |
| namespace | welder::rods::pybind11 |
Macros | |
| #define | WELDER_OPAQUE(...) |
| Declare a container type opaque so pybind11 binds it by reference (via weld-an-alias + bind_vector/bind_map) instead of copy-converting it through <pybind11/stl.h>. | |
welder pybind11 rod (header-only).
This is a thin rod: it implements welder's rod contract (<welder/welder.hpp>) for pybind11 and hands the traversal/resolution off to welder's generic driver. All the language-agnostic work — deciding which members bind, gating bindability, folding docstrings, walking bases and namespaces — lives in the core; only the pybind11 emission primitives are here. The nanobind / lua backends mirror this file against their own frameworks.
Requires the welder vocabulary first (#include <welder/vocabulary.hpp>). This header exposes exactly one thing: the rod template welder::rods::pybind11::rod<DocStyle = google_style>, to plug into welder::welder (rod<> for the default Google docstring style; rod<numpy_style> / rod<sphinx_style> for the other dialects):
(For the WELDER_MODULE entry-point macro, include this directory's module.hpp instead.)
Definition in file rod.hpp.
| #define WELDER_OPAQUE | ( | ... | ) |
Declare a container type opaque so pybind11 binds it by reference (via weld-an-alias + bind_vector/bind_map) instead of copy-converting it through <pybind11/stl.h>.
A thin, backend-neutral spelling of PYBIND11_MAKE_OPAQUE; place it at namespace scope, before the module. In a translation unit that includes more than one Python rod, use the framework-native macros directly (this resolves to whichever rod header was included first).