1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | |
---|
3 | <!-- Copyright 2003..2006 Haufe Mediengruppe. Distributed under the Boost --> |
---|
4 | <!-- Software License, Version 1.0. (See accompanying --> |
---|
5 | <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> |
---|
6 | |
---|
7 | <html> |
---|
8 | <head> |
---|
9 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
10 | <link rel="stylesheet" type="text/css" href="../boost.css"> |
---|
11 | |
---|
12 | <title>Boost.Python - <boost/python/opaque_pointer_converter.hpp></title> |
---|
13 | </head> |
---|
14 | |
---|
15 | <body> |
---|
16 | <table border="0" cellpadding="7" cellspacing="0" width="100%" summary= |
---|
17 | "header"> |
---|
18 | <tr> |
---|
19 | <td valign="top" width="300"> |
---|
20 | <h3><a href="../../../../index.htm"><img height="86" width="277" |
---|
21 | alt="C++ Boost" src="../../../../boost.png" border="0"></a></h3> |
---|
22 | </td> |
---|
23 | |
---|
24 | <td valign="top"> |
---|
25 | <h1 align="center"><a href="../index.html">Boost.Python</a></h1> |
---|
26 | |
---|
27 | <h2 align="center">Header |
---|
28 | <boost/python/opaque_pointer_converter.hpp></h2> |
---|
29 | </td> |
---|
30 | </tr> |
---|
31 | </table> |
---|
32 | <hr> |
---|
33 | |
---|
34 | <h2>Contents</h2> |
---|
35 | |
---|
36 | <dl class="page-index"> |
---|
37 | <dt><a href="#classes">Classes</a></dt> |
---|
38 | |
---|
39 | <dd> |
---|
40 | <dl class="page-index"> |
---|
41 | <dt><a href="#opaque-spec">Class template |
---|
42 | <code>opaque<Pointee></code></a></dt> |
---|
43 | |
---|
44 | <dd> |
---|
45 | <dl class="page-index"> |
---|
46 | <dt><a href="#opaque-spec-synopsis">Class template |
---|
47 | <code>opaque</code> synopsis</a></dt> |
---|
48 | </dl> |
---|
49 | </dd> |
---|
50 | </dl> |
---|
51 | </dd> |
---|
52 | |
---|
53 | <dt><a href="#macros">Macros</a></dt> |
---|
54 | <dd> |
---|
55 | <dl class="page-index"> |
---|
56 | <dt><a href="#BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID-spec">Macro |
---|
57 | <code>BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID</code></a></dt> |
---|
58 | </dl> |
---|
59 | </dd> |
---|
60 | |
---|
61 | <dt><a href="#see-also">See Also</a></dt> |
---|
62 | </dl> |
---|
63 | <hr> |
---|
64 | |
---|
65 | <h2><a name="classes"></a>Classes</h2> |
---|
66 | |
---|
67 | <h3><a name="opaque-spec"></a>Class template |
---|
68 | <code>opaque<P></code></h3> |
---|
69 | |
---|
70 | <p><code>opaque<></code> registers itself as a converter from |
---|
71 | Python objects to pointers to undefined types and vice versa.</p> |
---|
72 | |
---|
73 | <h4><a name="opaque-spec-synopsis"></a>Class template |
---|
74 | <code>opaque</code> synopsis</h4> |
---|
75 | <pre> |
---|
76 | namespace boost { namespace python |
---|
77 | { |
---|
78 | template<class Pointee> |
---|
79 | struct opaque |
---|
80 | { |
---|
81 | opaque(); |
---|
82 | }; |
---|
83 | }} |
---|
84 | </pre> |
---|
85 | |
---|
86 | <h4><a name="opaque-spec-constructor"></a>Class template |
---|
87 | <code>opaque</code> constructor</h4> |
---|
88 | <pre> |
---|
89 | opaque(); |
---|
90 | </pre> |
---|
91 | |
---|
92 | <dl class="function-semantics"> |
---|
93 | <dt><b>Effects:</b> |
---|
94 | <ul> |
---|
95 | <li>Registers the instance as a |
---|
96 | <a href="lvalue_from_pytype.html#lvalue_from_pytype-spec"> <code>lvalue_from_pytype</code></a> |
---|
97 | converter from Python objects into opaque pointers.</p> |
---|
98 | <p>The Python Objects created are named after the type pointed to |
---|
99 | by the opaque pointer being wrapped.</p></li> |
---|
100 | <li>Registers the instance as a |
---|
101 | <a href="to_python_converter.html#to_python_converter-spec"> <code>to_python_converter</code></a> |
---|
102 | from opaque pointers to Python objects.</p></li> |
---|
103 | </ul> |
---|
104 | <p>If there is already an instance registered by another module, this |
---|
105 | instance doesn't try to register again in order to avoid warnings |
---|
106 | about multiple registrations.</p> |
---|
107 | |
---|
108 | <h4>Note</h4> |
---|
109 | <p>Normally only a single instance of this class is created for every |
---|
110 | Pointee.</p> |
---|
111 | </dt> |
---|
112 | </dl> |
---|
113 | |
---|
114 | <h2><a name="macros"></a>Macros</h2> |
---|
115 | |
---|
116 | <h3><a name="BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID-spec"></a> |
---|
117 | Macro BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee)</h3> |
---|
118 | <p>This macro must be used to define specializations of the |
---|
119 | <a href="type_id.html#type_id-spec">type_id</a> function |
---|
120 | which can't be instantiated for incomplete types.</p> |
---|
121 | <h4>Note</h4> |
---|
122 | <p>The macro must be invoked in every translation unit which uses the |
---|
123 | opaque converter.</p> |
---|
124 | |
---|
125 | <h2><a name="see-also"></a>See Also</h2> |
---|
126 | <p> |
---|
127 | <a href="return_opaque_pointer.html">return_opaque_pointer</a> |
---|
128 | </p> |
---|
129 | |
---|
130 | <p>Revised |
---|
131 | 10 September, 2006 |
---|
132 | </p> |
---|
133 | |
---|
134 | <p><i>© Copyright 2003..2006 Haufe Mediengruppe. All Rights |
---|
135 | Reserved.</i></p> |
---|
136 | </body> |
---|
137 | </html> |
---|
138 | |
---|