gem5 v24.0.0.0
|
Iterator to the circular queue. More...
#include <circular_queue.hh>
Public Types | |
using | value_type = T |
Iterator Traits. | |
using | difference_type = std::ptrdiff_t |
using | reference = value_type& |
using | const_reference = const value_type& |
using | pointer = value_type* |
using | const_pointer = const value_type* |
using | iterator_category = std::random_access_iterator_tag |
Public Member Functions | |
iterator (CircularQueue *cq, size_t idx) | |
iterator ()=default | |
iterator (const iterator &it) | |
Trait reference type iterator satisfies OutputIterator, therefore reference must be T&. | |
iterator & | operator= (const iterator &it) |
bool | dereferenceable () const |
Test dereferenceability. | |
bool | operator== (const iterator &that) const |
InputIterator. | |
bool | operator!= (const iterator &that) |
Inequality operator. | |
reference | operator* () |
Dereference operator. | |
const_reference | operator* () const |
pointer | operator-> () |
Dereference operator. | |
const_pointer | operator-> () const |
iterator & | operator++ () |
Pre-increment operator. | |
iterator | operator++ (int) |
Post-increment operator. | |
iterator & | operator-- () |
ForwardIterator The multipass guarantee is provided by the reliance on _idx. | |
iterator | operator-- (int) |
Post-decrement operator. | |
iterator & | operator+= (const difference_type &t) |
RandomAccessIterator requirements. | |
iterator & | operator-= (const difference_type &t) |
iterator | operator+ (const difference_type &t) |
Addition operator. | |
iterator | operator- (const difference_type &t) |
Substraction operator. | |
difference_type | operator- (const iterator &that) |
Difference operator. | |
template<typename Idx > | |
std::enable_if_t< std::is_integral_v< Idx >, reference > | operator[] (const Idx &index) |
Index operator. | |
bool | operator< (const iterator &that) const |
Comparisons. | |
bool | operator> (const iterator &that) const |
bool | operator>= (const iterator &that) const |
bool | operator<= (const iterator &that) const |
size_t | idx () const |
OutputIterator has no extra requirements. | |
Public Attributes | |
CircularQueue * | _cq = nullptr |
size_t | _idx = 0 |
Friends | |
iterator | operator+ (const difference_type &t, iterator &it) |
iterator | operator- (const difference_type &t, iterator &it) |
Iterator to the circular queue.
iterator implementation to provide wrap around indexing which the vector iterator does not.
Definition at line 85 of file circular_queue.hh.
|
default |
|
inline |
OutputIterator has no extra requirements.
Definition at line 386 of file circular_queue.hh.
References gem5::CircularQueue< T >::iterator::_idx.
CircularQueue* gem5::CircularQueue< T >::iterator::_cq = nullptr |
Definition at line 88 of file circular_queue.hh.
Referenced by gem5::CircularQueue< T >::iterator::dereferenceable(), gem5::CircularQueue< T >::iterator::operator*(), gem5::CircularQueue< T >::iterator::operator*(), gem5::CircularQueue< T >::iterator::operator--(), gem5::CircularQueue< T >::iterator::operator-=(), gem5::CircularQueue< T >::iterator::operator=(), and gem5::CircularQueue< T >::iterator::operator==().
size_t gem5::CircularQueue< T >::iterator::_idx = 0 |
Definition at line 89 of file circular_queue.hh.
Referenced by gem5::CircularQueue< T >::iterator::dereferenceable(), gem5::CircularQueue< T >::iterator::idx(), gem5::CircularQueue< T >::iterator::operator*(), gem5::CircularQueue< T >::iterator::operator*(), gem5::CircularQueue< T >::iterator::operator++(), gem5::CircularQueue< T >::iterator::operator+=(), gem5::CircularQueue< T >::iterator::operator-(), gem5::CircularQueue< T >::iterator::operator--(), gem5::CircularQueue< T >::iterator::operator-=(), gem5::CircularQueue< T >::iterator::operator<(), gem5::CircularQueue< T >::iterator::operator=(), and gem5::CircularQueue< T >::iterator::operator==().