|
Boost.PythonHeader <boost/python/opaque_pointer_converter.hpp> |
opaque_pointer_converter<P>
opaque_pointer_converter
synopsisBOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID
opaque_pointer_converter<P>
opaque_pointer_converter<>
is derived from
to_python_converter
and registers itself as an
lvalue_from_pytype
converter from Python objects
into pointers to undefined types.
Thus it may be used as a converter from opaque pointers into
Python objects and vice versa.
opaque_pointer_converter
synopsisnamespace boost { namespace python { template<class Pointer> struct opaque_pointer_converter : to_python_converter< Pointer, opaque_pointer_converter<Pointer> > { explicit opaque_pointer_converter(char const* name); }; }}
opaque_pointer_converter
constructorexplicit opaque_pointer_converter(char const* name);
Registers the instance as a
lvalue_from_pytype
converter from Python objects
into opaque pointers.
The name is used for the type of the Python Objects created; it should be printable but needn't be an ntbs because the object type is not supposed to be user constructible within python scripts.
This macro must be used to define specializations of the type_id function which can't be instantiated for incomplete types.
In order for this to work in a cross-module environment the macro must be invoked in every translation unit which uses the opaque_pointer_converter.
Revised 10 March, 2003
© Copyright 2003 Haufe Mediengruppe. All Rights Reserved.