python/generated-sources/mvsim/Comms/common.cpp
Go to the documentation of this file.
1 #include <mvsim/Comms/common.h>
2 #include <sstream> // __str__
3 #include <stdexcept>
4 
5 #include <pybind11/pybind11.h>
6 #include <functional>
7 #include <string>
8 #include <pybind11/stl.h>
9 
10 
11 #ifndef BINDER_PYBIND11_TYPE_CASTER
12  #define BINDER_PYBIND11_TYPE_CASTER
13  PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>);
15  PYBIND11_MAKE_OPAQUE(std::shared_ptr<void>);
16 #endif
17 
18 // mvsim::UnexpectedMessageException file:mvsim/Comms/common.h line:49
19 struct PyCallBack_mvsim_UnexpectedMessageException : public mvsim::UnexpectedMessageException {
20  using mvsim::UnexpectedMessageException::UnexpectedMessageException;
21 
22  const char * what() const noexcept override {
23  pybind11::gil_scoped_acquire gil;
24  pybind11::function overload = pybind11::get_overload(static_cast<const mvsim::UnexpectedMessageException *>(this), "what");
25  if (overload) {
26  auto o = overload.operator()<pybind11::return_value_policy::reference>();
27  if (pybind11::detail::cast_is_temporary_value_reference<const char *>::value) {
28  static pybind11::detail::overload_caster_t<const char *> caster;
29  return pybind11::detail::cast_ref<const char *>(std::move(o), caster);
30  }
31  else return pybind11::detail::cast_safe<const char *>(std::move(o));
32  }
33  return runtime_error::what();
34  }
35 };
36 
37 void bind_mvsim_Comms_common(std::function< pybind11::module &(std::string const &namespace_) > &M)
38 {
39  { // mvsim::UnexpectedMessageException file:mvsim/Comms/common.h line:49
40  pybind11::class_<mvsim::UnexpectedMessageException, std::shared_ptr<mvsim::UnexpectedMessageException>, PyCallBack_mvsim_UnexpectedMessageException, std::runtime_error> cl(M("mvsim"), "UnexpectedMessageException", "");
41  cl.def( pybind11::init<const char *>(), pybind11::arg("reason") );
42 
43  cl.def( pybind11::init( [](PyCallBack_mvsim_UnexpectedMessageException const &o){ return new PyCallBack_mvsim_UnexpectedMessageException(o); } ) );
44  cl.def( pybind11::init( [](mvsim::UnexpectedMessageException const &o){ return new mvsim::UnexpectedMessageException(o); } ) );
45  cl.def("assign", (class mvsim::UnexpectedMessageException & (mvsim::UnexpectedMessageException::*)(const class mvsim::UnexpectedMessageException &)) &mvsim::UnexpectedMessageException::operator=, "C++: mvsim::UnexpectedMessageException::operator=(const class mvsim::UnexpectedMessageException &) --> class mvsim::UnexpectedMessageException &", pybind11::return_value_policy::automatic, pybind11::arg(""));
46  }
47 }
void bind_mvsim_Comms_common(std::function< pybind11::module &(std::string const &namespace_) > &M)
PYBIND11_MAKE_OPAQUE(std::shared_ptr< void >)
PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr< T >)


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:51