38 #include <boost/python.hpp> 61 def(
"func2", (
int(*)(
int,
int))0, f_func2());
68 class_<AClass>(
"AClass",
"a class")
70 .def(init<
int, optional<double> >())
72 .def(
"AMethod", (
int(
AClass::*)(
int,
double))0,
73 f_AMethod(args(
"i",
"d"),
"amethod"))
75 .def(
"BMethod",
f2_BMethod, args(
"i",
"d"),
"bmethod2")
77 f_CMethod((arg(
"i"), arg(
"d1")=1., arg(
"d2")=2.),
78 "cmethod: return i*d1*d2")
double CMethod(int i, double d1=1., double d2=2.)
BOOST_PYTHON_FUNCTION_OVERLOADS(f_func2, func2, 1, 2)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_AMethod, AMethod, 0, 2)
BOOST_PYTHON_MODULE(test05)
double(AClass::* f2_BMethod)(double)
int(AClass::* f1_BMethod)()