Lines Matching refs:Pickleable
14 class Pickleable {
16 Pickleable(const std::string &value) : m_value(value) { }
29 class PickleableNew : public Pickleable {
31 using Pickleable::Pickleable;
34 py::class_<Pickleable>(m, "Pickleable")
36 .def("value", &Pickleable::value)
37 .def("extra1", &Pickleable::extra1)
38 .def("extra2", &Pickleable::extra2)
39 .def("setExtra1", &Pickleable::setExtra1)
40 .def("setExtra2", &Pickleable::setExtra2)
43 .def("__getstate__", [](const Pickleable &p) {
47 .def("__setstate__", [](Pickleable &p, py::tuple t) {
51 new (&p) Pickleable(t[0].cast<std::string>());
58 py::class_<PickleableNew, Pickleable>(m, "PickleableNew")