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

Overview

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

Type for iterating over the chunks added to 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 retrieve the contiguous byte spans of the topmost layer of a multibuf. It is distinguished from ByteIterator, which iterates over individual bytes of the topmost layer.

Public Types

using size_type = SizeType
 
using difference_type = std::ptrdiff_t
 
using value_type = SpanType
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using reference = value_type &
 
using const_reference = const value_type &
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

constexpr ChunkIterator (const ChunkIterator &other)
 
constexpr ChunkIteratoroperator= (const ChunkIterator &other)
 
constexpr operator ChunkIterator< SizeType, true > () const
 
constexpr reference operator* ()
 
constexpr const_reference operator* () const
 
constexpr pointer operator-> ()
 
constexpr const_pointer operator-> () const
 
constexpr ChunkIteratoroperator++ ()
 
constexpr ChunkIterator operator++ (int)
 
constexpr ChunkIteratoroperator-- ()
 
constexpr ChunkIterator operator-- (int)
 

Friends

template<typename , typename >
class ChunksImpl
 
template<typename , bool >
class ByteIterator
 
constexpr friend bool operator== (const ChunkIterator &lhs, const ChunkIterator &rhs)
 
constexpr friend bool operator!= (const ChunkIterator &lhs, const ChunkIterator &rhs)
 

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