26 #ifndef BOOST_PYTHON_INDEXING_PYTHON_ITERATOR_HPP
27 #define BOOST_PYTHON_INDEXING_PYTHON_ITERATOR_HPP
29 #include <boost/python/object.hpp>
30 #include <boost/python/handle.hpp>
32 namespace boost {
namespace python {
namespace indexing {
36 : m_iter_obj (handle<> (PyObject_GetIter (obj.ptr()))),
37 m_next_method (m_iter_obj.attr (
"next")),
51 m_current = m_next_method ();
53 catch (boost::python::error_already_set
const &)
55 if (PyErr_ExceptionMatches (PyExc_StopIteration))
59 m_current = boost::python::object ();
72 boost::python::object current()
const
77 ::boost::python::object m_iter_obj;
78 ::boost::python::object m_next_method;
79 ::boost::python::object m_current;
83 #endif // BOOST_PYTHON_INDEXING_PYTHON_ITERATOR_HPP
Definition: python_CEGUI.h:9
Definition: python_iterator.hpp:33