arsa  2.7
Public Types | Public Member Functions | Public Attributes | List of all members
irr::core::ustring16< TAlloc >::_ustring16_iterator Class Reference

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

#include <irrUString.h>

Inheritance diagram for irr::core::ustring16< TAlloc >::_ustring16_iterator:
irr::core::ustring16< TAlloc >::_ustring16_const_iterator

Public Types

typedef _ustring16_iterator _Iter
 
typedef _ustring16_const_iterator _Base
 
typedef _Base::const_pointer const_pointer
 
typedef _Base::const_reference const_reference
 
typedef _Base::value_type value_type
 
typedef _Base::difference_type difference_type
 
typedef _Base::distance_type distance_type
 
typedef access pointer
 
typedef access reference
 
- Public Types inherited from irr::core::ustring16< TAlloc >::_ustring16_const_iterator
typedef _ustring16_const_iterator _Iter
 
typedef const access const_pointer
 
typedef const access const_reference
 
typedef access value_type
 
typedef size_t difference_type
 
typedef size_t distance_type
 
typedef const_pointer pointer
 
typedef const_reference reference
 

Public Member Functions

 _ustring16_iterator (const _Iter &i)
 Constructors. More...
 
 _ustring16_iterator (const ustring16< TAlloc > &s)
 
 _ustring16_iterator (const ustring16< TAlloc > &s, const size_t p)
 
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...
 
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...
 
- Public Member Functions inherited from irr::core::ustring16< TAlloc >::_ustring16_const_iterator
 _ustring16_const_iterator (const _Iter &i)
 Constructors. More...
 
 _ustring16_const_iterator (const ustring16< TAlloc > &s)
 
 _ustring16_const_iterator (const ustring16< TAlloc > &s, const size_t 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)
 
_Iteroperator-= (const difference_type v)
 
_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...
 
size_t getPos () const
 

Public Attributes

size_t pos
 
const ustring16< TAlloc > * ref
 

Additional Inherited Members

- Protected Attributes inherited from irr::core::ustring16< TAlloc >::_ustring16_const_iterator
const ustring16< TAlloc > * ref
 
size_t pos
 

Detailed Description

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

Iterator to iterate through a UTF-16 string.

Definition at line 730 of file irrUString.h.

Member Typedef Documentation

◆ _Base

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

Definition at line 734 of file irrUString.h.

◆ _Iter

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

Definition at line 733 of file irrUString.h.

◆ const_pointer

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef _Base::const_pointer irr::core::ustring16< TAlloc >::_ustring16_iterator::const_pointer

Definition at line 735 of file irrUString.h.

◆ const_reference

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef _Base::const_reference irr::core::ustring16< TAlloc >::_ustring16_iterator::const_reference

Definition at line 736 of file irrUString.h.

◆ difference_type

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

Definition at line 739 of file irrUString.h.

◆ distance_type

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

Definition at line 740 of file irrUString.h.

◆ pointer

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef access irr::core::ustring16< TAlloc >::_ustring16_iterator::pointer

Definition at line 741 of file irrUString.h.

◆ reference

template<typename TAlloc = irrAllocator<uchar16_t>>
typedef access irr::core::ustring16< TAlloc >::_ustring16_iterator::reference

Definition at line 742 of file irrUString.h.

◆ value_type

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

Definition at line 738 of file irrUString.h.

Constructor & Destructor Documentation

◆ _ustring16_iterator() [1/3]

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

Constructors.

Definition at line 748 of file irrUString.h.

_ustring16_const_iterator(const _Iter &i)
Constructors.
Definition: irrUString.h:473

◆ _ustring16_iterator() [2/3]

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

Definition at line 749 of file irrUString.h.

_ustring16_const_iterator(const _Iter &i)
Constructors.
Definition: irrUString.h:473
GLdouble s
Definition: SDL_opengl.h:2063

◆ _ustring16_iterator() [3/3]

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

Definition at line 750 of file irrUString.h.

_ustring16_const_iterator(const _Iter &i)
Constructors.
Definition: irrUString.h:473
GLfloat GLfloat p
GLdouble s
Definition: SDL_opengl.h:2063

Member Function Documentation

◆ operator *() [1/2]

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

Accesses the full character at the iterator's position.

Definition at line 753 of file irrUString.h.

754  {
755  if (pos >= ref->size_raw())
756  {
757  const uchar16_t* a = ref->c_str();
758  size_t p = ref->size_raw();
759  if (UTF16_IS_SURROGATE_LO(a[p]))
760  --p;
761  reference ret(ref, p);
762  return ret;
763  }
764  reference ret(ref, pos);
765  return ret;
766  }
u16 uchar16_t
Definition: irrUString.h:86
GLint reference
#define UTF16_IS_SURROGATE_LO(c)
Definition: irrUString.h:73
GLfloat GLfloat p
GLboolean GLboolean GLboolean GLboolean a
GLenum GLint ref

◆ operator *() [2/2]

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

Accesses the full character at the iterator's position.

Definition at line 769 of file irrUString.h.

770  {
771  if (pos >= ref->size_raw())
772  {
773  const uchar16_t* a = ref->c_str();
774  size_t p = ref->size_raw();
775  if (UTF16_IS_SURROGATE_LO(a[p]))
776  --p;
777  reference ret(ref, p);
778  return ret;
779  }
780  reference ret(ref, pos);
781  return ret;
782  }
u16 uchar16_t
Definition: irrUString.h:86
GLint reference
#define UTF16_IS_SURROGATE_LO(c)
Definition: irrUString.h:73
GLfloat GLfloat p
GLboolean GLboolean GLboolean GLboolean a
GLenum GLint ref

◆ operator->() [1/2]

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

Accesses the full character at the iterator's position.

Definition at line 785 of file irrUString.h.

786  {
787  return operator*();
788  }
reference operator *() const
Accesses the full character at the iterator's position.
Definition: irrUString.h:753

◆ operator->() [2/2]

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

Accesses the full character at the iterator's position.

Definition at line 791 of file irrUString.h.

792  {
793  return operator*();
794  }
reference operator *() const
Accesses the full character at the iterator's position.
Definition: irrUString.h:753

Member Data Documentation

◆ pos

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

Definition at line 726 of file irrUString.h.

◆ ref

template<typename TAlloc = irrAllocator<uchar16_t>>
const ustring16<TAlloc>* irr::core::ustring16< TAlloc >::_ustring16_const_iterator::ref

Definition at line 725 of file irrUString.h.


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