rasdaman API
itertype.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 /
33 #ifndef _D_ITER_TYPE_
34 #define _D_ITER_TYPE_
35 
36 //@ManMemo: Module: {\bf raslib}
37 
38 /*@Doc:
39  This class realizes the iterator used to access
40  single elements of \Ref{r_Structure_Type}.
41 */
42 
43 template <class T>
44 class r_IterType
45 {
46 public:
48  r_IterType();
50  r_IterType( T* newLastElem, T* newElems );
52  r_IterType( T* newLastElem, T* newElems, T* newCurrPos );
54  r_IterType( const r_IterType<T>& iter );
56  ~r_IterType();
58  r_IterType<T>& operator=( const r_IterType<T>& iter );
60  bool operator==( const r_IterType<T>& otherIter );
62  bool operator!=( const r_IterType<T>& otherIter );
64  r_IterType<T>& operator++();
66  r_IterType<T> operator++( int );
68  T operator*();
69 
70 protected:
71  T* lastElem;
72  T* myElems;
73  T* currPos;
74 };
75 
76 #ifdef EARLY_TEMPLATE
77 #ifdef __EXECUTABLE__
78 #ifdef __VISUALC__
79 #include "itertype.cpp"
80 #else
81 #include "itertype.cc"
82 #endif
83 #endif
84 #endif
85 
86 #endif