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

#include <toast/python/wrapper.hpp>

List of all members.


Detailed Description

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

Base class for python bindings that helps wrapping pure virtual functions.

The boost::python::wrapper template class only supplies a get_override() member function that returns an override object (which could be None). However, if it is used as it is in the documentation, invoking the returned value will just result in an attribute error with no real indication of what the user was trying to do. This class allows users to easily handle pure virtual functions and give a more descriptive error when the pure virtual function was not implemented.

Public Member Functions

boost::python::override get_pure_override (char const *name)


Member Function Documentation

template<typename T>
boost::python::override toast::python::wrapper< T >::get_pure_override ( char const *  name  )  [inline]

retrieve the override

Exceptions:
std::runtime_error if the function wasn't implemented


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

SourceForge.net Logo