Minetest  5.4.0
irr::core::ustring16< TAlloc >::_ustring16_const_iterator Class Reference

Iterator to iterate through a UTF-16 string. More...

#include <irrUString.h>

+ Inheritance diagram for irr::core::ustring16< TAlloc >::_ustring16_const_iterator:
+ Collaboration diagram for irr::core::ustring16< TAlloc >::_ustring16_const_iterator:

Public Types

typedef _ustring16_const_iterator _Iter
 
typedef std::iterator< std::bidirectional_iterator_tag, access, ptrdiff_t, const access, const access_Base
 
typedef const access const_pointer
 
typedef const access const_reference
 
typedef _Base::value_type value_type
 
typedef _Base::difference_type difference_type
 
typedef _Base::difference_type distance_type
 
typedef _Base::pointer pointer
 
typedef const_reference reference
 

Public Member Functions

 _ustring16_const_iterator (const _Iter &i)
 Constructors. More...
 
 _ustring16_const_iterator (const ustring16< TAlloc > &s)
 
 _ustring16_const_iterator (const ustring16< TAlloc > &s, const u32 p)
 
bool operator== (const _Iter &iter) const
 Test for equalness. More...
 
bool operator!= (const _Iter &iter) const
 Test for unequalness. More...
 
_Iteroperator++ ()
 Switch to the next full character in the string. More...
 
_Iter operator++ (int)
 Switch to the next full character in the string, returning the previous position. More...
 
_Iteroperator-- ()
 Switch to the previous full character in the string. More...
 
_Iter operator-- (int)
 Switch to the previous full character in the string, returning the previous position. More...
 
_Iteroperator+= (const difference_type v)
 Advance a specified number of full characters in the string. More...
 
_Iteroperator-= (const difference_type v)
 Go back a specified number of full characters in the string. More...
 
_Iter operator+ (const difference_type v) const
 Return a new iterator that is a variable number of full characters forward from the current position. More...
 
_Iter operator- (const difference_type v) const
 Return a new iterator that is a variable number of full characters backward from the current position. More...
 
difference_type operator- (const _Iter &iter) const
 Returns the distance between two iterators. More...
 
const_reference operator* () const
 Accesses the full character at the iterator's position. More...
 
reference operator* ()
 Accesses the full character at the iterator's position. More...
 
const_pointer operator-> () const
 Accesses the full character at the iterator's position. More...
 
pointer operator-> ()
 Accesses the full character at the iterator's position. More...
 
bool atStart () const
 Is the iterator at the start of the string? More...
 
bool atEnd () const
 Is the iterator at the end of the string? More...
 
void toStart ()
 Moves the iterator to the start of the string. More...
 
void toEnd ()
 Moves the iterator to the end of the string. More...
 
u32 getPos () const
 Returns the iterator's position. More...
 

Protected Attributes

const ustring16< TAlloc > * ref
 
u32 pos
 

Detailed Description

template<typename TAlloc = irrAllocator<uchar16_t>>
class irr::core::ustring16< TAlloc >::_ustring16_const_iterator

Iterator to iterate through a UTF-16 string.

Member Typedef Documentation

◆ _Base

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef std::iterator<std::bidirectional_iterator_tag, access, ptrdiff_t, const access, const access> irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_Base

◆ _Iter

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef _ustring16_const_iterator irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_Iter

◆ const_pointer

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef const access irr::core::ustring16< TAlloc >::_ustring16_const_iterator::const_pointer

◆ const_reference

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef const access irr::core::ustring16< TAlloc >::_ustring16_const_iterator::const_reference

◆ difference_type

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef _Base::difference_type irr::core::ustring16< TAlloc >::_ustring16_const_iterator::difference_type

◆ distance_type

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef _Base::difference_type irr::core::ustring16< TAlloc >::_ustring16_const_iterator::distance_type

◆ pointer

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef _Base::pointer irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pointer

◆ reference

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef const_reference irr::core::ustring16< TAlloc >::_ustring16_const_iterator::reference

◆ value_type

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef _Base::value_type irr::core::ustring16< TAlloc >::_ustring16_const_iterator::value_type

Constructor & Destructor Documentation

◆ _ustring16_const_iterator() [1/3]

template<typename TAlloc = irrAllocator<uchar16_t>>
irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_ustring16_const_iterator ( const _Iter i)
inline

Constructors.

◆ _ustring16_const_iterator() [2/3]

template<typename TAlloc = irrAllocator<uchar16_t>>
irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_ustring16_const_iterator ( const ustring16< TAlloc > &  s)
inline

◆ _ustring16_const_iterator() [3/3]

template<typename TAlloc = irrAllocator<uchar16_t>>
irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_ustring16_const_iterator ( const ustring16< TAlloc > &  s,
const u32  p 
)
inline

References irr::core::ustring16< TAlloc >::c_str(), p(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, irr::core::ustring16< TAlloc >::size_raw(), and UTF16_IS_SURROGATE_HI.

+ Here is the call graph for this function:

Member Function Documentation

◆ atEnd()

template<typename TAlloc = irrAllocator<uchar16_t>>
bool irr::core::ustring16< TAlloc >::_ustring16_const_iterator::atEnd ( ) const
inline

Is the iterator at the end of the string?

References irr::core::ustring16< TAlloc >::c_str(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, irr::core::ustring16< TAlloc >::size_raw(), and UTF16_IS_SURROGATE.

+ Here is the call graph for this function:

◆ atStart()

template<typename TAlloc = irrAllocator<uchar16_t>>
bool irr::core::ustring16< TAlloc >::_ustring16_const_iterator::atStart ( ) const
inline

Is the iterator at the start of the string?

References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos.

◆ getPos()

template<typename TAlloc = irrAllocator<uchar16_t>>
u32 irr::core::ustring16< TAlloc >::_ustring16_const_iterator::getPos ( ) const
inline

Returns the iterator's position.

Returns
The iterator's position.

References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos.

◆ operator!=()

template<typename TAlloc = irrAllocator<uchar16_t>>
bool irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator!= ( const _Iter iter) const
inline

◆ operator*() [1/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
reference irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator* ( )
inline

Accesses the full character at the iterator's position.

References irr::core::ustring16< TAlloc >::c_str(), p(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, irr::core::ustring16< TAlloc >::size_raw(), and UTF16_IS_SURROGATE_LO.

+ Here is the call graph for this function:

◆ operator*() [2/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
const_reference irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator* ( ) const
inline

Accesses the full character at the iterator's position.

References irr::core::ustring16< TAlloc >::c_str(), p(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, irr::core::ustring16< TAlloc >::size_raw(), and UTF16_IS_SURROGATE_LO.

Referenced by irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator->().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator+()

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator+ ( const difference_type  v) const
inline

Return a new iterator that is a variable number of full characters forward from the current position.

◆ operator++() [1/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter& irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator++ ( )
inline

Switch to the next full character in the string.

References irr::core::ustring16< TAlloc >::c_str(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, irr::core::ustring16< TAlloc >::size_raw(), and UTF16_IS_SURROGATE_HI.

+ Here is the call graph for this function:

◆ operator++() [2/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator++ ( int  )
inline

Switch to the next full character in the string, returning the previous position.

◆ operator+=()

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter& irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator+= ( const difference_type  v)
inline

Advance a specified number of full characters in the string.

Returns
Myself.

References irr::core::ustring16< TAlloc >::c_str(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, irr::core::ustring16< TAlloc >::size_raw(), and UTF16_IS_SURROGATE_HI.

Referenced by irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator-() [1/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
difference_type irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator- ( const _Iter iter) const
inline

◆ operator-() [2/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator- ( const difference_type  v) const
inline

Return a new iterator that is a variable number of full characters backward from the current position.

◆ operator--() [1/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter& irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-- ( )
inline

Switch to the previous full character in the string.

References irr::core::ustring16< TAlloc >::c_str(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, and UTF16_IS_SURROGATE_LO.

+ Here is the call graph for this function:

◆ operator--() [2/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-- ( int  )
inline

Switch to the previous full character in the string, returning the previous position.

◆ operator-=()

template<typename TAlloc = irrAllocator<uchar16_t>>
_Iter& irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-= ( const difference_type  v)
inline

Go back a specified number of full characters in the string.

Returns
Myself.

References irr::core::ustring16< TAlloc >::c_str(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator+=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, and UTF16_IS_SURROGATE_LO.

Referenced by irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator+=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator->() [1/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
pointer irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-> ( )
inline

Accesses the full character at the iterator's position.

References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator*().

+ Here is the call graph for this function:

◆ operator->() [2/2]

template<typename TAlloc = irrAllocator<uchar16_t>>
const_pointer irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-> ( ) const
inline

Accesses the full character at the iterator's position.

References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator*().

+ Here is the call graph for this function:

◆ operator==()

template<typename TAlloc = irrAllocator<uchar16_t>>
bool irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator== ( const _Iter iter) const
inline

◆ toEnd()

template<typename TAlloc = irrAllocator<uchar16_t>>
void irr::core::ustring16< TAlloc >::_ustring16_const_iterator::toEnd ( )
inline

Moves the iterator to the end of the string.

References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref, and irr::core::ustring16< TAlloc >::size_raw().

+ Here is the call graph for this function:

◆ toStart()

template<typename TAlloc = irrAllocator<uchar16_t>>
void irr::core::ustring16< TAlloc >::_ustring16_const_iterator::toStart ( )
inline

Moves the iterator to the start of the string.

References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos.

Member Data Documentation

◆ pos

◆ ref


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