C++ Boost

Boost.Python

Header <boost/python/to_python_value.hpp>


Contents

Classes
Class to_python_value
Class template to_python_value synopsis
Class template to_python_value observer functions

Classes

Class template to_python_value

to_python_value is a model of ResultConverter which copies its argument into a new Python object.

Class to_python_value synopsis

namespace boost { namespace python
{
   template <class T>
   struct to_python_value
   {
      typedef typename add_reference<
         typename add_const<T>::type
      >::type argument_type;

      static bool convertible();
      PyObject* operator()(argument_type) const;
   };
}}

Class to_python_value observers

static bool convertible();
Returns: true iff a converter has been registered which can convert T to python by-value.
PyObject* operator()(argument_type x) const;
Requires: convertible() == true
Effects: converts x to python
Returns: the resulting Python object iff a converter for T has been registered, 0 otherwise.

Revised 13 November, 2002

© Copyright Dave Abrahams 2002. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)