ESyS-Particle  2.3
IteratorPy.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 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.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 
14 #ifndef ESYS_LSMITERATORPY_H
15 #define ESYS_LSMITERATORPY_H
16 
17 #include <boost/python.hpp>
18 #include <patchlevel.h>
19 #include <string>
20 
21 namespace esys
22 {
23  namespace lsm
24  {
25  template <
26  typename TmplIterator
27  >
28  class IteratorPy
29  {
30  public:
31  typedef TmplIterator Iterator;
32  typedef typename Iterator::value_type value_type;
33 
34  IteratorPy(const Iterator &it);
35 
39  value_type next();
40 
41  static void exportIterator(
42  const std::string &pythonName,
43  const std::string &pythonDocReturnType="object"
44  );
45 
46  private:
47  Iterator m_it;
48  };
49  }
50 }
51 
53 
54 #endif
Definition: IteratorPy.h:28
TmplIterator Iterator
Definition: IteratorPy.h:31
Iterator m_it
Definition: IteratorPy.h:47
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