#include <PySequenceHolder.h>
Public Member Functions | |
| PySequenceHolder (python::object seq) | |
| unsigned int | size () const |
| Returns the size of the contained sequence. | |
| T | operator[] (unsigned int which) const |
| Returns an element of the sequence. | |
PySequenceHolder is templated on the type of the contained object.
The class is lazy: elements are not evaluated until requested within the C++ code.
Definition at line 27 of file PySequenceHolder.h.
| PySequenceHolder< T >::PySequenceHolder | ( | python::object | seq | ) | [inline] |
Definition at line 29 of file PySequenceHolder.h.
| unsigned int PySequenceHolder< T >::size | ( | ) | const [inline] |
Returns the size of the contained sequence.
NOTE: the sequence must have a __len__ attribute, otherwise a ValueError will be raised.
Definition at line 38 of file PySequenceHolder.h.
Referenced by PySequenceHolder< T >::operator[]().
| T PySequenceHolder< T >::operator[] | ( | unsigned int | which | ) | const [inline] |
Returns an element of the sequence.
ARGUMENTS:
NOTES:
IndexError T, we raise a ValueError Definition at line 59 of file PySequenceHolder.h.
References POSTCONDITION, and PySequenceHolder< T >::size().
1.5.5