pybind11/example
Jason Rhinelander 0ca96e2915 Added advanced doc section on virtual methods + inheritance
As discussed in #320.

The adds a documentation block that mentions that the trampoline classes
must provide overrides for both the classes' own virtual methods *and*
any inherited virtual methods.  It also provides a templated solution to
avoiding method duplication.

The example includes a third method (only mentioned in the "see also"
section of the documentation addition), using multiple inheritance.
While this approach works, and avoids code generation in deep
hierarchies, it is intrusive by requiring that the wrapped classes use
virtual inheritance, which itself is more instrusive if any of the
virtual base classes need anything other than default constructors.  As
per the discussion in #320, it is kept as an example, but not suggested
in the documentation.
2016-08-05 18:02:37 -04:00
..
CMakeLists.txt Improve CI test coverage: eigen, numpy and C++14 2016-07-30 17:18:33 +02:00
eigen.cpp Eigen support for special matrix objects 2016-08-04 15:24:41 -04:00
eigen.py Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
eigen.ref Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-arg-keywords-and-defaults.cpp Use generic arg names for functions without explicitly named arguments 2016-08-04 23:45:24 +02:00
example-arg-keywords-and-defaults.py Use generic arg names for functions without explicitly named arguments 2016-08-04 23:45:24 +02:00
example-arg-keywords-and-defaults.ref Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-buffers.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-buffers.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-buffers.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-callbacks.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-callbacks.py Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-callbacks.ref Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-constants-and-functions.cpp Fix scoped enums and add scoped enum example 2016-08-04 00:01:39 -04:00
example-constants-and-functions.py Only support ==/!= int on unscoped enums 2016-08-04 00:21:37 -04:00
example-constants-and-functions.ref Only support ==/!= int on unscoped enums 2016-08-04 00:21:37 -04:00
example-custom-exceptions.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-custom-exceptions.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-custom-exceptions.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-eval_call.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-eval.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-eval.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-eval.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-inheritance.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-inheritance.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-inheritance.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-keep-alive.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-keep-alive.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-keep-alive.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-methods-and-attributes.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-methods-and-attributes.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-methods-and-attributes.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-modules.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-modules.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-modules.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-numpy-vectorize.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-numpy-vectorize.py Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-numpy-vectorize.ref Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-opaque-types.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-opaque-types.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-opaque-types.ref Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-operator-overloading.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-operator-overloading.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-operator-overloading.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-pickling.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-pickling.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-pickling.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-python-types.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-python-types.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-python-types.ref Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
example-sequences-and-iterators.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-sequences-and-iterators.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-sequences-and-iterators.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-smart-ptr.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-smart-ptr.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-smart-ptr.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-stl-binder-vector.cpp minor namespace change in example 2016-07-19 17:35:09 +02:00
example-stl-binder-vector.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-stl-binder-vector.ref Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example-virtual-functions.cpp Added advanced doc section on virtual methods + inheritance 2016-08-05 18:02:37 -04:00
example-virtual-functions.py Added advanced doc section on virtual methods + inheritance 2016-08-05 18:02:37 -04:00
example-virtual-functions.ref Added advanced doc section on virtual methods + inheritance 2016-08-05 18:02:37 -04:00
example.cpp Rename examples files, as per #288 2016-07-18 16:43:18 -04:00
example.h last breaking change: be consistent about the project name 2015-10-15 18:23:56 +02:00
issues.cpp Fix #283: don't print first arg of constructor 2016-07-17 17:47:05 -04:00
issues.py Fix #283: don't print first arg of constructor 2016-07-17 17:47:05 -04:00
issues.ref Adopt PEP 484 type hints for C++ types exported to Python 2016-08-04 23:47:07 +02:00
object.h Initial commit 2015-07-09 15:27:32 +02:00
run_test.py Rename examples files, as per #288 2016-07-18 16:43:18 -04:00