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(),