25 # ifndef DSGITERATOR_H 26 # define DSGITERATOR_H 32 template <
bool B,
typename T,
typename F>
33 using RetType =
typename std::conditional<B, T, F>::type;
35 template <
class Iterator,
typename T,
bool RET_CPY = false>
41 return *
static_cast<Iterator *
>(
this);
46 return *
static_cast<const Iterator *
>(
this);
57 return me().get_current();
67 return me().get_current();
77 return &
me().get_current();
82 return const_me().get_location() == it.get_location();
87 return const_me().get_location() != it.get_location();
91 template <
class Iterator,
typename T,
bool RET_CPY = false>
97 Iterator & operator ++ ()
103 Iterator operator ++ (
int)
105 Iterator ret_val = Base::me();
111 template <
class Iterator,
typename T,
bool RET_CPY = false>
117 Iterator & operator -- ()
123 Iterator operator -- (
int)
125 Iterator ret_val = Base::me();
131 template <
class Iterator,
typename T,
bool RET_CPY = false>
139 Base::me().move_to(i);
140 return Base::mes().get_current();
145 Base::me().next_n(p);
151 Iterator it = Base::me();
158 Base::me().prev_n(p);
164 Iterator it = Base::me();
169 bool operator < (
const Iterator & it)
const 171 return Base::const_me().get_location() < it.get_location();
174 bool operator <= (
const Iterator & it)
const 176 return Base::const_me().get_location() <= it.get_location();
179 bool operator > (
const Iterator & it)
const 181 return Base::const_me().get_location() > it.get_location();
184 bool operator >= (
const Iterator & it)
const 186 return Base::const_me().get_location() >= it.get_location();
192 # endif // DSGITERATOR_H RetType< RET_CPY, T, T & > get_curr()
Definition: iterator.H:55
RetType< RET_CPY, T, const T & > get_curr() const
Definition: iterator.H:60
Definition: iterator.H:92
Definition: iterator.H:132
Definition: iterator.H:36
typename std::conditional< B, T, F >::type RetType
Definition: iterator.H:33
bool operator!=(const Iterator &it) const
Definition: iterator.H:85
bool operator==(const Iterator &it) const
Definition: iterator.H:80
Iterator & me()
Definition: iterator.H:39
T * operator->()
Definition: iterator.H:75
RetType< RET_CPY, T, T & > operator*()
Definition: iterator.H:65
Definition: iterator.H:112
unsigned long int nat_t
Definition: types.H:50
const Iterator & const_me() const
Definition: iterator.H:44
bool has_curr() const
Definition: iterator.H:50