diff --git a/doc/v2/ResultConverter.html b/doc/v2/ResultConverter.html new file mode 100644 index 00000000..08d81b1a --- /dev/null +++ b/doc/v2/ResultConverter.html @@ -0,0 +1,110 @@ + +
+ + +|
+ |
+
+ Boost.Python+ResultConverter Concept+ |
+
A ResultConverter for a type T is a type whose
+instances can be used to convert C++ return values of type
+T to_python. A ResultConverterGenerator is
+an MPL unary metafunction class which, given the return type of a C++
+function, returns a ResultConverter for that type. ResultConverters in
+Boost.Python generally inspect library's registry of converters to
+find a suitable converter, but converters which don't use the registry
+are also possible.
+
+
In the table below, C denotes a ResultConverter
+type for a type R , c denotes
+an object of type C , and r
+denotes an object of type R.
+
+
| Expression | +Type | +Semantics | +
C c; |
+ + | Constructs a C object.
+ |
c.convertible() |
+ convertible to bool |
+ false iff no conversion from any R value
+ to a Python object is possible. |
+
c(r) |
+ convertible to PyObject* |
+ A pointer to a Python object corresponding to r,
+ or 0 iff r could not be converted
+ to_python, in which case PyErr_Occurred
+ should return non-zero. |
+
In the table below, G denotes a
+ResultConverterGenerator type and R denotes a possible
+C++ function return type.
+
+
| Expression | +Requirements | +
G::apply<R>::type |
+ A ResultConverter type for R. |
+
Revised + + 09 May, 2002 + +
+© Copyright Dave + Abrahams 2002. All Rights Reserved. + +
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.
+
+
diff --git a/doc/v2/copy_const_reference.html b/doc/v2/copy_const_reference.html
index ec76fa1a..70da135b 100644
--- a/doc/v2/copy_const_reference.html
+++ b/doc/v2/copy_const_reference.html
@@ -50,7 +50,7 @@
copy_const_reference
copy_const_reference is a model of ResultConverterGenerator which can be
+ "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.
diff --git a/doc/v2/copy_non_const_reference.html b/doc/v2/copy_non_const_reference.html
index a33bba55..ffa728db 100644
--- a/doc/v2/copy_non_const_reference.html
+++ b/doc/v2/copy_non_const_reference.html
@@ -51,7 +51,7 @@
copy_non_const_reference
copy_non_const_reference is a model of ResultConverterGenerator which can be
+ "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.
diff --git a/doc/v2/default_call_policies.html b/doc/v2/default_call_policies.html
index 876baf7a..058b13e2 100644
--- a/doc/v2/default_call_policies.html
+++ b/doc/v2/default_call_policies.html
@@ -111,7 +111,7 @@ PyObject* postcall(PyObject*, PyObject* result);
default_result_converter
default_result_converter is a model of ResultConverterGenerator which can be
+ "ResultConverter.html#ResultConverterGenerator-concept">ResultConverterGenerator which can be
used to wrap C++ functions returning non-pointer types, char
const*, and PyObject*, by-value.
diff --git a/doc/v2/manage_new_object.html b/doc/v2/manage_new_object.html
index 342c49ce..879cdc5e 100644
--- a/doc/v2/manage_new_object.html
+++ b/doc/v2/manage_new_object.html
@@ -50,7 +50,7 @@
manage_new_object
manage_new_object is a model of ResultConverterGenerator which can be
+ "ResultConverter.html#ResultConverterGenerator-concept">ResultConverterGenerator which can be
used to wrap C++ functions which return a pointer to an object allocated
with a new-expression, and expect the caller to take responsibility
for deleting that object.
diff --git a/doc/v2/reference.html b/doc/v2/reference.html
index 335382a6..24efbf61 100644
--- a/doc/v2/reference.html
+++ b/doc/v2/reference.html
@@ -164,8 +164,18 @@
-
reference_existing_object
reference_existing_object is a model of ResultConverterGenerator which can be
+ "ResultConverter.html#ResultConverterGenerator-concept">ResultConverterGenerator which can be
used to wrap C++ functions which return a reference or pointer to a C++
object. When the wrapped function is called, the value referenced by its
return value is not copied. A new Python object is created which contains a
diff --git a/doc/v2/return_value_policy.html b/doc/v2/return_value_policy.html
index f351af70..950b024b 100644
--- a/doc/v2/return_value_policy.html
+++ b/doc/v2/return_value_policy.html
@@ -49,7 +49,7 @@
return_value_policy instantiations are simply models
of CallPolicies which are composed of a ResultConverterGenerator and optional Base ResultConverterGenerator and optional Base CallPolicies.
ResultConverterGenerator
+ ResultConverterGenerator
to_python_indirect are models of ResultConverter.
+ href="ResultConverter.html#ResultConverter-concept">ResultConverter.
to_python_indirect synopsis