|
Boost.PythonExtractor Concept |
An Extractor is a class which Boost.Python can use to extract C++
objects from Python objects, and is typically used by facilities that
define from_python
conversions for
"traditional" Python extension types.
In the table below, X
denotes a model of
Extractor and a
denotes an instance of a Python
object type.
Expression | Type | Semantics |
X::execute(a) |
non-void | Returns the C++ object being extracted. The
execute function must not be overloaded.
|
&a.ob_type
| PyTypeObject**
| Points to the ob_type field of an object which is
layout-compatible with PyObject
|
execute
member must be a
non-overloaded static function whose single argument is a Python
object type. Acceptable Python object types include those publicly (and
unambiguously) derived from PyObject
, and POD types which
are layout-compatible with PyObject.
Revised 13 November, 2002
© Copyright Dave Abrahams 2002.
Permission to copy, use, modify, sell and distribute this software is granted provided this copyright notice appears in all copies. This software is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.