welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
rod.hpp File Reference

welder pybind11 rod (header-only). More...

#include <array>
#include <cstddef>
#include <memory>
#include <meta>
#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 dependency graph for rod.hpp:
This graph shows which files directly or indirectly include this file:

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

Detailed Description

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):

#include <pybind11/pybind11.h>
PYBIND11_MODULE(mymod, m) {
}
welder pybind11 rod (header-only).
welder's binding entry point, parameterized on a rod.
Definition welder.hpp:85

(For the WELDER_MODULE entry-point macro, include this directory's module.hpp instead.)

Definition in file rod.hpp.