|
OpenTop 1.3 | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD |
#include "ot/base/StringIterator.h"
Iterator class that will iterate over each Unicode character contained within a controlled sequence of CharType characters encoded according to the internal OpenTop encoding.
For convenience, de-referencing a StringIterator results in a Character object, from which the Unicode character can be directly obtained.This class implements the required interface for a bidirectional iterator as defined by the C++ Standard Library.
This class enables algorithms from the C++ Standard Library to be used on Unicode strings that have been encoded into the internal OpenTop String encoding.
Constructor/Destructor Summary | |
StringIterator() Default constructor. | |
StringIterator(const CharType* ptr) Creates a StringIterator positioned at the first character of the sequence of CharType characters starting at ptr. |
Method Summary | |
const CharType* |
data() const Returns a pointer to the current position within the CharType sequence. |
StringIterator& |
operator--() Prefix decrement operator. |
StringIterator |
operator--(int ) Postfix decrement operator. |
Character |
operator *() const Dereference operator. |
bool |
operator!=(const StringIterator& rhs) const Inequality operator. |
StringIterator& |
operator++() Prefix increment operator. |
StringIterator |
operator++(int ) Postfix increment operator. |
StringIterator& |
operator=(const CharType* ptr) Assignment operator. |
bool |
operator==(const StringIterator& rhs) const Equality operator. |
Typedefs |
typedef ptrdiff_t difference_type
typedef std::bidirectional_iterator_tag iterator_category
typedef CharType* pointer
typedef Character& reference
typedef Character value_type
Constructor/Destructor Detail |
StringIterator()
StringIterator(const CharType* ptr)
Method Detail |
const CharType* data() const
StringIterator& operator--()
StringIterator operator--(int )
Character operator *() const
bool operator!=(const StringIterator& rhs) const
StringIterator& operator++()
StringIterator operator++(int )
StringIterator& operator=(const CharType* ptr)
bool operator==(const StringIterator& rhs) const
|
OpenTop 1.3 | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD |