14 #include <boost/python/iterator.hpp>
20 template<
typename TmplIterator>
25 template<
typename TmplIterator>
33 boost::python::objects::stop_iteration_error();
37 template <
typename TmplIterator>
39 const std::string &pythonName,
40 const std::string &pythonDocReturnType
43 boost::python::class_<IteratorPy<TmplIterator> >(
45 boost::python::no_init
50 boost::python::return_internal_reference<>(),
52 std::string(
"Returns the next object in the sequence.\n")
54 "@rtype: L{" + pythonDocReturnType +
"}\n"
56 "@raise StopIteration: if there is no next element."
61 boost::python::objects::identity_function(),
Definition: IteratorPy.h:28
TmplIterator Iterator
Definition: IteratorPy.h:31
Iterator::value_type value_type
Definition: IteratorPy.h:32
value_type next()
Definition: IteratorPy.hpp:27
IteratorPy(const Iterator &it)
Definition: IteratorPy.hpp:21
static void exportIterator(const std::string &pythonName, const std::string &pythonDocReturnType="object")
Definition: IteratorPy.hpp:38