2 #include <pybind11/pybind11.h>
3 #include <pybind11/stl.h>
10 #ifndef BINDER_PYBIND11_TYPE_CASTER
11 #define BINDER_PYBIND11_TYPE_CASTER
12 PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)
13 PYBIND11_DECLARE_HOLDER_TYPE(T, T*)
14 PYBIND11_MAKE_OPAQUE(std::shared_ptr<void>)
20 using mvsim::UnexpectedMessageException::UnexpectedMessageException;
22 const char*
what()
const throw()
override
24 pybind11::gil_scoped_acquire gil;
25 pybind11::function overload = pybind11::get_overload(
26 static_cast<const mvsim::UnexpectedMessageException*
>(
this),
"what");
29 auto o = overload.operator()<pybind11::return_value_policy::reference>();
30 if (pybind11::detail::cast_is_temporary_value_reference<const char*>::value)
33 #if (PYBIND11_MAJOR_VERSION == 2 && PYBIND11_MINOR_VERSION <= 4)
34 static pybind11::detail::overload_caster_t<const char*> caster;
36 static pybind11::detail::override_caster_t<const char*> caster;
38 return pybind11::detail::cast_ref<const char*>(std::move(o), caster);
41 return pybind11::detail::cast_safe<const char*>(std::move(o));
43 return runtime_error::what();
51 mvsim::UnexpectedMessageException, std::shared_ptr<mvsim::UnexpectedMessageException>,
53 cl(M(
"mvsim"),
"UnexpectedMessageException",
"");
54 cl.def(pybind11::init<const char*>(), pybind11::arg(
"reason"));
58 cl.def(pybind11::init([](mvsim::UnexpectedMessageException
const& o)
59 {
return new mvsim::UnexpectedMessageException(o); }));
62 (
class mvsim::UnexpectedMessageException &
63 (mvsim::UnexpectedMessageException::*)(
const class mvsim::
64 UnexpectedMessageException&)) &
65 mvsim::UnexpectedMessageException::operator=,
66 "C++: mvsim::UnexpectedMessageException::operator=(const class "
67 "mvsim::UnexpectedMessageException &) --> class "
68 "mvsim::UnexpectedMessageException &",
69 pybind11::return_value_policy::automatic, pybind11::arg(""));