Iterator to iterate through a UTF-16 string. More...
#include <irrUString.h>
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... | |
_Iter & | operator++ () |
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... | |
_Iter & | operator-- () |
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... | |
_Iter & | operator+= (const difference_type v) |
Advance a specified number of full characters in the string. More... | |
_Iter & | operator-= (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 |
Iterator to iterate through a UTF-16 string.
typedef std::iterator<std::bidirectional_iterator_tag, access, ptrdiff_t, const access, const access> irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_Base |
typedef _ustring16_const_iterator irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_Iter |
typedef const access irr::core::ustring16< TAlloc >::_ustring16_const_iterator::const_pointer |
typedef const access irr::core::ustring16< TAlloc >::_ustring16_const_iterator::const_reference |
typedef _Base::difference_type irr::core::ustring16< TAlloc >::_ustring16_const_iterator::difference_type |
typedef _Base::difference_type irr::core::ustring16< TAlloc >::_ustring16_const_iterator::distance_type |
typedef _Base::pointer irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pointer |
typedef const_reference irr::core::ustring16< TAlloc >::_ustring16_const_iterator::reference |
typedef _Base::value_type irr::core::ustring16< TAlloc >::_ustring16_const_iterator::value_type |
|
inline |
Constructors.
|
inline |
|
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.
|
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.
|
inline |
Is the iterator at the start of the string?
References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos.
|
inline |
Returns the iterator's position.
References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos.
|
inline |
Test for unequalness.
References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, and irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref.
|
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.
|
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->().
|
inline |
Return a new iterator that is a variable number of full characters forward from the current position.
|
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.
|
inline |
Switch to the next full character in the string, returning the previous position.
|
inline |
Advance a specified number of full characters in the string.
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-=().
|
inline |
Returns the distance between two iterators.
References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, and irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref.
|
inline |
Return a new iterator that is a variable number of full characters backward from the current position.
|
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.
|
inline |
Switch to the previous full character in the string, returning the previous position.
|
inline |
Go back a specified number of full characters in the string.
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+=().
|
inline |
Accesses the full character at the iterator's position.
References 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*().
|
inline |
Test for equalness.
References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos, and irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref.
|
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().
|
inline |
Moves the iterator to the start of the string.
References irr::core::ustring16< TAlloc >::_ustring16_const_iterator::pos.
|
protected |
Referenced by irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_ustring16_const_iterator(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::atEnd(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::atStart(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::getPos(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator!=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator*(), irr::core::ustring16< TAlloc >::_ustring16_iterator::operator*(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator++(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator+=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator--(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator==(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::toEnd(), and irr::core::ustring16< TAlloc >::_ustring16_const_iterator::toStart().
|
protected |
Referenced by irr::core::ustring16< TAlloc >::_ustring16_const_iterator::_ustring16_const_iterator(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::atEnd(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator!=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator*(), irr::core::ustring16< TAlloc >::_ustring16_iterator::operator*(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator++(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator+=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator--(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator-=(), irr::core::ustring16< TAlloc >::_ustring16_const_iterator::operator==(), and irr::core::ustring16< TAlloc >::_ustring16_const_iterator::toEnd().