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

Iterator type for decoding Unicode code points from a UTF-8 string, wrapping an existing iterator for UTF-8 code units. 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::input_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)

Detailed Description

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

Iterator type for decoding Unicode code points from a UTF-8 string, wrapping an existing iterator for UTF-8 code units.

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

Member Typedef Documentation

◆ difference_type

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

◆ value_type

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

◆ reference

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

◆ pointer

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

◆ iterator_category

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

◆ sentinel

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

Constructor & Destructor Documentation

◆ UTF8Iterator() [1/2]

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

◆ UTF8Iterator() [2/2]

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

Member Function Documentation

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ operator*()

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

◆ operator->()

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

◆ operator++() [1/2]

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

◆ operator++() [2/2]

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

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