28 #ifndef __CIRCULATOR_H__
29 #define __CIRCULATOR_H__
43 inline circulator(T here, T begin, T end) : m_here(here), m_begin(begin), m_end(end) {}
63 if (m_here == m_end) m_here = m_begin;
69 if (m_here == m_begin) m_here = m_end;
85 T m_here, m_begin, m_end;
a circulator that is foreseen to take as template member either a pointer or an iterator;
circulator(T here, T begin, T end)
ctor with iniitalisation from iterators
void set_position(T pointer)
set just the position without resetting the begin and end elements
circulator< T > & operator--()
position decrementation
bool operator!=(const circulator &other) const
check if the current elements are different NB: for efficiency, this checks only the here element
circulator(const circulator< T > &other)
copy ctor
circulator< T > & operator++()
position incrementation
T operator()()
get the current object
void set_position(const circulator< T > &other)
set just the position without resetting the begin and end elements
bool operator==(const circulator &other) const
check if the current elements are the same NB: for efficiency, this checks only the here element