ESyS-Particle  2.3
ntb_iter.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 #ifndef __NTB_BLOCK_H
14 #define __NTB_BLOCK_H
15 
16 //--- project includes ---
17 #include "ntable/src/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>
34 
35 template <typename T> bool operator==(const NTBlock_iter<T>&,const NTBlock_iter<T>&);
36 template <typename T> bool operator!=(const NTBlock_iter<T>&,const NTBlock_iter<T>&);
37 
38 template <typename T>
39 class NTBlock;
40 
45 template <typename T>
46 class NTBlock_iter
47 {
48  private:
51 
52  public:
53  NTBlock_iter(NTBlock<T>*,int,int,int,int);
54 
58 
60  T* operator->();
61  T& operator*();
62 
63  //comparison
64  friend bool operator== <>(const NTBlock_iter&,const NTBlock_iter&);
65  friend bool operator!= <>(const NTBlock_iter&,const NTBlock_iter&);
66 };
67 
68 #include "ntable/src/ntb_iter.hpp"
69 
70 #endif //__NTB_ITER_H
71 
int m_iy
Definition: ntb_iter.h:50
representation of a slab of the search array of a NeigborTable
Definition: nt_block.h:22
NTBlock_iter & operator++()
move ops
Definition: ntb_iter.hpp:38
T * operator->()
access ops
Definition: ntb_iter.hpp:103
NTBlock_iter(NTBlock< T > *, int, int, int, int)
Definition: ntb_iter.hpp:23
bool operator==(const NTBlock_iter< T > &, const NTBlock_iter< T > &)
Definition: ntb_iter.hpp:123
iterator for a NTBlock
Definition: ntb_iter.h:33
NTBlock< T > * m_block
Definition: ntb_iter.h:49
int m_ix
Definition: ntb_iter.h:50
int m_ig
Definition: ntb_iter.h:50
bool operator!=(const NTBlock_iter< T > &, const NTBlock_iter< T > &)
Definition: ntb_iter.hpp:136
T & operator*()
Definition: ntb_iter.hpp:114
int m_iz
Definition: ntb_iter.h:50