decUTF8Decoder Class Reference

UTF8 Decoder. More...

#include <decUTF8Decoder.h>

List of all members.

Public Member Functions

Constructors and Destructors
 decUTF8Decoder ()
 Creates a new utf8 decoder which is initially empty.
 ~decUTF8Decoder ()
 Frees the unicode string.
Accessors and Mutators
const char * GetString () const
 Retrieves the string in use.
int GetPosition () const
 Retrieves the position in the string.
int GetLength () const
 Retrieves the length of the string.
bool HasReachedEnd () const
 Determines if the end of the string has been reached.
void SetString (const char *string)
 Sets the encoder to use the given string and sets the position.
void SetPosition (int position)
 Sets the position.
int DecodeNextCharacter ()
 Decodes the next unicode character from the string.

Detailed Description

UTF8 Decoder.

Utility class for decoding a utf8 encoded character stream. Works with simply a pointer to the character data so no copying is required.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

decUTF8Decoder::decUTF8Decoder (  )

Creates a new utf8 decoder which is initially empty.

decUTF8Decoder::~decUTF8Decoder (  )

Frees the unicode string.


Member Function Documentation

int decUTF8Decoder::DecodeNextCharacter (  )

Decodes the next unicode character from the string.

If the string end has been reached or the encoded character is invalid -1 is returned. Otherwise the unicode value is of the character is returned.

int decUTF8Decoder::GetLength (  ) const [inline]

Retrieves the length of the string.

int decUTF8Decoder::GetPosition (  ) const [inline]

Retrieves the position in the string.

const char* decUTF8Decoder::GetString (  ) const [inline]

Retrieves the string in use.

bool decUTF8Decoder::HasReachedEnd (  ) const

Determines if the end of the string has been reached.

void decUTF8Decoder::SetPosition ( int  position )

Sets the position.

void decUTF8Decoder::SetString ( const char *  string )

Sets the encoder to use the given string and sets the position.


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