File: opaque_pointer_converter.qbk

package info (click to toggle)
boost1.88 1.88.0-1.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 577,108 kB
  • sloc: cpp: 4,149,243; xml: 136,789; ansic: 35,092; python: 33,910; asm: 5,698; sh: 4,604; ada: 1,681; makefile: 1,632; pascal: 1,139; perl: 1,124; sql: 640; yacc: 478; ruby: 271; java: 77; lisp: 24; csh: 6
file content (31 lines) | stat: -rw-r--r-- 1,469 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[section boost/python/opaque_pointer_converter.hpp]
[section Introduction]
`opaque<>` registers itself as a converter from Python objects to pointers to undefined types and vice versa.
``
namespace boost { namespace python
{
    template<class Pointee>
    struct opaque
    {
        opaque();
    };
}}
``
[endsect]
[section Class template `opaque` constructor]
``opaque();``
[variablelist
[[Effects][
* Registers the instance as a [link to_from_python_type_conversion.boost_python_lvalue_from_pytype_.class_template_lvalue_from_pytyp `lvalue_from_pytype`] converter from Python objects into opaque pointers.
  The Python Objects created are named after the type pointed to by the opaque pointer being wrapped.
* Registers the instance as a [link to_from_python_type_conversion.boost_python_to_python_converter.class_template_to_python_convert `to_python_converter`] from opaque pointers to Python objects.
]]
]
[note If there is already an instance registered by another module, this instance doesn't try to register again in order to avoid warnings about multiple registrations.]

[endsect]
[section Macro `BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee)`]
This macro must be used to define specializations of the [link utility_and_infrastructure.boost_python_type_id_hpp.functions `type_id`] function which can't be instantiated for incomplete types.
[note The macro must be invoked in every translation unit which uses the opaque converter.]
[endsect]
[endsect]