diff --git a/doc/v2/copy_const_reference.html b/doc/v2/copy_const_reference.html index 70da135b..e8d02503 100644 --- a/doc/v2/copy_const_reference.html +++ b/doc/v2/copy_const_reference.html @@ -1,46 +1,58 @@ - + + +
+ -|
- |
Boost.PythonHeader <boost/python/copy_const_reference.hpp>+ |
+
copy_const_reference
+ copy_const_referencecopy_const_reference synopsis
+ copy_const_reference synopsiscopy_const_reference metafunctions
+ copy_const_reference metafunctionscopy_const_reference
copy_const_reference is a model of ResultConverterGenerator 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.
+ "ResultConverter.html#ResultConverterGenerator-concept">ResultConverterGenerator
+ 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.
copy_const_reference synopsis
#include <boost/python/module.hpp>
#include <boost/python/class.hpp>
@@ -104,20 +117,16 @@ struct Foo {
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>())
- )
+ class_<Bar>("Bar");
+
+ class_<Foo>("Foo", init<int>())
+ .def("get_bar", &Foo::get_bar
+ , return_value_policy<copy_const_reference>())
;
}
-
>>> from my_module import *
>>> f = Foo(3) # create a Foo object
@@ -126,10 +135,13 @@ BOOST_PYTHON_MODULE_INIT(my_module)
Revised
- 15 February, 2002
+ 29 September, 2002
+
-
- © Copyright Dave
- Abrahams 2002. All Rights Reserved.
+
© Copyright Dave Abrahams 2002. All Rights
+ Reserved.
+
+
diff --git a/doc/v2/copy_non_const_reference.html b/doc/v2/copy_non_const_reference.html
index ffa728db..8f427016 100644
--- a/doc/v2/copy_non_const_reference.html
+++ b/doc/v2/copy_non_const_reference.html
@@ -1,47 +1,59 @@
-
+
+
+
+
Boost.Python -
<boost/python/copy_non_const_reference.hpp>
+
+
|
- |
Boost.PythonHeader <boost/python/copy_non_const_reference.hpp>+ |
+
copy_non_const_reference
+ copy_non_const_referencecopy_non_const_reference synopsis
+ copy_non_const_reference synopsiscopy_non_const_reference metafunctions
+ copy_non_const_reference metafunctionscopy_non_const_reference
copy_non_const_reference is a model of ResultConverterGenerator 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.
+ "ResultConverter.html#ResultConverterGenerator-concept">ResultConverterGenerator
+ 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.
copy_non_const_reference synopsisC++ code: +
C++ code:
#include <boost/python/module.hpp>
#include <boost/python/class.hpp>
@@ -105,16 +118,12 @@ struct Foo {
using namespace boost::python;
BOOST_PYTHON_MODULE_INIT(my_module)
{
- module("my_module")
- .add(
- class_<Bar>()
- )
- .add(
- class_<Foo>()
- .def_init(args<int>())
- .def("get_bar", &Foo::get_bar
- , return_value_policy<copy_non_const_reference>())
- );
+ class_<Bar>("Bar");
+
+ class_<Foo>("Foo", init<int>())
+ .def("get_bar", &Foo::get_bar
+ , return_value_policy<copy_non_const_reference>())
+ ;
}
Python Code:
@@ -126,10 +135,13 @@ BOOST_PYTHON_MODULE_INIT(my_module)
Revised - 05 November, 2001 + 29 September, 2001 +
- -© Copyright Dave - Abrahams 2002. All Rights Reserved. +
© Copyright Dave Abrahams 2002. All Rights + Reserved.
+ +