An iterator into RingBuf.
More...
#include <baudvine/ringbuf.h>
|
using | difference_type = typename AllocTraits::difference_type |
|
using | size_type = typename AllocTraits::difference_type |
|
using | value_type = typename AllocTraits::value_type |
|
using | pointer = Ptr |
|
using | reference = decltype(*pointer{}) |
|
using | iterator_category = std::random_access_iterator_tag |
|
|
difference_type | operator- (const Iterator &lhs, const Iterator &rhs) noexcept |
|
Iterator | operator+ (difference_type lhs, const Iterator &rhs) noexcept |
|
bool | operator< (const Iterator &lhs, const Iterator &rhs) noexcept |
|
bool | operator> (const Iterator &lhs, const Iterator &rhs) noexcept |
|
bool | operator<= (const Iterator &lhs, const Iterator &rhs) noexcept |
|
bool | operator>= (const Iterator &lhs, const Iterator &rhs) noexcept |
|
bool | operator== (const Iterator &lhs, const Iterator &rhs) noexcept |
|
bool | operator!= (const Iterator &lhs, const Iterator &rhs) noexcept |
|
template<typename P , typename A , std::size_t C, typename OutputIt > |
OutputIt | copy (const Iterator< P, A, C > &begin, const Iterator< P, A, C > &end, OutputIt out) |
|
template<typename Ptr, typename AllocTraits, std::size_t Capacity>
class baudvine::detail::ringbuf::Iterator< Ptr, AllocTraits, Capacity >
An iterator into RingBuf.
- Template Parameters
-
Ptr | The pointer type, which determines constness. |
AllocTraits | The allocator traits for the container, used for size/difference_type and const_pointer (for auto conversion to const iterator). |
Capacity | The size of the backing array, and maximum size of the ring buffer. |
Definition at line 154 of file ringbuf.h.
◆ Iterator()
template<typename Ptr , typename AllocTraits , std::size_t Capacity>
Construct a new iterator object.
- Parameters
-
data | Pointer to the start of the RingBuf's backing array. |
ring_offset | Physical index of the start of the ring buffer. |
ring_index | Logical index in the ring buffer: when the iterator is at ring_offset, ring_index is 0. |
Definition at line 172 of file ringbuf.h.
◆ operator Iterator< typename AllocTraits::const_pointer, AllocTraits, Capacity >()
template<typename Ptr , typename AllocTraits , std::size_t Capacity>
Convert an iterator into a const iterator.
- Returns
- A const iterator pointing to the same place.
Definition at line 184 of file ringbuf.h.
The documentation for this class was generated from the following file: