GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel > Class Template Reference

Specialization of UTF8Iterator that provides forward iteration capability (and an optimized implementation) for base iterators that support it. More...

#include <GREM/core/formats/unicode.hpp>

Public Types

using difference_type = ptrdiff_t
using value_type = char32_t
using reference = const value_type&
using pointer = const value_type*
using iterator_category = std::forward_iterator_tag
using sentinel = UTF8Sentinel

Public Member Functions

constexpr UTF8Iterator ()=default
constexpr UTF8Iterator (BaseIterator it, BaseSentinel end)
constexpr bool operator== (const UTF8Iterator &other) const
constexpr bool operator== (const UTF8Sentinel &) const
constexpr reference operator* () const
constexpr pointer operator-> () const
constexpr UTF8Iterator & operator++ ()
constexpr UTF8Iterator operator++ (int)
constexpr BaseIterator base () const

Detailed Description

template<typename BaseIterator, typename BaseSentinel>
requires forward_iterator<BaseIterator>
class grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >

Specialization of UTF8Iterator that provides forward iteration capability (and an optimized implementation) for base iterators that support it.

Template Parameters
BaseIteratorunderlying UTF-8 code unit input iterator type to wrap.
BaseSentinelsentinel type for BaseIterator.

Member Typedef Documentation

◆ difference_type

template<typename BaseIterator, typename BaseSentinel>
using grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::difference_type = ptrdiff_t

◆ value_type

template<typename BaseIterator, typename BaseSentinel>
using grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::value_type = char32_t

◆ reference

template<typename BaseIterator, typename BaseSentinel>
using grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::reference = const value_type&

◆ pointer

template<typename BaseIterator, typename BaseSentinel>
using grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::pointer = const value_type*

◆ iterator_category

template<typename BaseIterator, typename BaseSentinel>
using grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::iterator_category = std::forward_iterator_tag

◆ sentinel

template<typename BaseIterator, typename BaseSentinel>
using grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::sentinel = UTF8Sentinel

Constructor & Destructor Documentation

◆ UTF8Iterator() [1/2]

template<typename BaseIterator, typename BaseSentinel>
grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::UTF8Iterator ( )
constexprdefault

◆ UTF8Iterator() [2/2]

template<typename BaseIterator, typename BaseSentinel>
grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::UTF8Iterator ( BaseIterator it,
BaseSentinel end )
inlineconstexpr

Member Function Documentation

◆ operator==() [1/2]

template<typename BaseIterator, typename BaseSentinel>
bool grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::operator== ( const UTF8Iterator< BaseIterator, BaseSentinel > & other) const
inlinenodiscardconstexpr

◆ operator==() [2/2]

template<typename BaseIterator, typename BaseSentinel>
bool grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::operator== ( const UTF8Sentinel & ) const
inlinenodiscardconstexpr

◆ operator*()

template<typename BaseIterator, typename BaseSentinel>
reference grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::operator* ( ) const
inlinenodiscardconstexpr

◆ operator->()

template<typename BaseIterator, typename BaseSentinel>
pointer grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::operator-> ( ) const
inlinenodiscardconstexpr

◆ operator++() [1/2]

template<typename BaseIterator, typename BaseSentinel>
UTF8Iterator & grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::operator++ ( )
inlineconstexpr

◆ operator++() [2/2]

template<typename BaseIterator, typename BaseSentinel>
UTF8Iterator grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::operator++ ( int )
inlineconstexpr

◆ base()

template<typename BaseIterator, typename BaseSentinel>
BaseIterator grem::unicode::UTF8Iterator< BaseIterator, BaseSentinel >::base ( ) const
inlinenodiscardconstexpr

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