Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 1 | /* |
| 2 | example/example.cpp -- pybind example plugin |
| 3 | |
Wenzel Jakob | 8cb6cb3 | 2016-04-17 20:21:41 +0200 | [diff] [blame] | 4 | Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> |
Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 5 | |
| 6 | All rights reserved. Use of this source code is governed by a |
| 7 | BSD-style license that can be found in the LICENSE file. |
| 8 | */ |
| 9 | |
| 10 | #include "example.h" |
| 11 | |
Jason Rhinelander | b3f3d79 | 2016-07-18 16:43:18 -0400 | [diff] [blame] | 12 | void init_ex_methods_and_attributes(py::module &); |
| 13 | void init_ex_python_types(py::module &); |
| 14 | void init_ex_operator_overloading(py::module &); |
| 15 | void init_ex_constants_and_functions(py::module &); |
| 16 | void init_ex_callbacks(py::module &); |
| 17 | void init_ex_sequences_and_iterators(py::module &); |
| 18 | void init_ex_buffers(py::module &); |
| 19 | void init_ex_smart_ptr(py::module &); |
| 20 | void init_ex_modules(py::module &); |
| 21 | void init_ex_numpy_vectorize(py::module &); |
| 22 | void init_ex_arg_keywords_and_defaults(py::module &); |
| 23 | void init_ex_virtual_functions(py::module &); |
| 24 | void init_ex_keep_alive(py::module &); |
| 25 | void init_ex_opaque_types(py::module &); |
| 26 | void init_ex_pickling(py::module &); |
| 27 | void init_ex_inheritance(py::module &); |
| 28 | void init_ex_stl_binder_vector(py::module &); |
| 29 | void init_ex_eval(py::module &); |
| 30 | void init_ex_custom_exceptions(py::module &); |
Wenzel Jakob | 17cdb06 | 2016-03-10 13:24:10 +0100 | [diff] [blame] | 31 | void init_issues(py::module &); |
Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 32 | |
Wenzel Jakob | 9e0a056 | 2016-05-05 20:33:54 +0200 | [diff] [blame] | 33 | #if defined(PYBIND11_TEST_EIGEN) |
| 34 | void init_eigen(py::module &); |
| 35 | #endif |
| 36 | |
Wenzel Jakob | b1b7140 | 2015-10-18 16:48:30 +0200 | [diff] [blame] | 37 | PYBIND11_PLUGIN(example) { |
Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 38 | py::module m("example", "pybind example plugin"); |
| 39 | |
Jason Rhinelander | b3f3d79 | 2016-07-18 16:43:18 -0400 | [diff] [blame] | 40 | init_ex_methods_and_attributes(m); |
| 41 | init_ex_python_types(m); |
| 42 | init_ex_operator_overloading(m); |
| 43 | init_ex_constants_and_functions(m); |
| 44 | init_ex_callbacks(m); |
| 45 | init_ex_sequences_and_iterators(m); |
| 46 | init_ex_buffers(m); |
| 47 | init_ex_smart_ptr(m); |
| 48 | init_ex_modules(m); |
| 49 | init_ex_numpy_vectorize(m); |
| 50 | init_ex_arg_keywords_and_defaults(m); |
| 51 | init_ex_virtual_functions(m); |
| 52 | init_ex_keep_alive(m); |
| 53 | init_ex_opaque_types(m); |
| 54 | init_ex_pickling(m); |
| 55 | init_ex_inheritance(m); |
| 56 | init_ex_stl_binder_vector(m); |
| 57 | init_ex_eval(m); |
| 58 | init_ex_custom_exceptions(m); |
Wenzel Jakob | 17cdb06 | 2016-03-10 13:24:10 +0100 | [diff] [blame] | 59 | init_issues(m); |
Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 60 | |
Wenzel Jakob | 9e0a056 | 2016-05-05 20:33:54 +0200 | [diff] [blame] | 61 | #if defined(PYBIND11_TEST_EIGEN) |
| 62 | init_eigen(m); |
| 63 | #endif |
| 64 | |
Wenzel Jakob | 38bd711 | 2015-07-05 20:05:44 +0200 | [diff] [blame] | 65 | return m.ptr(); |
| 66 | } |