toast::python::register_optional< T > Struct Template Reference
[toast python library]

#include <toast/python/optional.hpp>

List of all members.


Detailed Description

template<typename T>
struct toast::python::register_optional< T >

Registers a boost::optional<Type> for in Python, making empty optionals into 'None' in Python.

Instantiate the type register_optional<T> to do the registration.

When going from C++ to Python, empty optional's will become the 'None' object, and non-empty optionals of type boost::optional<T> will behave like T.\ From Python to C++, None instances will become empty boost::optional<T>'s, and non-none objects will instantiated boost::optional<T>'s.

Classes

struct  optional_from_python
struct  optional_to_python


The documentation for this struct was generated from the following file:

SourceForge.net Logo