14 template<
class TYPE,
int SIZE>
31 return _buffer[SIZE-1];
52 int size ()
const {
return SIZE; }
57 int count ()
const {
return _count; }
63 if( _count < SIZE ) _count++;
65 if( _current < _buffer ) _current = &last();
66 return _count == SIZE;
74 bool result =
shift();
84 index = index <_count-1 ? index : _count-1;
85 return *(_buffer + ((_current - _buffer + index) % SIZE));
93 index = index <_count-1 ? index : _count-1;
94 return *(_buffer + ((_current - _buffer + index) % SIZE));