Lines Matching defs:iterator
23 #include <iterator>
45 * Forward iterator to this class. Implements an std:forward_iterator.
47 class iterator : public std::iterator<std::forward_iterator_tag, T> {
49 iterator(T* ptr, size_t size, size_t pos, size_t ctr);
51 iterator& operator++();
53 iterator operator++(int);
55 bool operator==(const iterator& rhs);
57 bool operator!=(const iterator& rhs);
71 * Constant forward iterator to this class. Implements an std:forward_iterator.
73 class const_iterator : public std::iterator<std::forward_iterator_tag, T> {
125 * Get an iterator to the front of this RingBuffer.
127 iterator begin();
130 * Get an iterator to the end of this RingBuffer.
132 iterator end();
177 RingBuffer<T>::iterator::iterator(T* ptr, size_t size, size_t pos, size_t ctr) :
181 typename RingBuffer<T>::iterator& RingBuffer<T>::iterator::operator++() {
194 typename RingBuffer<T>::iterator RingBuffer<T>::iterator::operator++(int) {
195 iterator tmp{mPtr, mSize, mPos, mCtr};
201 bool RingBuffer<T>::iterator::operator==(const iterator& rhs) {
206 bool RingBuffer<T>::iterator::operator!=(const iterator& rhs) {
211 T& RingBuffer<T>::iterator::operator*() {
216 T* RingBuffer<T>::iterator::operator->() {
304 typename RingBuffer<T>::iterator RingBuffer<T>::begin() {
306 return iterator(mBuffer.data(), mBuffer.size(), (mFrontIdx == 0) ? tmp : mFrontIdx - 1, 0);
310 typename RingBuffer<T>::iterator RingBuffer<T>::end() {
312 return iterator(mBuffer.data(), s, s, s);