Home
last modified time | relevance | path

Searched refs:Pickleable (Results 1 – 2 of 2) sorted by relevance

/external/python/pybind11/tests/
Dtest_pickling.cpp14 class Pickleable { in TEST_SUBMODULE() class
16 Pickleable(const std::string &value) : m_value(value) { } in TEST_SUBMODULE() function in TEST_SUBMODULE::Pickleable
29 class PickleableNew : public Pickleable { in TEST_SUBMODULE()
31 using Pickleable::Pickleable; in TEST_SUBMODULE()
34 py::class_<Pickleable> pyPickleable(m, "Pickleable"); in TEST_SUBMODULE()
37 .def("value", &Pickleable::value) in TEST_SUBMODULE()
38 .def("extra1", &Pickleable::extra1) in TEST_SUBMODULE()
39 .def("extra2", &Pickleable::extra2) in TEST_SUBMODULE()
40 .def("setExtra1", &Pickleable::setExtra1) in TEST_SUBMODULE()
41 .def("setExtra2", &Pickleable::setExtra2) in TEST_SUBMODULE()
[all …]
/external/python/pybind11/docs/advanced/
Dclasses.rst765 class Pickleable {
767 Pickleable(const std::string &value) : m_value(value) { }
783 py::class_<Pickleable>(m, "Pickleable")
785 .def("value", &Pickleable::value)
786 .def("extra", &Pickleable::extra)
787 .def("setExtra", &Pickleable::setExtra)
789 [](const Pickleable &p) { // __getstate__
798 Pickleable p(t[0].cast<std::string>());
820 p = Pickleable("test_value")