gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::CircularQueue< T >::iterator Struct Reference

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&.
 
iteratoroperator= (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
 
iteratoroperator++ ()
 Pre-increment operator.
 
iterator operator++ (int)
 Post-increment operator.
 
iteratoroperator-- ()
 ForwardIterator The multipass guarantee is provided by the reliance on _idx.
 
iterator operator-- (int)
 Post-decrement operator.
 
iteratoroperator+= (const difference_type &t)
 RandomAccessIterator requirements.
 
iteratoroperator-= (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 >, referenceoperator[] (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)
 

Detailed Description

template<typename T>
struct gem5::CircularQueue< T >::iterator

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.

Constructor & Destructor Documentation

◆ iterator()

template<typename T >
gem5::CircularQueue< T >::iterator::iterator ( )
default

Member Function Documentation

◆ idx()

template<typename T >
size_t gem5::CircularQueue< T >::iterator::idx ( ) const
inline

OutputIterator has no extra requirements.

Definition at line 386 of file circular_queue.hh.

References gem5::CircularQueue< T >::iterator::_idx.

Member Data Documentation

◆ _cq

◆ _idx


The documentation for this struct was generated from the following file:

Generated on Tue Jun 18 2024 16:24:10 for gem5 by doxygen 1.11.0