You.i Engine
CYIString::ConstIterator Class Reference

Detailed Description

A bi-directional Iterator type that allow iteration over Unicode characters (rather than bytes). STL-compatible.

All iterators created from a specific string are invalidated when any of the non-const members of that string are called. This includes when non-const members that operate on iterators are called. The iterators are invalidated when their underlying CYIString is deleted.

#include <utility/YiString.h>

Public Types

typedef std::bidirectional_iterator_tag iterator_category
typedef char32_t value_type
typedef ptrdiff_t difference_type
typedef const char32_t * pointer
typedef char32_t reference

Public Member Functions

 ConstIterator ()
 ConstIterator (CYIStringView view, size_t charactersOffset)
 ConstIterator (const ConstIterator &other)
 ConstIterator (const CYIStringView::ConstIterator &other)
 ~ConstIterator ()
ConstIteratoroperator= (const ConstIterator &other)
value_type operator* () const
 operator CYIStringView::ConstIterator () const
bool operator== (const ConstIterator &other) const
bool operator!= (const ConstIterator &other) const
ConstIteratoroperator++ ()
ConstIterator operator++ (int)
ConstIteratoroperator-- ()
ConstIterator operator-- (int)
const char * GetData () const
ConstReverseIterator Reverse () const


class CYIString

Member Typedef Documentation

◆ difference_type

◆ iterator_category

typedef std::bidirectional_iterator_tag CYIString::ConstIterator::iterator_category

◆ pointer

typedef const char32_t* CYIString::ConstIterator::pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ ConstIterator() [1/4]

CYIString::ConstIterator::ConstIterator ( )

◆ ConstIterator() [2/4]

CYIString::ConstIterator::ConstIterator ( CYIStringView  view,
size_t  charactersOffset 

◆ ConstIterator() [3/4]

CYIString::ConstIterator::ConstIterator ( const ConstIterator other)

◆ ConstIterator() [4/4]

CYIString::ConstIterator::ConstIterator ( const CYIStringView::ConstIterator other)

◆ ~ConstIterator()

CYIString::ConstIterator::~ConstIterator ( )

Member Function Documentation

◆ GetData()

const char* CYIString::ConstIterator::GetData ( ) const

Returns the address to the raw UTF-8 data pointed to by this iterator.

◆ operator CYIStringView::ConstIterator()

CYIString::ConstIterator::operator CYIStringView::ConstIterator ( ) const

Implicitely converts this iterator to a string view iterator.

◆ operator!=()

bool CYIString::ConstIterator::operator!= ( const ConstIterator other) const

◆ operator*()

value_type CYIString::ConstIterator::operator* ( ) const

Returns the 32-bit Unicode value pointed to by this iterator. Returns 0 when the 'end' iterator is dereferenced.

◆ operator++() [1/2]

ConstIterator& CYIString::ConstIterator::operator++ ( )

◆ operator++() [2/2]

ConstIterator CYIString::ConstIterator::operator++ ( int  )

◆ operator--() [1/2]

ConstIterator& CYIString::ConstIterator::operator-- ( )

◆ operator--() [2/2]

ConstIterator CYIString::ConstIterator::operator-- ( int  )

◆ operator=()

ConstIterator& CYIString::ConstIterator::operator= ( const ConstIterator other)

◆ operator==()

bool CYIString::ConstIterator::operator== ( const ConstIterator other) const

◆ Reverse()

ConstReverseIterator CYIString::ConstIterator::Reverse ( ) const

Friends And Related Function Documentation

◆ CYIString

friend class CYIString

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