ESyS-Particle  2.3.4
PythonIterIterator.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.apache.org/licenses/LICENSE-2.0 //
10 // //
12 
13 
14 #ifndef ESYS_LSM_BPUPYTHONITERITERATOR_H
15 #define ESYS_LSM_BPUPYTHONITERITERATOR_H
16 
17 #include <boost/python.hpp>
18 #include <patchlevel.h>
19 
20 namespace esys
21 {
22  namespace lsm
23  {
24  namespace bpu
25  {
26  template <typename TmplExtractType>
28  {
29  public:
30  typedef TmplExtractType value_type;
31  PythonIterIterator(boost::python::object &iteratable);
32 
33  bool hasNext() const;
34 
35  value_type next();
36 
37  void update();
38 
39  private:
40  bool m_hasNext;
41  boost::python::object m_next;
42  boost::python::object m_iter;
43  };
44  }
45  }
46 }
47 
49 
50 #endif
PythonIterIterator.hpp
esys::lsm::bpu::PythonIterIterator::PythonIterIterator
PythonIterIterator(boost::python::object &iteratable)
Definition: PythonIterIterator.hpp:21
esys::lsm::bpu::PythonIterIterator::hasNext
bool hasNext() const
Definition: PythonIterIterator.hpp:32
esys::lsm::bpu::PythonIterIterator::m_next
boost::python::object m_next
Definition: PythonIterIterator.h:41
esys::lsm::bpu::PythonIterIterator::update
void update()
Definition: PythonIterIterator.hpp:46
esys::lsm::bpu::PythonIterIterator::value_type
TmplExtractType value_type
Definition: PythonIterIterator.h:30
esys
Definition: CheckPointable.cpp:17
esys::lsm::bpu::PythonIterIterator::m_hasNext
bool m_hasNext
Definition: PythonIterIterator.h:40
esys::lsm::bpu::PythonIterIterator::m_iter
boost::python::object m_iter
Definition: PythonIterIterator.h:42
esys::lsm::bpu::PythonIterIterator
Definition: PythonIterIterator.h:28
esys::lsm::bpu::PythonIterIterator::next
value_type next()
Definition: PythonIterIterator.hpp:38