ezEngine  Milestone 7
ezStringReverseIterator< STRING > Struct Template Reference

STL reverse iterator used by all string classes. Iterates over unicode characters. The iterator starts at the last character of the string and ends at the address before the first character of the string. More...

#include <StringIterator.h>

Public Types

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

Public Member Functions

 EZ_DECLARE_POD_TYPE ()
 
EZ_FORCE_INLINE ezStringReverseIterator ()
 Constructs an invalid iterator.
 
EZ_FORCE_INLINE ezStringReverseIterator (const ezStringBase< STRING > &string, bool bIsEnd)
 Constructs either a rbegin or rend iterator for the given string.
 
EZ_FORCE_INLINE bool IsValid () const
 Checks whether this iterator points to a valid element.
 
EZ_FORCE_INLINE ezUInt32 GetCharacter () const
 Returns the currently pointed to character in Utf32 encoding.
 
EZ_FORCE_INLINE const char * GetData () const
 Returns the address the iterator currently points to.
 
EZ_FORCE_INLINE bool operator== (const ezStringReverseIterator &it2) const
 Checks whether the two iterators point to the same element.
 
EZ_FORCE_INLINE bool operator!= (const ezStringReverseIterator &it2) const
 Checks whether the two iterators point to the same element.
 
EZ_FORCE_INLINE ezUInt32 operator* () const
 Returns the currently pointed to character in Utf32 encoding.
 
EZ_FORCE_INLINE const char * operator-> () const
 Returns the address the iterator currently points to.
 
EZ_FORCE_INLINE
ezStringReverseIterator
< STRING > & 
operator++ ()
 Move to the next Utf8 character.
 
EZ_FORCE_INLINE
ezStringReverseIterator
< STRING > & 
operator-- ()
 Move to the previous Utf8 character.
 
EZ_FORCE_INLINE
ezStringReverseIterator
< STRING > 
operator++ (int)
 Move to the next Utf8 character.
 
EZ_FORCE_INLINE
ezStringReverseIterator
< STRING > 
operator-- (int)
 Move to the previous Utf8 character.
 
EZ_FORCE_INLINE void operator+= (difference_type d)
 Advances the iterator forwards by d characters. Does not move it beyond the range's end.
 
EZ_FORCE_INLINE void operator-= (difference_type d)
 Moves the iterator backwards by d characters. Does not move it beyond the range's start.
 
EZ_FORCE_INLINE
ezStringReverseIterator
< STRING > 
operator+ (difference_type d) const
 Returns an iterator that is advanced forwards by d characters.
 
EZ_FORCE_INLINE
ezStringReverseIterator
< STRING > 
operator- (difference_type d) const
 Returns an iterator that is advanced backwards by d characters.
 
EZ_FORCE_INLINE void SetCurrentPosition (const char *szCurPos)
 Allows to set the 'current' iteration position to a different value. More...
 

Protected Attributes

const ezStringBase< STRING > * m_String
 
const char * m_pElement
 

Detailed Description

template<class STRING>
struct ezStringReverseIterator< STRING >

STL reverse iterator used by all string classes. Iterates over unicode characters. The iterator starts at the last character of the string and ends at the address before the first character of the string.

Member Function Documentation

template<class STRING>
EZ_FORCE_INLINE void ezStringReverseIterator< STRING >::SetCurrentPosition ( const char *  szCurPos)
inline

Allows to set the 'current' iteration position to a different value.

Must be between the iterators start and end range.


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