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>)
19 :
public mvsim::UnexpectedMessageException
21 using mvsim::UnexpectedMessageException::UnexpectedMessageException;
23 const char*
what()
const throw()
override 25 pybind11::gil_scoped_acquire gil;
26 pybind11::function overload = pybind11::get_overload(
27 static_cast<const mvsim::UnexpectedMessageException*>(
this),
32 overload.operator()<pybind11::return_value_policy::reference>();
33 if (pybind11::detail::cast_is_temporary_value_reference<
37 #if (PYBIND11_MAJOR_VERSION == 2 && PYBIND11_MINOR_VERSION <= 4) 38 static pybind11::detail::overload_caster_t<const char*> caster;
40 static pybind11::detail::override_caster_t<const char*> caster;
42 return pybind11::detail::cast_ref<const char*>(
43 std::move(o), caster);
46 return pybind11::detail::cast_safe<const char*>(std::move(o));
48 return runtime_error::what();
53 std::function<pybind11::module&(std::string
const& namespace_)>& M)
57 mvsim::UnexpectedMessageException,
58 std::shared_ptr<mvsim::UnexpectedMessageException>,
60 cl(M(
"mvsim"),
"UnexpectedMessageException",
"");
61 cl.def(pybind11::init<const char*>(), pybind11::arg(
"reason"));
63 cl.def(pybind11::init(
64 [](PyCallBack_mvsim_UnexpectedMessageException
const& o) {
65 return new PyCallBack_mvsim_UnexpectedMessageException(o);
67 cl.def(pybind11::init([](mvsim::UnexpectedMessageException
const& o) {
68 return new mvsim::UnexpectedMessageException(o);
72 (
class mvsim::UnexpectedMessageException &
74 UnexpectedMessageException::*)(
const class mvsim::
75 UnexpectedMessageException&)) &
76 mvsim::UnexpectedMessageException::operator=,
77 "C++: mvsim::UnexpectedMessageException::operator=(const class " 78 "mvsim::UnexpectedMessageException &) --> class " 79 "mvsim::UnexpectedMessageException &",
80 pybind11::return_value_policy::automatic, pybind11::arg(
""));
void bind_mvsim_Comms_common(std::function< pybind11::module &(std::string const &namespace_)> &M)
const char * what() const override