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
48 #
if PY_VERSION_HEX >= 0x03000000
54 boost::python::return_internal_reference<>(),
56 std::string(
"Returns the next object in the sequence.\n")
58 "@rtype: L{" + pythonDocReturnType +
"}\n"
60 "@raise StopIteration: if there is no next element."
65 boost::python::objects::identity_function(),
Definition: IteratorPy.h:28
TmplIterator Iterator
Definition: IteratorPy.h:31
Definition: CheckPointable.cpp:16
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