54 virtual void Reset() = 0;
57 virtual bool IsValid()
const = 0;
89 virtual reference Current() = 0;
92 virtual const_reference Current()
const = 0;
123 template <
typename T>
151 typedef IBaseIterator<A>
self;
152 typedef self& self_reference;
153 typedef const self_reference const_self_reference;
155 virtual bool operator==(const_self_reference rhs) = 0;
158 virtual self_reference operator++() = 0;
161 virtual self_reference operator++(
int) = 0;
164 virtual A* operator->() = 0;
166 inline bool operator!=(const_self_reference rhs){
return !((*this) == rhs); }
179 class IIterator:
public IBaseIterator<A>
182 typedef IIterator<A>
self;
183 typedef self& self_reference;
184 typedef const self_reference const_self_reference;
186 IIterator(){ void_constructor(); }
188 IIterator(const_self_reference itr) { copy_constructor(itr); }
190 virtual self_reference
operator=(const_self_reference other) = 0;
193 virtual void void_constructor() = 0;
194 virtual void copy_constructor(const_self_reference itr) = 0;
214 virtual bool empty()
const = 0;
216 typedef IIterator<reference> iterator;
217 virtual iterator begin() = 0;
218 virtual iterator end() = 0;
220 typedef IIterator<const_reference> const_iterator;
221 virtual const_iterator begin()
const = 0;
222 virtual const_iterator end()
const = 0;
const value_type & const_reference
Templated accessor interface for accessing individual data (for instance, of an enumerator).
virtual void Reset()=0
Sets the enumerator to its initial position: -1, which is before the first element in the collection...
fglmVector operator*(const fglmVector &v, const number n)
Templated enumerator interface for simple iteration over a generic collection of T's.
virtual bool IsValid() const =0
Current position is inside the collection (not -1 or past the end)
virtual bool MoveNext()=0
Advances the enumerator to the next element of the collection. returns true if the enumerator was suc...
Base enumerator interface for simple iteration over a generic collection.
bool operator==(const Rational &a, const Rational &b)
void operator=(const IBaseEnumerator &)
bool operator!=(const Rational &a, const Rational &b)