Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::data::GenericStringIterator< UTF8Char > Class Template Reference

A class that iterates over UTF-8 encoded character strings. More...

#include <omStringIterator.h>

Public Member Functions

 GenericStringIterator (const UTF8Char *string)
 Create a string iterator that iterates over the specified NULL-terminated string. More...
 
 GenericStringIterator (const UTF8Char *string, Size length)
 Create a string iterator that iterates over the specified string. More...
 
 GenericStringIterator (const GenericString< UTF8Char > &string)
 Create a string iterator that iterates over the specified string object. More...
 
void operator++ ()
 Increment the iterator to the next character in the string. More...
 
void operator++ (int)
 Increment the iterator to the next character in the string. More...
 
 operator Bool () const
 Return whether or not the end of the string has been reached. More...
 
Index getIndex () const
 Return the current code point index within the string being iterated over. More...
 
Index getCharacterIndex () const
 Return the index of the next character in the string. More...
 
UTF32Char operator* () const
 Return the current character of the iterator. More...
 
 operator const UTF8Char * () const
 Return a pointer to the current character of the iterator. More...
 
void reset ()
 Reset the iterator to the first character in the string it is iterating over. More...
 

Detailed Description

template<>
class om::data::GenericStringIterator< UTF8Char >

A class that iterates over UTF-8 encoded character strings.

Constructor & Destructor Documentation

Create a string iterator that iterates over the specified NULL-terminated string.

om::data::GenericStringIterator< UTF8Char >::GenericStringIterator ( const UTF8Char string,
Size  length 
)
inline

Create a string iterator that iterates over the specified string.

Create a string iterator that iterates over the specified string object.

Member Function Documentation

void om::data::GenericStringIterator< UTF8Char >::operator++ ( )
inline

Increment the iterator to the next character in the string.

void om::data::GenericStringIterator< UTF8Char >::operator++ ( int  )
inline

Increment the iterator to the next character in the string.

om::data::GenericStringIterator< UTF8Char >::operator Bool ( ) const
inline

Return whether or not the end of the string has been reached.

Index om::data::GenericStringIterator< UTF8Char >::getIndex ( ) const
inline

Return the current code point index within the string being iterated over.

Index om::data::GenericStringIterator< UTF8Char >::getCharacterIndex ( ) const
inline

Return the index of the next character in the string.

This is not the same as the code point index because there may be characters which use more than one code point in their representation.

UTF32Char om::data::GenericStringIterator< UTF8Char >::operator* ( ) const
inline

Return the current character of the iterator.

om::data::GenericStringIterator< UTF8Char >::operator const UTF8Char * ( ) const
inline

Return a pointer to the current character of the iterator.

void om::data::GenericStringIterator< UTF8Char >::reset ( )
inline

Reset the iterator to the first character in the string it is iterating over.


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