Lines Matching refs:def

213     emna.def(py::init<>())
214 .def(py::init<int>())
215 .def(py::init<const ExampleMandA&>())
216 .def("add1", &ExampleMandA::add1)
217 .def("add2", &ExampleMandA::add2)
218 .def("add3", &ExampleMandA::add3)
219 .def("add4", &ExampleMandA::add4)
220 .def("add5", &ExampleMandA::add5)
221 .def("add6", &ExampleMandA::add6)
222 .def("add7", &ExampleMandA::add7)
223 .def("add8", &ExampleMandA::add8)
224 .def("add9", &ExampleMandA::add9)
225 .def("add10", &ExampleMandA::add10)
226 .def("self1", &ExampleMandA::self1)
227 .def("self2", &ExampleMandA::self2)
228 .def("self3", &ExampleMandA::self3)
229 .def("self4", &ExampleMandA::self4)
230 .def("self5", &ExampleMandA::self5)
231 .def("internal1", &ExampleMandA::internal1)
232 .def("internal2", &ExampleMandA::internal2)
233 .def("internal3", &ExampleMandA::internal3)
234 .def("internal4", &ExampleMandA::internal4)
235 .def("internal5", &ExampleMandA::internal5)
237 .def("overloaded", py::overload_cast<>(&ExampleMandA::overloaded))
238 .def("overloaded", py::overload_cast<int>(&ExampleMandA::overloaded))
239 .def("overloaded", py::overload_cast<int, float>(&ExampleMandA::overloaded))
240 .def("overloaded", py::overload_cast<float, int>(&ExampleMandA::overloaded))
241 .def("overloaded", py::overload_cast<int, int>(&ExampleMandA::overloaded))
242 .def("overloaded", py::overload_cast<float, float>(&ExampleMandA::overloaded))
243 .def("overloaded_float", py::overload_cast<float, float>(&ExampleMandA::overloaded))
244 .def("overloaded_const", py::overload_cast<int >(&ExampleMandA::overloaded, py::const_))
245 .def("overloaded_const", py::overload_cast<int, float>(&ExampleMandA::overloaded, py::const_))
246 .def("overloaded_const", py::overload_cast<float, int>(&ExampleMandA::overloaded, py::const_))
247 .def("overloaded_const", py::overload_cast<int, int>(&ExampleMandA::overloaded, py::const_))
248 .def("overloaded_const", py::overload_cast<float, float>(&ExampleMandA::overloaded, py::const_))
251 .def("overloaded", overload_cast_<>()(&ExampleMandA::overloaded))
252 .def("overloaded", overload_cast_<int>()(&ExampleMandA::overloaded))
253 .def("overloaded", overload_cast_<int, float>()(&ExampleMandA::overloaded))
254 .def("overloaded", static_cast<py::str (ExampleMandA::*)(float, int)>(&ExampleMandA::overloaded))
255 .def("overloaded", static_cast<py::str (ExampleMandA::*)(int, int)>(&ExampleMandA::overloaded))
256 .def("overloaded", static_cast<py::str (ExampleMandA::*)(float, float)>(&ExampleMandA::overloaded))
257 .def("overloaded_float", overload_cast_<float, float>()(&ExampleMandA::overloaded))
258 .def("overloaded_const", overload_cast_<int >()(&ExampleMandA::overloaded, py::const_))
259 .def("overloaded_const", overload_cast_<int, float>()(&ExampleMandA::overloaded, py::const_))
260 .def("overloaded_const", static_cast<py::str (ExampleMandA::*)(float, int) const>(&ExampleMandA::overloaded))
261 .def("overloaded_const", static_cast<py::str (ExampleMandA::*)(int, int) const>(&ExampleMandA::overloaded))
262 .def("overloaded_const", static_cast<py::str (ExampleMandA::*)(float, float) const>(&ExampleMandA::overloaded))
268 emna.def ("overload_mixed1", static_cast<py::str (ExampleMandA::*)(int, int)>(&ExampleMandA::overloaded))
274 .def ("overload_mixed2", static_cast<py::str (ExampleMandA::*)(int, int)>(&ExampleMandA::overloaded));
276 .def("__str__", &ExampleMandA::toString)
285 .def(py::init<>())
310 .def(py::init<>())
322 .def(py::init<>())
352 .def(py::init());
356 .def(py::init());
373 .def(py::init<>())
374 .def("f", &ArgInspector::f, py::arg(), py::arg() = ArgAlwaysConverts())
375 .def("g", &ArgInspector::g, "a"_a.noconvert(), "b"_a, "c"_a.noconvert()=13, "d"_a=ArgInspector2(), py::arg() = ArgAlwaysConverts())
378 m.def("arg_inspect_func", [](ArgInspector2 a, ArgInspector1 b, ArgAlwaysConverts) { return a.arg + "\n" + b.arg; },
381 m.def("floats_preferred", [](double f) { return 0.5 * f; }, py::arg("f"));
382 m.def("floats_only", [](double f) { return 0.5 * f; }, py::arg("f").noconvert());
383 m.def("ints_preferred", [](int i) { return i / 2; }, py::arg("i"));
384 m.def("ints_only", [](int i) { return i / 2; }, py::arg("i").noconvert());
393 m.def("bad_arg_def_named", []{
395 m.def("should_fail", [](int, UnregisteredType) {}, py::arg(), py::arg("a") = UnregisteredType());
397 m.def("bad_arg_def_unnamed", []{
399 m.def("should_fail", [](int, UnregisteredType) {}, py::arg(), py::arg() = UnregisteredType());
404 .def(py::init<>());
405 m.def("no_none1", &none1, py::arg().none(false));
406 m.def("no_none2", &none2, py::arg().none(false));
407 m.def("no_none3", &none3, py::arg().none(false));
408 m.def("no_none4", &none4, py::arg().none(false));
409 m.def("no_none5", &none5, py::arg().none(false));
410 m.def("ok_none1", &none1);
411 m.def("ok_none2", &none2, py::arg().none(true));
412 m.def("ok_none3", &none3);
413 m.def("ok_none4", &none4, py::arg().none(true));
414 m.def("ok_none5", &none5);
419 .def(py::init<int>())
420 .def(py::init<>())
421 .def("__str__", [](const StrIssue &si) {
432 .def(py::init<>())
433 .def("do_nothing", &RegisteredDerived::do_nothing)
434 .def("increase_value", &RegisteredDerived::increase_value)
443 .def("sum", &RegisteredDerived::sum)
453 m.def("custom_caster_no_destroy", []() { static auto *dt = new DestructionTester(); return dt; });
455 m.def("custom_caster_destroy", []() { return new DestructionTester(); },
457 m.def("custom_caster_destroy_const", []() -> const DestructionTester * { return new DestructionTester(); },
459 m.def("destruction_tester_cstats", &ConstructorStats::get<DestructionTester>, py::return_value_policy::reference);