| 427 | }; |
| 428 | |
| 429 | struct def_function |
| 430 | { |
| 431 | def_function(char const* name) |
| 432 | : name(name) |
| 433 | {} |
| 434 | |
| 435 | template <class F> |
| 436 | void operator()(F f) const |
| 437 | { |
| 438 | boost::python::def(name, f); |
| 439 | } |
| 440 | |
| 441 | template <class F, class Keywords> |
| 442 | void operator()(F f, Keywords const& keywords) const |
| 443 | { |
| 444 | boost::python::def(name, f, keywords); |
| 445 | } |
| 446 | |
| 447 | char const* name; |
| 448 | }; |
| 449 | |
| 450 | } // namespace aux |
| 451 |