25 #ifndef LSST_DAF_PERSISTENCE_PYTHON_READPROXY_H
26 #define LSST_DAF_PERSISTENCE_PYTHON_READPROXY_H
28 #include "pybind11/pybind11.h"
32 namespace persistence {
58 auto implicit_caster = [](PyObject *obj, PyTypeObject *
type) -> PyObject * {
59 if (!py::detail::make_caster<lsst::daf::persistence::python::ReadProxyBase>().load(obj,
false)) {
62 PyObject *
result = PyObject_GetAttrString(obj,
"__subject__");
69 if (
auto tinfo = py::detail::get_type_info(
typeid(OutputType))) {
70 tinfo->implicit_conversions.push_back(implicit_caster);
72 py::pybind11_fail(
"register_proxy: Unable to find type " + py::type_id<OutputType>());