Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | List of all members
castor::string::utf8::const_iterator< CharT, StringT > Class Template Reference

An iterator, to an UTF-8 string. More...

#include <StringUtils.hpp>

Public Types

using string_type = StringT
 
using iterator_type = typename string_type::const_iterator
 
using iterator_category = std::bidirectional_iterator_tag
 
using value_type = char32_t
 
using difference_type = String::difference_type
 
using pointer = const char32_t *
 
using reference = const char32_t &
 

Public Member Functions

 const_iterator (const_iterator const &it)
 
 const_iterator (const_iterator &&it) noexcept
 
const_iteratoroperator= (const_iterator const &it)
 
const_iteratoroperator= (const_iterator &&it) noexcept
 
 ~const_iterator () noexcept=default
 
 const_iterator (iterator_type const &it)
 Constructor.
 
const_iteratoroperator= (iterator_type const &it)
 Assignment operator.
 
const_iteratoroperator+= (size_t offset)
 Assigment addition operator.
 
const_iteratoroperator-= (size_t offset)
 Assignment subtraction operator.
 
const_iteratoroperator++ ()
 Pre-increment operator.
 
const_iterator operator++ (int)
 Post-increment operator.
 
const_iteratoroperator-- ()
 Pre-decrement operator.
 
const_iterator operator-- (int)
 Post-decrement operator.
 
char32_t operator* () const
 Access to the current codepoint value.
 
bool operator== (const const_iterator &it) const
 Equality operator.
 
bool operator== (const iterator_type &it) const
 Equality operator.
 
bool operator!= (const const_iterator &it) const
 Difference operator.
 
bool operator!= (const iterator_type &it) const
 Difference operator.
 
iterator_type internal () const
 Retrieves the internal iterator.
 

Detailed Description

template<typename CharT, typename StringT>
class castor::string::utf8::const_iterator< CharT, StringT >

An iterator, to an UTF-8 string.

Member Typedef Documentation

◆ difference_type

template<typename CharT , typename StringT >
using castor::string::utf8::const_iterator< CharT, StringT >::difference_type = String::difference_type

◆ iterator_category

template<typename CharT , typename StringT >
using castor::string::utf8::const_iterator< CharT, StringT >::iterator_category = std::bidirectional_iterator_tag

◆ iterator_type

template<typename CharT , typename StringT >
using castor::string::utf8::const_iterator< CharT, StringT >::iterator_type = typename string_type::const_iterator

◆ pointer

template<typename CharT , typename StringT >
using castor::string::utf8::const_iterator< CharT, StringT >::pointer = const char32_t *

◆ reference

template<typename CharT , typename StringT >
using castor::string::utf8::const_iterator< CharT, StringT >::reference = const char32_t &

◆ string_type

template<typename CharT , typename StringT >
using castor::string::utf8::const_iterator< CharT, StringT >::string_type = StringT

◆ value_type

template<typename CharT , typename StringT >
using castor::string::utf8::const_iterator< CharT, StringT >::value_type = char32_t

Constructor & Destructor Documentation

◆ const_iterator() [1/3]

template<typename CharT , typename StringT >
castor::string::utf8::const_iterator< CharT, StringT >::const_iterator ( const_iterator< CharT, StringT > const & it)

◆ const_iterator() [2/3]

template<typename CharT , typename StringT >
castor::string::utf8::const_iterator< CharT, StringT >::const_iterator ( const_iterator< CharT, StringT > && it)
noexcept

◆ ~const_iterator()

template<typename CharT , typename StringT >
castor::string::utf8::const_iterator< CharT, StringT >::~const_iterator ( )
defaultnoexcept

◆ const_iterator() [3/3]

template<typename CharT , typename StringT >
castor::string::utf8::const_iterator< CharT, StringT >::const_iterator ( iterator_type const & it)
explicit

Constructor.

Parameters
[in]itThe string iterator.

Member Function Documentation

◆ internal()

template<typename CharT , typename StringT >
iterator_type castor::string::utf8::const_iterator< CharT, StringT >::internal ( ) const

Retrieves the internal iterator.

◆ operator!=() [1/2]

template<typename CharT , typename StringT >
bool castor::string::utf8::const_iterator< CharT, StringT >::operator!= ( const const_iterator< CharT, StringT > & it) const

Difference operator.

◆ operator!=() [2/2]

template<typename CharT , typename StringT >
bool castor::string::utf8::const_iterator< CharT, StringT >::operator!= ( const iterator_type & it) const

Difference operator.

◆ operator*()

template<typename CharT , typename StringT >
char32_t castor::string::utf8::const_iterator< CharT, StringT >::operator* ( ) const

Access to the current codepoint value.

Returns
The current codepoint value.

◆ operator++() [1/2]

template<typename CharT , typename StringT >
const_iterator & castor::string::utf8::const_iterator< CharT, StringT >::operator++ ( )

Pre-increment operator.

Returns
A reference to this object.

Opérateur de pré-increment.

Returns
Une référence sur cet objet.

◆ operator++() [2/2]

template<typename CharT , typename StringT >
const_iterator castor::string::utf8::const_iterator< CharT, StringT >::operator++ ( int )

Post-increment operator.

Returns
A copy of this iterator, before increment.

◆ operator+=()

template<typename CharT , typename StringT >
const_iterator & castor::string::utf8::const_iterator< CharT, StringT >::operator+= ( size_t offset)

Assigment addition operator.

Parameters
[in]offsetThe offset to add.
Returns
A reference to this object.

◆ operator--() [1/2]

template<typename CharT , typename StringT >
const_iterator & castor::string::utf8::const_iterator< CharT, StringT >::operator-- ( )

Pre-decrement operator.

Returns
A reference to this object.

◆ operator--() [2/2]

template<typename CharT , typename StringT >
const_iterator castor::string::utf8::const_iterator< CharT, StringT >::operator-- ( int )

Post-decrement operator.

Returns
A copy of this iterator, before decrement.

◆ operator-=()

template<typename CharT , typename StringT >
const_iterator & castor::string::utf8::const_iterator< CharT, StringT >::operator-= ( size_t offset)

Assignment subtraction operator.

Parameters
[in]offsetThe offset to subtract.
Returns
A reference to this object.

◆ operator=() [1/3]

template<typename CharT , typename StringT >
const_iterator & castor::string::utf8::const_iterator< CharT, StringT >::operator= ( const_iterator< CharT, StringT > && it)
noexcept

◆ operator=() [2/3]

template<typename CharT , typename StringT >
const_iterator & castor::string::utf8::const_iterator< CharT, StringT >::operator= ( const_iterator< CharT, StringT > const & it)

◆ operator=() [3/3]

template<typename CharT , typename StringT >
const_iterator & castor::string::utf8::const_iterator< CharT, StringT >::operator= ( iterator_type const & it)

Assignment operator.

Parameters
[in]itThe string iterator.
Returns
A reference to this object.

◆ operator==() [1/2]

template<typename CharT , typename StringT >
bool castor::string::utf8::const_iterator< CharT, StringT >::operator== ( const const_iterator< CharT, StringT > & it) const

Equality operator.

◆ operator==() [2/2]

template<typename CharT , typename StringT >
bool castor::string::utf8::const_iterator< CharT, StringT >::operator== ( const iterator_type & it) const

Equality operator.


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