ESyS-Particle  2.3.4
nts_iter.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 #ifndef __NTS_ITER_H
14 #define __NTS_ITER_H
15 
16 //--- project includes ---
17 #include "ntable.h"
18 
19 //---system includes---
20 #include <cstddef>
21 
22 //--- STL includes ---
23 #include <valarray>
24 #include <vector>
25 #include <list>
26 
27 using std::slice;
28 using std::vector;
29 using std::list;
30 
31 //--- forward decls ---
32 template <typename T>
33 class NTSlab_iter;
34 
35 template <typename T> bool operator==(const NTSlab_iter<T>&,const NTSlab_iter<T>&);
36 template <typename T> bool operator!=(const NTSlab_iter<T>&,const NTSlab_iter<T>&);
37 
38 template <typename T>
39 class NTSlab;
40 
45 template <typename T>
46 class NTSlab_iter
47 {
48  private:
51 
52  public:
54 
58 
61 
62 
64  T* operator->();
65  T& operator*();
66 
67  typename NeighborTable<T>::indextype index() const;
68 
69  //comparison
70  friend bool operator== <>(const NTSlab_iter&,const NTSlab_iter&);
71  friend bool operator!= <>(const NTSlab_iter&,const NTSlab_iter&);
72 };
73 
74 #include "nts_iter.hpp"
75 
76 #endif //__NTS_ITER_H
NTSlab_iter::m_slab
NTSlab< T > * m_slab
Definition: nts_iter.h:49
ntable.h
NTSlab_iter::operator*
T & operator*()
Definition: nts_iter.hpp:109
NTSlab_iter::operator->
T * operator->()
access ops
Definition: nts_iter.hpp:98
NTSlab_iter::operator++
NTSlab_iter & operator++()
move ops
Definition: nts_iter.hpp:27
NeighborTable::indextype
pair< int, int > indextype
Definition: ntable.h:72
NTSlab_iter::m_curr
NeighborTable< T >::indextype m_curr
Definition: nts_iter.h:50
NTSlab
representation of a slab of the search array of a NeigborTable
Definition: nt_slab.h:35
nts_iter.hpp
operator!=
bool operator!=(const NTSlab_iter< T > &, const NTSlab_iter< T > &)
Definition: nts_iter.hpp:138
NTSlab_iter::operator--
NTSlab_iter & operator--()
Definition: nts_iter.hpp:63
NTSlab_iter
iterator for a NTSlab
Definition: nts_iter.h:39
operator==
bool operator==(const NTSlab_iter< T > &, const NTSlab_iter< T > &)
Definition: nts_iter.hpp:127
NTSlab_iter::index
NeighborTable< T >::indextype index() const
Definition: nts_iter.hpp:118
NTSlab_iter::NTSlab_iter
NTSlab_iter(NTSlab< T > *, typename NeighborTable< T >::indextype)
Definition: nts_iter.hpp:17