C/C++ API Reference
Loading...
Searching...
No Matches
pw::multibuf_impl::ByteIterator< SizeType, kIsConst > Class Template Reference

Overview

template<typename SizeType, bool kIsConst>
class pw::multibuf_impl::ByteIterator< SizeType, kIsConst >

Type for iterating over the bytes in a multibuf.

Multibufs can be thought of as a sequence of "layers", where each layer except the bottommost is comprised of subspans of the layer below it, and the bottommost references the actual memory. This type can be used to iterate over the bytes of the topmost layer of a multibuf. It is distinguished from ChunkIterator, which iterates over byte spans of the topmost layer.

Public Types

using size_type = SizeType
 
using difference_type = ptrdiff_t
 
using value_type = typename ChunkIteratorType::ByteType
 
using pointer = value_type *
 
using reference = value_type &
 
using iterator_category = std::random_access_iterator_tag
 

Public Member Functions

constexpr operator ByteIterator< SizeType, true > () const
 
constexpr reference operator* () const
 
constexpr reference operator[] (difference_type n) const
 
constexpr ByteIteratoroperator++ ()
 
constexpr ByteIterator operator++ (int)
 
constexpr ByteIteratoroperator+= (difference_type n)
 
constexpr ByteIteratoroperator-- ()
 
constexpr ByteIterator operator-- (int)
 
constexpr ByteIteratoroperator-= (difference_type n)
 

Friends

class GenericMultiBuf
 
class IteratorTest
 
constexpr friend ByteIterator operator+ (ByteIterator it, difference_type n)
 
constexpr friend ByteIterator operator+ (difference_type n, ByteIterator it)
 
constexpr friend ByteIterator operator- (ByteIterator it, difference_type n)
 
constexpr friend difference_type operator- (const ByteIterator &lhs, const ByteIterator &rhs)
 
constexpr friend bool operator== (const ByteIterator &lhs, const ByteIterator &rhs)
 
constexpr friend bool operator!= (const ByteIterator &lhs, const ByteIterator &rhs)
 
constexpr friend bool operator< (const ByteIterator &lhs, const ByteIterator &rhs)
 
constexpr friend bool operator> (const ByteIterator &lhs, const ByteIterator &rhs)
 
constexpr friend bool operator<= (const ByteIterator &lhs, const ByteIterator &rhs)
 
constexpr friend bool operator>= (const ByteIterator &lhs, const ByteIterator &rhs)
 

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