2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

Initial checkin of V2 docs

[SVN r12797]
This commit is contained in:
Dave Abrahams
2002-02-14 03:39:41 +00:00
parent 9e8273c7f7
commit 44e43d3b47
21 changed files with 2181 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
# To run all tests with verbose output: jam -sPYTHON_TEST_ARGS=-v test
#
# Declares the following targets:
# 1. libboost_python, a static link library to be linked with all
# 1. libboost_python.dll/.so, a dynamic library to be linked with all
# Boost.Python modules
#
# 2. pairs of test targets of the form <name>.test and <name>.run

57
doc/boost.css Normal file
View File

@@ -0,0 +1,57 @@
H1
{
FONT-SIZE: 200%
COLOR: #00007f
}
H2
{
FONT-SIZE: 150%;
}
H3
{
FONT-SIZE: 125%;
}
H4
{
FONT-SIZE: 108%;
}
BODY
{
FONT-SIZE: 100%;
BACKGROUND-COLOR: #ffffff
}
PRE
{
MARGIN-LEFT: 2pc;
BACKGROUND-COLOR: #dfffff
}
CODE
{
white-space: pre
}
.index
{
TEXT-ALIGN: left
}
.page-index
{
TEXT-ALIGN: left
}
.definition
{
TEXT-ALIGN: left
}
.footnote
{
FONT-SIZE: 66%;
VERTICAL-ALIGN: super;
TEXT-DECORATION: none
}
.function-semantics
{
CLEAR: left
}
.metafunction-semantics
{
CLEAR: left
}

View File

@@ -0,0 +1,31 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - Acknowledgments</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Acknowledgments</h2>
</td>
</tr>
</table>
<hr>
{{text}}
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

31
doc/v2/bibliography.html Normal file
View File

@@ -0,0 +1,31 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - Bibliography</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Bibliography</h2>
</td>
</tr>
</table>
<hr>
{{bibliographical information}}
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

62
doc/v2/call.html Normal file
View File

@@ -0,0 +1,62 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;call.hpp&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Header &lt;call.hpp&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#functions">Functions</a></dt>
<dl class="page-index">
<dt><a href="#call-spec">call</a></dt>
</dl>
<dt><a href="#examples">Example(s)</a></dt>
</dl>
<hr>
<h2><a name="introduction"></a>Introduction</h2>
<p>{{Introductory text}}</p>
<h2><a name="functions"></a>Functions</h2>
<pre>
<a name="call-spec"></a>call
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<h2><a name="examples"></a>Example(s)</h2>
<p>{{Example(s)}}</p>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

328
doc/v2/class.html Normal file
View File

@@ -0,0 +1,328 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;boost/python/class.hpp&gt;, &lt;boost/python/class_fwd.hpp&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Headers &lt;boost/python/class.hpp&gt;, &lt;boost/python/class_fwd.hpp&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#classes">Classes</a></dt>
<dl class="page-index">
<dt><a href="#class_-spec">Class template <code>class_</code></a></dt>
<dl class="page-index">
<dt><a href="#class_-spec-synopsis">Class <code>class_</code> synopsis</a></dt>
<dt><a href="#class_-spec-ctors">Class <code>class_</code> constructors</a></dt>
<dt><a href="#class_-spec-modifiers">Class <code>class_</code> modifier functions</a></dt>
<dt><a href="#class_-spec-observers">Class <code>class_</code> observer functions</a></dt>
</dl>
<dt><a href="#bases-spec">Class template <code>bases</code></a></dt>
<dl class="page-index">
<dt><a href="#bases-spec-synopsis">Class <code>bases</code> synopsis</a></dt>
</dl>
<dt><a href="#args-spec">Class template <code>args</code></a></dt>
<dl class="page-index">
<dt><a href="#args-spec-synopsis">Class <code>args</code> synopsis</a></dt>
</dl>
</dl>
<dt><a href="#examples">Example(s)</a></dt>
</dl>
<hr>
<h2><a name="introduction"></a>Introduction</h2>
<p><code>&lt;boost/python/class.hpp&gt;</code> defines the interface through
which users expose their C++ classes to Python. It declares the
<code>class_</code> class template, which is parameterized on the
class type being exposed, and the <code>args</code> and
<code>bases</code> utility class templates in the anonymous
namespace (the latter definitions will probably be moved in a future
release).
<p>
<code>&lt;boost/python/class_fwd.hpp&gt;</code> contains a forward
declaration of the <code>class_</code> class template.
<h2><a name="classes"></a>Classes</h2>
<h3><a name="class_-spec">
</a>Class template <code>class_&lt;T,&nbsp;Bases,&nbsp;<a
href="HolderGenerator.html">HolderGenerator</a>&gt;</code></h3>
<p>Creates a Python class associated with the C++ type passed as its
first parameter. Its template arguments are:
<br><br>
<table border="1" summary="class_ template parameters">
<tr>
<th>Parameter
<th>Description
<th>Default
<tr>
<td><code>T</code>
<td>The class being exposed to Python
<tr>
<td><code>Bases</code>
<td>An <a href="../../../mpl/doc/Sequences.html">MPL sequence</a> of C++ base classes
<td>An unspecified empty sequence
<tr>
<td><a href="HolderGenerator.html">HolderGenerator</a></code>
<td>A type generator for the holder which
maintains the C++ object inside the Python instance.
<td><code>boost::python::objects::value_holder_generator</code>
</table>
<h4><a name="class_-spec-synopsis"></a>Class template <code>class_</code> synopsis</h4>
<pre>
namespace boost { namespace python
{
template &lt;class T
, class Bases = <i>none</i>
, class HolderGenerator = objects::value_holder_generator&gt;
class class_
{
class_();
class_(char const* name);
template &lt;class F&gt;
class_&amp; def(char const* name, F f);
template &lt;class Fn, class CallPolicy&gt;
class_&amp; def(char const* name, Fn fn, CallPolicy policy);
template &lt;class Args&gt;
class_&amp; def_init(Args const&amp; = Args());
class_&amp; def_init();
ref object() const;
};
}}
</pre>
<h4><a name="class_-spec-ctors"></a>Class template <code>class_</code> constructors</h4>
<pre>
class_()
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> The platform's
<code>std::type_info::name()</code> implementation produces a string
which corresponds to the type's declaration in C++</dt>
<dt><b>Effects:</b> Constructs a <code>class_</code> object which
generates a Boost.Python extension class with the same name as
<code>T</code>.</dt>
<dt><b>Rationale:</b> Many platforms can generate reasonable names
for Python classes without user intervention.</dt>
</dl>
<pre>
class_(char const* name)
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> Name is a ntbs which conforms to Python's <a
href="http://www.python.org/doc/current/ref/identifiers.html">identifier
naming rules</a>.</dt>
<dt><b>Effects:</b> Constructs a <code>class_</code> object which
generates a Boost.Python extension class named
<code>name</code>.</dt>
<dt><b>Rationale:</b> Gives the user full control over class naming.</dt>
</dl>
<h4><a name="class_-spec-modifiers"></a>Class template <code>class_</code> modifier functions</h4>
<pre>
template &lt;class F&gt;
class_&amp; def(char const* name, F f)
template &lt;class Fn, class CallPolicy&gt;
class_&amp; def(char const* name, Fn fn, CallPolicy policy)
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b>
<code>f</code> is a non-null pointer-to-function or
pointer-to-member-function.
<code>name</code> is a ntbs which conforms to Python's <a
href="http://www.python.org/doc/current/ref/identifiers.html">identifier
naming rules</a>.
If supplied, <code>policy</code> conforms to the <a
href="CallPolicy.html">CallPolicy</a> concept requirements.
</dt>
<dt><b>Effects:</b> Adds the result of <code><a
href="make_function.html#make_function-spec">make_function</a>(f)</code>
to the Boost.Python extension class being defined, with the given
<code>name</code>. If the extension class already has an attribute
named <code><i>name</i></code>, the usual <a
href="http:overloading.html">overloading procedure</a> applies.
</dt>
<dt><b>Returns:</b> <code>*this</code></dt>
</dl>
<pre>
template &lt;class Args&gt;
class_&amp; def_init(Args const&amp; argument_types)
class_&amp; def_init()
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> in the first form, argument_types must be an <a
href="../../../mpl/doc/Sequences.html">MPL sequence</a> of C++
argument types (<i>A1,&nbsp;A2,...&nbsp;AN</i>) such that if
<code>a1,&nbsp;a2</code>...&nbsp;<code>aN</code> are objects of type
<i>A1,&nbsp;A2,...&nbsp;AN</i> respectively, the expression
<code>T(a1,&nbsp;a2</code>...&nbsp;<code>aN</code>) is
valid. In the second form, the expression <code>T()</code> must be
valid.
</dt>
<dt><b>Effects:</b> Adds the result of <code><a
href="make_function.html#make_constructor-spec">
make_constructor</a>&lt;T,Args,HolderGenerator&gt;()</code> to the
Boost.Python extension class being defined with the name
&quot;__init__&quot;. If the 2nd form is used, an unspecified empty
<a href="../../../mpl/doc/Sequences.html">MPL sequence</a> type is
substituted for <code>Args</code>.
If the extension class already has an
&quot;__init__&quot; attribute, the usual <a
href="http:overloading.html">overloading procedure</a> applies.
<dt><b>Returns:</b> <code>*this</code></dt>
<dt><b>Rationale:</b> Allows users to easily expose a class'
constructor to Python.</dt>
</dl>
<h4><a name="class_-spec-observers"></a>Class template <code>class_</code> observer
functions</h4>
<pre>
ref object() const;
</pre>
<dl class="function-semantics">
<dt><b>Returns:</b> A <code>ref</code> object which holds a
reference to the Boost.Python extension class object created by the
<code>class_</code> constructor.</dt>
<dt><b>Rationale:</b> Mostly not needed by users, since <code><a
href="module.html#add-spec">module::add</a>()</code> uses this to
insert the extension class in the module.</dt>
</dl>
<h3><a name="args-spec">
</a>Class template <code>args&lt;T1,&nbsp;T2,</code>...<code>TN&gt;</code></h3>
<p>Essentially an alias for <code>boost::mpl::type_list</code> which
users can use in <code>def_init</code> calls to make their code more
readable. Currently it is in the global unnammed namespace, but that
will probably change.
<h4><a name="args-spec-synopsis"></a>Class template <code>args</code> synopsis</h4>
<pre>
namespace
{
template &lt;T1 = <i>unspecified</i>,...TN = <i>unspecified</i>&gt;
struct args : ::boost::mpl::type_list&lt;T1,...TN&gt;::type
{};
}
</pre>
<h3><a name="bases-spec">
</a>Class template <code>bases&lt;T1,&nbsp;T2,</code>...<code>TN&gt;</code></h3>
<p>Essentially an alias for <code>boost::mpl::type_list</code> which
users can use in <code>class_&lt;</code>...<code>&gt;</code>
instantiations to make their code more readable. Currently it is in
the global unnammed namespace, but that will probably change.
<h4><a name="bases-spec-synopsis"></a>Class template <code>bases</code> synopsis</h4>
<pre>
namespace
{
template &lt;T1 = <i>unspecified</i>,...TN = <i>unspecified</i>&gt;
struct bases : ::boost::mpl::type_list&lt;T1,...TN&gt;::type
{};
}
</pre>
<h2><a name="examples"></a>Example(s)</h2>
<p>Given a C++ class declaration:
<pre>
class Foo : public Bar, public Baz
{
public:
Foo(int, char const*);
Foo(double);
std::string const&amp; name() { return m_name; }
void name(char const*);
private:
...
};
</pre>
A corresponding Boost.Python extension class can be created with:
<pre>
using namespace boost::python;
ref foo =
class_&lt;Foo,bases&lt;Bar,Baz&gt; &gt;()
.def_init(args&lt;int,char const*&gt;())
.def_init(args&lt;double&gt;())
.def("get_name", &amp;Foo::get_name, return_internal_reference&lt;&gt;())
.def("set_name", &amp;Foo::set_name)
.object();
</pre>
</p>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2001
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

20
doc/v2/class_hpp.py Normal file
View File

@@ -0,0 +1,20 @@
introduction = '''
'''
class boost(namespace): pass
class python(boost):
class class_(class_template):
T = type()
T.requires = 'a class type'
Bases = concepts.mpl_sequence('class type')
HolderGenerator = concepts.HolderGenerator()
template_args = (T, Bases, HolderGenerator)
class def_1(function_template):
name = "def"
args = (('char const*', 'name'), ('F', 'f'))
class_template

90
doc/v2/configuration.html Normal file
View File

@@ -0,0 +1,90 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - Configuration</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Configuration</h2>
</td>
</tr>
</table>
<hr>
<dl class="page-index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#app-defined">Application Defined Macros</a></dt>
<dt><a href="#lib-defined-public">Public Library Defined Macros</a></dt>
<dt><a href="#lib-defined-impl">Library Defined Implementation Macros</a></dt>
</dl>
<h2><a name="introduction"></a>Introduction</h2>
<p>Boost.Python uses several configuration macros in <a href="http://www.boost.org/libs/config/config.htm">&lt;boost/config.hpp&gt;</a>,
as well as configuration macros meant to be supplied by the application. These
macros are documented here.</p>
<h2><a name="app-defined"></a>Application Defined Macros</h2>
<p>These are the macros that may be defined by an application using Boost.Python.</p>
<table summary="application defined macros" cellspacing="10" width="100%">
<tr>
<td><b>Macro</b></td>
<td><b>Meaning</b></td>
</tr>
<tr>
<td>{{macro}}</td>
<td>{{meaning}}</td>
</tr>
<tr>
<td>{{macro}}</td>
<td>{{meaning}}</td>
</tr>
</table>
<h2><a name="lib-defined-public"></a>Public Library Defined Macros</h2>
<p>These macros are defined by Boost.Python but are expected to be used by application
code.</p>
<table summary="public library defined macros" cellspacing="10" width="100%">
<tr>
<td><b>Macro</b></td>
<td><b>Meaning</b></td>
</tr>
<tr>
<td>{{macro}}</td>
<td>{{meaning}}</td>
</tr>
<tr>
<td>{{macro}}</td>
<td>{{meaning}}</td>
</tr>
</table>
<h2><a name="lib-defined-impl"></a>Library Defined Implementation Macros</h2>
<p>These macros are defined by Boost.Python and are implementation details of interest
only to implementers.</p>
<table summary="library defined implementation macros" cellspacing="10" width="100%">
<tr>
<td><b>Macro</b></td>
<td><b>Meaning</b></td>
</tr>
<tr>
<td>{{macro}}</td>
<td>{{meaning}}</td>
</tr>
<tr>
<td>{{macro}}</td>
<td>{{meaning}}</td>
</tr>
</table>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

View File

@@ -0,0 +1,118 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;boost/python/copy_const_reference.hpp&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Header &lt;boost/python/copy_const_reference.hpp&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#classes">Classes</a></dt>
<dl class="page-index">
<dt><a href="#copy_const_reference-spec">Class <code>copy_const_reference</code></a></dt>
<dl class="page-index">
<dt><a href="#copy_const_reference-spec-synopsis">Class <code>copy_const_reference</code> synopsis</a></dt>
<dt><a href="#copy_const_reference-spec-metafunctions">Class <code>copy_const_reference</code> metafunctions</a></dt>
</dl>
</dl>
<dt><a href="#examples">Example</a></dt>
</dl>
<hr>
<h2><a name="classes"></a>Classes</h2>
<h3><a name="copy_const_reference-spec"></a>Class <code>copy_const_reference</code></h3>
<p>
<code>copy_const_reference</code> is a model of <a
href="ResultConverterGenerator.html">ResultConverterGenerator</a>
which can be used to wrap C++ functions returning a reference-to-const
type such that the referenced value is copied into a new Python object.
</p>
<h4><a name="copy_const_reference-spec-synopsis"></a>Class <code>copy_const_reference</code> synopsis</h4>
<pre>
namespace boost { namespace python
{
struct copy_const_reference
{
template &lt;class T&gt; struct apply;
};
}}
</pre>
<h4><a name="copy_const_reference-spec-metafunctions"></a>Class <code>copy_const_reference</code> metafunctions</h4>
<pre>
template &lt;class T&gt; struct apply
</pre>
<dl class="metafunction-semantics">
<dt><b>Requires:</b> <code>T</code> is <code>U const&amp;</code> for some <code>U</code>.</dt>
<dt><b>Returns:</b> <code>typedef <a href="to_python_value.html#to_python_value-spec">to_python_value</a>&lt;T&gt; type;</code></dt>
</dl>
<h2><a name="examples"></a>Example</h2>
<p> In C++:
<pre>
#include &lt;boost/python/module.hpp&gt;
#include &lt;boost/python/class.hpp&gt;
#include &lt;boost/python/copy_const_reference.hpp&gt;
#include &lt;boost/python/return_value_policy.hpp&gt;
// classes to wrap
struct Bar { int x; }
struct Foo {
Foo(int x) : { b.x = x; }
Bar const&amp; get_bar() const { return b; }
private:
Bar b;
};
// Wrapper code
using namespace boost::python;
BOOST_PYTHON_MODULE_INIT(my_module)
{
module m("my_module")
.add(
class_&lt;Bar&gt;()
)
.add(
class_&lt;Foo&gt;()
.def_init(args&lt;int&gt;())
.def("get_bar", &amp;Foo::get_bar
, return_value_policy&lt;copy_const_reference&gt;())
);
}
</pre>
In Python:
<pre>
&gt;&gt;&gt; from my_module import *
&gt;&gt;&gt; f = Foo(3) # create a Foo object
&gt;&gt;&gt; b = f.get_bar() # make a copy of the internal Bar object
</pre>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2001
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

View File

@@ -0,0 +1,119 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;boost/python/copy_non_const_reference.hpp&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Header &lt;boost/python/copy_non_const_reference.hpp&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#classes">Classes</a></dt>
<dl class="page-index">
<dt><a href="#copy_non_const_reference-spec">Class <code>copy_non_const_reference</code></a></dt>
<dl class="page-index">
<dt><a href="#copy_non_const_reference-spec-synopsis">Class <code>copy_non_const_reference</code> synopsis</a></dt>
<dt><a href="#copy_non_const_reference-spec-metafunctions">Class <code>copy_non_const_reference</code> metafunctions</a></dt>
</dl>
</dl>
<dt><a href="#examples">Example</a></dt>
</dl>
<hr>
<h2><a name="classes"></a>Classes</h2>
<h3><a name="copy_non_const_reference-spec"></a>Class <code>copy_non_const_reference</code></h3>
<p>
<code>copy_non_const_reference</code> is a model of <a
href="ResultConverterGenerator.html">ResultConverterGenerator</a>
which can be used to wrap C++ functions returning a reference-to-non-const
type such that the referenced value is copied into a new Python object.
</p>
<h4><a name="copy_non_const_reference-spec-synopsis"></a>Class <code>copy_non_const_reference</code> synopsis</h4>
<pre>
namespace boost { namespace python
{
struct copy_non_const_reference
{
template &lt;class T&gt; struct apply;
};
}}
</pre>
<h4><a name="copy_non_const_reference-spec-metafunctions"></a>Class <code>copy_non_const_reference</code> metafunctions</h4>
<pre>
template &lt;class T&gt; struct apply
</pre>
<dl class="metafunction-semantics">
<dt><b>Requires:</b> <code>T</code> is <code>U&amp;</code> for some non-const <code>U</code>.</dt>
<dt><b>Returns:</b> <code>typedef <a href="to_python_value.html#to_python_value-spec">to_python_value</a>&lt;T&gt; type;</code></dt>
</dl>
<h2><a name="examples"></a>Example</h2>
<p> C++ code:
<pre>
#include &lt;boost/python/module.hpp&gt;
#include &lt;boost/python/class.hpp&gt;
#include &lt;boost/python/copy_non_const_reference.hpp&gt;
#include &lt;boost/python/return_value_policy.hpp&gt;
// classes to wrap
struct Bar { int x; }
struct Foo {
Foo(int x) : { b.x = x; }
Bar&amp; get_bar() { return b; }
private:
Bar b;
};
// Wrapper code
using namespace boost::python;
BOOST_PYTHON_MODULE_INIT(my_module)
{
module m("my_module")
.add(
class_&lt;Bar&gt;()
)
.add(
class_&lt;Foo&gt;()
.def_init(args&lt;int&gt;())
.def("get_bar", &amp;Foo::get_bar
, return_value_policy&lt;copy_non_const_reference&gt;())
);
}
</pre>
Python Code:
<pre>
&gt;&gt;&gt; from my_module import *
&gt;&gt;&gt; f = Foo(3) # create a Foo object
&gt;&gt;&gt; b = f.get_bar() # make a copy of the internal Bar object
</pre>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2001
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

View File

@@ -0,0 +1,144 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;boost/python/default_call_policies.hpp&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Header &lt;boost/python/default_call_policies.hpp&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#classes">Classes</a></dt>
<dl class="page-index">
<dt><a href="#default_call_policies-spec">Class <code>default_call_policies</code></a></dt>
<dl class="page-index">
<dt><a href="#default_call_policies-spec-synopsis">Class <code>default_call_policies</code> synopsis</a></dt>
<dt><a href="#default_call_policies-spec-statics">Class <code>default_call_policies</code> static functions</a></dt>
</dl>
<dt><a href="#default_result_converter-spec">Class <code>default_result_converter</code></a></dt>
<dl class="page-index">
<dt><a href="#default_result_converter-spec-synopsis">Class <code>default_result_converter</code> synopsis</a></dt>
<dt><a href="#default_result_converter-spec-metafunctions">Class <code>default_result_converter</code> metafunctions</a></dt>
</dl>
</dl>
<dt><a href="#examples">Example</a></dt>
</dl>
<hr>
<h2><a name="classes"></a>Classes</h2>
<h3><a name="default_call_policies-spec"></a>Class <code>default_call_policies</code></h3>
<p>
<code>default_call_policies</code> is a model of <a
href="CallPolicies.html">CallPolicies</a> with no <code>precall</code>
or <code>postcall</code> behavior and a <code>result_converter</code>
which handles by-value returns. Wrapped C++ functions and member
functions use <code>default_call_policies</code> unless otherwise
specified. You may find it convenient to derive new models of <a
href="CallPolicies.html">CallPolicies</a> from
<code>default_call_policies</code>.
</p>
<h4><a name="default_call_policies-spec-synopsis"></a>Class <code>default_call_policies</code> synopsis</h4>
<pre>
namespace boost { namespace python
{
struct default_call_policies
{
static bool precall(PyObject*);
static PyObject* postcall(PyObject*, PyObject* result);
typedef <a href="#default_result_converter-spec">default_result_converter</a> result_converter;
};
}}
</pre>
<h4><a name="default_call_policies-spec-statics"></a>Class <code>default_call_policies</code> static functions</h4>
<pre>
bool precall(PyObject*);
</pre>
<dl class="function-semantics">
<dt><b>Returns:</b> <code>true</code></dt>
<dt><b>Throws:</b> nothing</dt>
</dl>
<pre>
PyObject* postcall(PyObject*, PyObject* result);
</pre>
<dl class="function-semantics">
<dt><b>Returns:</b> <code>result</code></dt>
<dt><b>Throws:</b> nothing</dt>
</dl>
<h3><a name="default_result_converter-spec"></a>Class <code>default_result_converter</code></h3>
<p>
<code>default_result_converter</code> is a model of <a
href="ResultConverterGenerator.html">ResultConverterGenerator</a>
which can be used to wrap C++ functions returning non-pointer types,
<code>char const*</code>, and <code>PyObject*</code>,
by-value.
</p>
<h4><a name="default_result_converter-spec-synopsis"></a>Class <code>default_result_converter</code> synopsis</h4>
<pre>
namespace boost { namespace python
{
struct default_result_converter
{
template &lt;class T&gt; struct apply;
};
}}
</pre>
<h4><a name="default_result_converter-spec-metafunctions"></a>Class <code>default_result_converter</code> metafunctions</h4>
<pre>
template &lt;class T&gt; struct apply
</pre>
<dl class="metafunction-semantics">
<dt><b>Requires:</b> <code>T</code> is not a reference type. If
<code>T</code> is a pointer type, <code>T</code> is <code>const
char*</code> or <code>PyObject*</code>.</dt>
<dt><b>Returns:</b> <code>typedef <a href="to_python_value.html#to_python_value-spec">to_python_value</a>&lt;T const&amp;&gt; type;</code></dt>
</dl>
<h2><a name="examples"></a>Example</h2>
<p>This example comes from the Boost.Python implementation itself. Because the <a
href="return_value_policy.html#return_value_policy-spec">return_value_policy</a>
class template does not implement <code>precall</code> or
<code>postcall</code> behavior, its default base class is <code>default_call_policies</code>:
<pre>
template &lt;class Handler, class Base = default_call_policies&gt;
struct return_value_policy : Base
{
typedef Handler result_converter;
};
</pre>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2001
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

34
doc/v2/definitions.html Normal file
View File

@@ -0,0 +1,34 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - Definitions</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Definitions</h2>
</td>
</tr>
</table>
<hr>
<dl class="definitions">
<dt><b>{{term}}:</b> {{definition}}</dt>
<dt><b>{{term}}:</b> {{definition}}</dt>
</dl>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

223
doc/v2/errors.html Normal file
View File

@@ -0,0 +1,223 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;{{header}}&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Header &lt;boost/python/errors.hpp&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#classes">Classes</a></dt>
<dl class="page-index">
<dt><a href="#class-spec">Class <code>error_already_set</code></a></dt>
<dl class="page-index">
<dt><a href="#error_already_set-spec-synopsis">Class <code>error_already_set</code> synopsis</a></dt>
</dl>
</dl>
<dt><a href="#functions">Functions</a></dt>
<dl class="page-index">
<dt><a href="#handle_exception-spec">handle_exception</a></dt>
<dt><a href="#expect_non_null-spec">expect_non_null</a></dt>
</dl>
<dt><a href="#examples">Examples</a></dt>
</dl>
<hr>
<h2><a name="introduction"></a>Introduction</h2>
<p><code>&lt;boost/python/errors.hpp&gt;</code> provides types and
functions for managing and translating between Python and C++
exceptions. This is relatively low-level functionality that is mostly
used internally by Boost.Python. Users should seldom need it.
<h2><a name="classes"></a>Classes</h2>
<h3><a name="error_already_set-spec"></a>Class <code>error_already_set</code></h3>
<p>
<code>error_already_set</code> is an exception type which can be
thrown to indicate that a Python error has occurred. If thrown, the
precondition is that <a
href="http://www.python.org/doc/current/api/exceptionHandling.html#l2h-71">PyErr_Occurred()</a>
returns a value convertible to <code>true</code>.
</p>
<h4><a name="class-spec-synopsis"></a>Class error_already_set synopsis</h4>
<pre>
namespace boost { namespace python
{
class error_already_set&nbsp;{};
}}
</pre>
<h2><a name="functions"></a>Functions</h2>
<pre><a name="handle_exception-spec">template &lt;class T&gt; bool handle_exception</a>(T f) throw();
void handle_exception() throw();
</pre>
<dl class="handle_exception-semantics">
<dt><b>Requires:</b> The first form requires that the expression
<code><a
href="../../function/doc/reference.html#functionN">function0</a>&lt;void&gt;(f)</code>
is valid. The second form requires that a C++ exception is currently
being handled (see section 15.1 in the C++ standard).
</dt>
<dt><b>Effects:</b> The first form calls <code>f()</code> inside a
<code>try</code> block whose <code>catch</code> clauses set an
appropriate Python exception for the C++ exception caught, returning
<code>true</code> if an exception was caught, <code>false</code>
otherwise. The second form passes a function which rethrows the
exception currently being handled to the first form.</dt>
<dt><b>Postconditions:</b> No exception is being handled</dt>
<dt><b>Throws:</b> nothing</dt>
<dt><b>Rationale:</b> At inter-language boundaries it is important
to ensure that no C++ exceptions escape, since the calling language
usually doesn't have the equipment neccessary to properly unwind the
stack. Use <code>handle_exception</code> to manage exception
translation whenever your C++ code is called directly from the
Python API. This is done for you automatically by the usual function
wrapping facilities: <a
href="make_function.html#make_function-spec">make_function()</a>, <a
href="make_function.html#make_constructor-spec">make_constructor()</a>,
<a href="module.html#def-spec">module::def</a> and <a
href="class.html#def-spec">class_::def</a>). The second form can be
more convenient to use
(see the <a href="#examples">example</a> below), but various
compilers have problems when exceptions are rethrown from within an
enclosing <code>try</code> block.</dt>
</dl>
<pre>
<a name="expect_non_null-spec">PyObject* expect_non_null(PyObject* x);</a>
template &lt;class T&gt; T* expect_non_null(T* x);
</pre>
<dl class="expect_non_null-semantics">
<dt><b>Returns:</b> <code>x</code></dt>
<dt><b>Throws:</b> <code><a href="#error_already_set-spec">error_already_set()</a></code> iff <code>x == 0</code>.</dt>
<dt><b>Rationale:</b> Simplifies error-handling when calling many
functions in the <a
href="http://www.python.org/doc/current/api/api.html">Python/C
API</a>, which return 0 on error.</dt>
</dl>
<h2><a name="examples"></a>Examples</h2>
<p>
<pre>
#include &lt;string&gt;
#include &lt;boost/python/errors.hpp&gt;
#include &lt;boost/python/reference.hpp&gt;
// Returns a std::string which has the same value as obj's "__name__"
// attribute.
std::string get_name(boost::python::ref obj)
{
// throws if there's no __name__ attribute
PyObject* p = boost::python::expect_non_null(
PyObject_GetAttrString(obj.get(), "__name__"));
// throws if it's not a Python string
std::string result(
boost::python::expect_non_null(
PyString_AsString(p)));
Py_XDECREF(p); // Done with p
return result;
}
//
// Demonstrate form 1 of handle_exception
//
// Place a Python Int object whose value is 1 if a and b have
// identical "__name__" attributes, 0 otherwise.
void same_name_impl(PyObject*&amp; result, PyObject* a, PyObject* b)
{
result = PyInt_FromLong(
get_name(boost::python::ref(a1)) == get_name(boost::python::ref(a2)));
}
// This is an example Python 'C' API interface function
extern "C" PyObject*
same_name(PyObject* args, PyObject* keywords)
{
PyObject* a1;
PyObject* a2;
PyObject* result = 0;
if (!PyArg_ParseTuple(args, const_cast&lt;char*&gt;("OO"), &amp;a1, &amp;a2))
return 0;
// Use boost::bind to make an object compatible with
// boost::Function0&lt;void&gt;
if (boost::python::handle_exception(
boost::bind&lt;void&gt;(same_name_impl, boost::ref(result), a1, a2)))
{
// an exception was thrown; the Python error was set by
// handle_exception()
return 0;
}
return result;
}
//
// Demonstrate form 2 of handle_exception. Not well-supported by all
// compilers.
//
extern "C" PyObject*
same_name2(PyObject* args, PyObject* keywords)
{
PyObject* a1;
PyObject* a2;
PyObject* result = 0;
if (!PyArg_ParseTuple(args, const_cast&lt;char*&gt;("OO"), &amp;a1, &amp;a2))
return 0;
try {
return PyInt_FromLong(
get_name(boost::python::ref(a1)) == get_name(boost::python::ref(a2)));
}
catch(...)
{
// If an exception was thrown, translate it to Python
boost::python::handle_exception();
return 0;
}
}
</pre>
</p>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2001
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

38
doc/v2/faq.html Normal file
View File

@@ -0,0 +1,38 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - FAQ</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Frequently Asked Questions (FAQs)</h2>
</td>
</tr>
</table>
<hr>
<dl class="page-index">
<dt><a href="#question1">{{question}}</a></dt>
<dt><a href="#question2">{{question}}</a></dt>
</dl>
<h2><a name="question1"></a>{{question}}</h2>
<p>{{answer}}</p>
<h2><a name="question2"></a>{{question}}</h2>
<p>{{answer}}</p>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

142
doc/v2/foo.cpp Normal file
View File

@@ -0,0 +1,142 @@
// Copyright David 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.
#include <boost/python/module.hpp>
#include <boost/python/class.hpp>
#include <boost/python/copy_const_reference.hpp>
#include <boost/python/return_value_policy.hpp>
class Bar { int x; }
class Foo
{
public:
Foo(int x) : b(x) {}
Bar const& get_bar() const { return b; }
private:
Bar b;
};
using namespace boost::python;
BOOST_PYTHON_MODULE_INIT(my_module)
{
module m("my_module")
.add(
class_<Bar>()
)
.add(
class_<Foo>()
.def_init(args<int>())
.def("get_bar", &Foo::get_bar
, return_value_policy<copy_const_reference>())
)
}
using namespace boost::python;
ref foo =
class_<Foo,bases<Bar,Baz> >()
.def_init(args<int,char const*>())
.def_init(args<double>())
.def("get_name", &Foo::get_name, return_internal_reference<>())
.def("set_name", &Foo::set_name)
.object();
<blockquote><pre>
#include &lt;string&gt;
#include &lt;boost/python/errors.hpp&gt;
#include &lt;boost/python/reference.hpp&gt;
// Returns a std::string which has the same value as obj's "__name__"
// attribute.
std::string get_name(boost::python::ref obj)
{
// throws if there's no __name__ attribute
PyObject* p = boost::python::expect_non_null(
PyObject_GetAttrString(obj.get(), "__name__"));
// throws if it's not a Python string
std::string result(
boost::python::expect_non_null(
PyString_AsString(p)));
Py_XDECREF(p); // Done with p
return result;
}
//
// Demonstrate form 1 of handle_exception
//
// Place a Python Int object whose value is 1 if a and b have
// identical "__name__" attributes, 0 otherwise.
void same_name_impl(PyObject*&amp; result, PyObject* a, PyObject* b)
{
result = PyInt_FromLong(
get_name(boost::python::ref(a1)) == get_name(boost::python::ref(a2)));
}
// This is an example Python 'C' API interface function
extern "C" PyObject*
same_name(PyObject* args, PyObject* keywords)
{
PyObject* a1;
PyObject* a2;
PyObject* result = 0;
if (!PyArg_ParseTuple(args, const_cast&lt;char*&gt;("OO"), &amp;a1, &amp;a2))
return 0;
// Use boost::bind to make an object compatible with
// boost::Function0&lt;void&gt;
if (boost::python::handle_exception(
boost::bind&lt;void&gt;(same_name_impl, boost::ref(result), a1, a2)))
{
// an exception was thrown; the Python error was set by
// handle_exception()
return 0;
}
return result;
}
//
// Demonstrate form 2 of handle_exception. Not well-supported by all
// compilers.
//
extern "C" PyObject*
same_name2(PyObject* args, PyObject* keywords)
{
PyObject* a1;
PyObject* a2;
PyObject* result = 0;
if (!PyArg_ParseTuple(args, const_cast&lt;char*&gt;("OO"), &amp;a1, &amp;a2))
return 0;
try {
return PyInt_FromLong(
get_name(boost::python::ref(a1)) == get_name(boost::python::ref(a2)));
}
catch(...)
{
// If an exception was thrown, translate it to Python
boost::python::handle_exception();
return 0;
}
}
</pre></blockquote>
template <class T>
struct from_python
{
from_python(PyObject*);
bool convertible() const;
X operator()(PyObject*) const;
};

156
doc/v2/from_python.html Normal file
View File

@@ -0,0 +1,156 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;boost/python/from_python.hpp&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Header &lt;boost/python/from_python.hpp&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#classes">Classes</a></dt>
<dl class="page-index">
<dt><a href="#from_python-spec">Class Template<code>from_python</code></a></dt>
<dl class="page-index">
<dt><a href="#from_python-spec-synopsis">Class Template <code>from_python</code> synopsis</a></dt>
<dt><a href="#from_python-spec-ctors">Class Template <code>from_python</code> constructor</a></dt>
<dt><a href="#from_python-spec-observers">Class Template <code>from_python</code> observer functions</a></dt>
</dl>
</dl>
<dt><a href="#examples">Example</a></dt>
</dl>
<hr>
<h2><a name="introduction"></a>Introduction</h2>
<p>
<code>&lt;boost/python/from_python.hpp&gt;</code> introduces a class
template <code>from_python&lt;T&gt;</code> for extracting a C++ object
of type <code>T</code> from a Python object.
</p>
<h2><a name="classes"></a>Classes</h2>
<h3><a name="from_python-spec"></a>Class Template <code>from_python&lt;class T&gt;</code></h3>
<p>
<code>from_python&lt;T&gt;</code> is the type used internally by
Boost.Python to extract C++ function arguments from a Python argument
tuple when calling a wrapped function. It can also be used directly to
make similar conversions in other contexts.
</p>
<h4><a name="from_python-spec-synopsis"></a>Class Template <code>from_python</code> synopsis</h4>
<pre>
namespace boost { namespace python
{
template &lt;class T&gt;
struct from_python : private <a href=
"../../../utility/utility.htm#Class noncopyable">boost::noncopyable</a> // Exposition only.
// from_python&lt;T&gt; meets the <a href="NonCopyable.html">NonCopyable</a> requirements
{
from_python(PyObject*);
bool convertible() const;
<i>convertible-to-T</i> operator()(PyObject*) const;
};
}
</pre>
<h4><a name="from_python-spec-ctors"></a>Class Template <code>from_python</code> constructor</h4>
<pre>
from_python(PyObject* p);
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> <code>p != 0</code></dt>
<dt><b>Effects:</b> Constructs a <code>from_python</code> object
suitable for extracting a C++ object of type <code>T</code> from
<code>p</code>.</dt>
</dl>
<h4><a name="from_python-spec-observers"></a>Class Template <code>from_python</code> observer functions</h4>
<pre>
bool convertible() const;
</pre>
<dl class="function-semantics">
<dt><b>Returns:</b> <code>false</code> if the conversion cannot succeed. This indicates that either:
<ol>
<li>No <code>from_python_converter</code> was registered for
<code>T</code>, or
<li>any such converter rejected the constructor argument
<code>p</code> by returning <code>0</code> from its
<code>convertible()</code> function
</ol>
Note that conversion may still fail in <code>operator()</code> due to an exception.
</dt>
<dt><b>Throws:</b> nothing</dt>
<dt><b>Rationale:</b> Because <code>from_python&lt;&gt;</code> is used in
overload resolution, and throwing an exception can be slow, it is
useful to be able to rule out a broad class of unsuccessful
conversions without throwing an exception.</dt>
</dl>
<pre>
<i>convertible-to-T</i> operator()(PyObject* p) const;
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> <code>*p</code> refers to the same object which
was passed to the constructor, and <code>convertible()</code>
returns <code>true</code>.</dt>
<dt><b>Effects:</b> performs the conversion</dt>
<dt><b>Returns:</b> an object convertible to <code>T</code>.</dt>
</dl>
<h2><a name="examples"></a>Example</h2>
<p>
<pre>
#include &lt;string&gt;
#include &lt;boost/python/from_python.hpp&gt;
// If a std::string can be extracted from p, return its
// length. Otherwise, return 0.
std::size_t length_if_string(PyObject* p)
{
from_python&lt;std::string&gt; converter(p);
if (!converter.convertible())
return 0;
else
return converter().size();
}
</pre>
</p>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2001
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

181
doc/v2/header.html Normal file
View File

@@ -0,0 +1,181 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - &lt;{{header}}&gt;</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Header &lt;{{header}}&gt;</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="page-index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#macros">Macros</a></dt>
<dl class="page-index">
<dt><a href="#macro-spec">{{macro name}}</a></dt>
</dl>
<dt><a href="#values">Values</a></dt>
<dl class="page-index">
<dt><a href="#value-spec">{{value name}}</a></dt>
</dl>
<dt><a href="#types">Types</a></dt>
<dl class="page-index">
<dt><a href="#type-spec">{{type name}}</a></dt>
</dl>
<dt><a href="#classes">Classes</a></dt>
<dl class="page-index">
<dt><a href="#class-spec">Class <code>{{class name}}</code></a></dt>
<dl class="page-index">
<dt><a href="#class-spec-synopsis">Class <code>{{class name}}</code> synopsis</a></dt>
<dt><a href="#class-spec-ctors">Class <code>{{class name}}</code> constructors and destructor</a></dt>
<dt><a href="#class-spec-comparisons">Class <code>{{class name}}</code> comparison functions</a></dt>
<dt><a href="#class-spec-modifiers">Class <code>{{class name}}</code> modifier functions</a></dt>
<dt><a href="#class-spec-observers">Class <code>{{class name}}</code> observer functions</a></dt>
<dt><a href="#class-spec-statics">Class <code>{{class name}}</code> static functions</a></dt>
</dl>
</dl>
<dt><a href="#functions">Functions</a></dt>
<dl class="page-index">
<dt><a href="#function-spec">{{function name}}</a></dt>
</dl>
<dt><a href="#objects">Objects</a></dt>
<dl class="page-index">
<dt><a href="#object-spec">{{object name}}</a></dt>
</dl>
<dt><a href="#examples">Example(s)</a></dt>
</dl>
<hr>
<h2><a name="introduction"></a>Introduction</h2>
<p>{{Introductory text}}</p>
<h2><a name="macros"></a>Macros</h2>
<p><a name="macro-spec"></a>{{Macro specifications}}</p>
<h2><a name="values"></a>Values</h2>
<p><a name="value-spec"></a>{{Value specifications}}</p>
<h2><a name="types"></a>Types</h2>
<p><a name="type-spec"></a>{{Type specifications}}</p>
<h2><a name="classes"></a>Classes</h2>
<h3><a name="class-spec"></a>Class <code>{{name}}</code></h3>
<p>{{class overview text}}</p>
<h4><a name="class-spec-synopsis"></a>Class {{name}} synopsis</h4>
<pre>
namespace boost
{
class {{name}}
{
};
};
</pre>
<h4><a name="class-spec-ctors"></a>Class {{name}} constructors and destructor</h4>
<pre>
{{constructor}}
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<pre>
{{destructor}}
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<h4><a name="class-spec-comparisons"></a>Class {{name}} comparison functions</h4>
<pre>
{{function}}
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<h4><a name="class-spec-modifiers"></a>Class {{name}} modifier functions</h4>
<pre>
{{function}}
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<h4><a name="class-spec-observers"></a>Class {{name}} observer functions</h4>
<pre>
{{function}}
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<h4><a name="class-spec-statics"></a>Class {{name}} static functions</h4>
<pre>
{{function}}
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<h2><a name="functions"></a>Functions</h2>
<pre>
<a name="function-spec"></a>{{function}}
</pre>
<dl class="function-semantics">
<dt><b>Requires:</b> {{text}}</dt>
<dt><b>Effects:</b> {{text}}</dt>
<dt><b>Postconditions:</b> {{text}}</dt>
<dt><b>Returns:</b> {{text}}</dt>
<dt><b>Throws:</b> {{text}}</dt>
<dt><b>Complexity:</b> {{text}}</dt>
<dt><b>Rationale:</b> {{text}}</dt>
</dl>
<h2><a name="objects"></a>Objects</h2>
<p><a name="object-spec"></a>{{Object specifications}}</p>
<h2><a name="examples"></a>Example(s)</h2>
<p>{{Example(s)}}</p>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2001
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

41
doc/v2/index.html Normal file
View File

@@ -0,0 +1,41 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Index</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="index">
<dt><a href="overview.html">Overview</a></dt>
<dt><a href="reference.html">Reference</a></dt>
<dt><a href="configuration.html">Configuration Information</a></dt>
<dt><a href="rationale.html">Rationale</a></dt>
<dt><a href="definitions.html">Definitions</a></dt>
<dt><a href="faq.html">Frequently Asked Questions (FAQs)</a></dt>
<dt><a href="bibliography.html">Bibliography</a></dt>
<dt><a href="acknowledgments.html">Acknowledgments</a></dt>
</dl>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

47
doc/v2/overview.html Normal file
View File

@@ -0,0 +1,47 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - Overview</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Overview</h2>
</td>
</tr>
</table>
<hr>
<dl class="index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#topic1">First topic</a></dt>
<dt><a href="#topic2">Second topic</a></dt>
<dt><a href="#footnotes">Footnotes</a></dt>
</dl>
<h2><a name="introduction"></a>Introduction</h2>
<p>{{text}}</p>
<h2><a name="topic1"></a>First Topic</h2>
<p>{{text}}</p>
<h2><a name="topic2"></a>Second Topic</h2>
<p>{{text}}</p>
<h2><a name="footnotes"></a>Footnotes</h2>
<dl>
<dt><a name="footnote1" class="footnote">(1)</a> {{text}}</dt>
<dt><a name="footnote2" class="footnote">(2)</a> {{text}}</dt>
</dl>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

47
doc/v2/rationale.html Normal file
View File

@@ -0,0 +1,47 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - Rationale</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Rationale</h2>
</td>
</tr>
</table>
<hr>
<dl class="index">
<dt><a href="#introduction">Introduction</a></dt>
<dt><a href="#topic1">First topic</a></dt>
<dt><a href="#topic2">Second topic</a></dt>
<dt><a href="#footnotes">Footnotes</a></dt>
</dl>
<h2><a name="introduction"></a>Introduction</h2>
<p>{{text}}</p>
<h2><a name="topic1"></a>First Topic</h2>
<p>{{text}}</p>
<h2><a name="topic2"></a>Second Topic</h2>
<p>{{text}}</p>
<h2><a name="footnotes"></a>Footnotes</h2>
<dl>
<dt><a name="footnote1" class="footnote">(1)</a> {{text}}</dt>
<dt><a name="footnote2" class="footnote">(2)</a> {{text}}</dt>
</dl>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>

271
doc/v2/reference.html Normal file
View File

@@ -0,0 +1,271 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../boost.css">
<title>Boost.Python - Reference</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"reference">
<tr>
<td valign="top" width="300">
<h3><a href="http://www.boost.org"><img height="86" width="277" alt="C++ Boost" src="../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Python</h1>
<h2 align="center">Reference</h2>
</td>
</tr>
</table>
<hr>
<h2>Contents</h2>
<dl class="Reference">
<dt><a href="#high_level">High Level Components</a></dt>
<dt><a href="#framework">Framework Elements</a></dt>
<dt><a href="#utilities">Utilities</a></dt>
<dt><a href="#by_name">Index By Name</a></dt>
</dl>
<a name="high_level"></a><h2>High Level Components</h2>
<dl class="index">
<a name="general_purpose"></a><h3>General Purpose</h3>
<dl class="index">
<dt><a href="class.html">class.hpp/class_fwd.hpp</a></dt>
<dl class="index">
<dt><a href="class.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="class.html#class_-spec">class_</a></dt>
<dt><a href="class.html#bases-spec">bases</a></dt>
<dt><a href="class.html#args-spec">args</a></dt>
</dl>
</dl>
<dt><a href="errors.html">errors.hpp</a></dt>
<dl class="index">
<dt><a href="errors.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="errors.html#error_already_set-spec">error_already_set</a></dt>
</dl>
<dt><a href="errors.html#functions">Functions</a></dt>
<dl class="index">
<dt><a href="errors.html#handle_exception-spec">handle_exception</a></dt>
<dt><a href="errors.html#expect_non_null-spec">expect_non_null</a></dt>
</dl>
</dl>
<dt><a href="make_function.html">make_function.hpp</a></dt>
<dl class="index">
<dt><a href="make_function.html#classes">Functions</a></dt>
<dl class="index">
<dt><a href="make_function.html#make_function-spec">make_function</a></dt>
<dt><a href="make_.html#make_constructor-spec">make_constructor</a></dt>
</dl>
</dl>
<dt><a href="module.html">module.hpp</a></dt>
<dl class="index">
<dt><a href="module.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="module.html#module-spec">module</a></dt>
</dl>
</dl>
<dt><a href="objects.html">objects.hpp</a></dt>
<dl class="index">
<dt><a href="objects.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="objects.html#xxx-spec">not yet documented</a></dt>
</dl>
</dl>
<dt><a href="reference_hpp.html">reference.hpp</a></dt>
<dl class="index">
<dt><a href="reference_hpp.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="reference_hpp.html#reference-spec">reference</a></dt>
</dl>
<dt><a href="reference_hpp.html#types">Types</a></dt>
<dl class="index">
<dt><a href="reference_hpp.html#ref-spec">ref</a></dt>
</dl>
</dl>
</dl>
<a name="type_conversion"></a><h3>To/From Python Type Conversion</h3>
<dl class="index">
<dt><a href="from_python.html">from_python.hpp</a></dt>
<dl class="index">
<dt><a href="from_python.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="from_python.html#from_python-spec">from_python</a></dt>
</dl>
</dl>
<dt><a href="to_python_converter.html">to_python_converter.hpp</a></dt>
<dl class="index">
<dt><a href="to_python_converter.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="to_python_converter.html#to_python_converter-spec">to_python_converter</a></dt>
</dl>
</dl>
<dt><a href="to_python_indirect.html">to_python_indirect.hpp</a></dt>
<dl class="index">
<dt><a href="to_python_indirect.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="to_python_indirect.html#to_python_indirect-spec">to_python_indirect</a></dt>
</dl>
</dl>
<dt><a href="to_python_value.html">to_python_value.hpp</a></dt>
<dl class="index">
<dt><a href="to_python_value.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="to_python_value.html#to_python_value-spec">to_python_value</a></dt>
</dl>
</dl>
<dt><a href="type_from_python.html">type_from_python.hpp</a></dt>
<dl class="index">
<dt><a href="type_from_python.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="type_from_python.html#type_from_python-spec">type_from_python</a></dt>
</dl>
</dl>
<dt><a href="value_from_python.html">value_from_python.hpp</a></dt>
<dl class="index">
<dt><a href="value_from_python.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="value_from_python.html#value_from_python-spec">value_from_python</a></dt>
</dl>
</dl>
</dl>
<a name="models_of_call_policies"></a><h3>Models of CallPolicies</h3>
<dl class="index">
<dt><a href="default_call_policies.html">default_call_policies.hpp</a></dt>
<dl class="index">
<dt><a href="default_call_policies.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="default_call_policies.html#default_call_policies-spec">default_call_policies</a></dt>
<dt><a href="default_call_policies.html#default_result_converter-spec">default_result_converter</a></dt>
</dl>
</dl>
<dt><a href="return_internal_reference.html">return_internal_reference.hpp</a></dt>
<dl class="index">
<dt><a href="return_internal_reference.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="return_internal_reference.html#return_internal_reference-spec">return_internal_reference</a></dt>
</dl>
</dl>
<dt><a href="return_value_policy.html">return_value_policy.hpp</a></dt>
<dl class="index">
<dt><a href="return_value_policy.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="return_value_policy.html#return_value_policy-spec">return_value_policy</a></dt>
</dl>
</dl>
<dt><a href="with_custodian_and_ward.html">with_custodian_and_ward.hpp</a></dt>
<dl class="index">
<dt><a href="with_custodian_and_ward.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="with_custodian_and_ward.html#with_custodian_and_ward-spec">with_custodian_and_ward</a></dt>
<dt><a href="with_custodian_and_ward.html#with_custodian_and_ward_postcall-spec">with_custodian_and_ward_postcall</a></dt>
</dl>
</dl>
</dl>
<a name="return_handler_generators"></a><h3>Models of ReturnHandlerGenerator</h3>
<dl class="index">
<dt><a href="copy_const_reference.html">copy_const_reference.hpp</a></dt>
<dl class="index">
<dt><a href="copy_const_reference.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="copy_const_reference.html#copy_const_reference-spec">copy_const_reference</a></dt>
</dl>
</dl>
<dt><a href="copy_non_const_reference.html">copy_non_const_reference.hpp</a></dt>
<dl class="index">
<dt><a href="copy_non_const_reference.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="copy_non_const_reference.html#copy_non_const_reference-spec">copy_non_const_reference</a></dt>
</dl>
</dl>
<dt><a href="manage_new_object.html">manage_new_object.hpp</a></dt>
<dl class="index">
<dt><a href="manage_new_object.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="manage_new_object.html#manage_new_object-spec">manage_new_object</a></dt>
</dl>
</dl>
<dt><a href="reference_existing_object.html">reference_existing_object.hpp</a></dt>
<dl class="index">
<dt><a href="reference_existing_object.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="reference_existing_object.html#reference_existing_object-spec">reference_existing_object</a></dt>
</dl>
</dl>
<dt><a href="reference_from_python.html">reference_from_python.hpp</a></dt>
<dl class="index">
<dt><a href="reference_from_python.html#classes">Classes</a></dt>
<dl class="index">
<dt><a href="reference_from_python.html#reference_from_python-spec">reference_from_python</a></dt>
<dt><a href="reference_from_python.html#get_member-spec">get_member</a></dt>
</dl>
</dl>
</dl>
</dl>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
05 November, 2002
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
</p>
<p><i>&copy; Copyright <a href="../../../../people/dave_abrahams.htm">Dave Abrahams</a>
2002. All Rights Reserved.</i></p>
</body>
</html>