TUtf32Iterator Class Reference
Constructor & Destructor Documentation
TUtf32Iterator(const TText16 *, const TText16 *, TInt)
Construct iterator given UTF16 encoded byte array.
-
panic
-
EGdiPanic_InvalidInputParam Raised when array start if passed the array end.
Parameters
const
TText16
* aStart
|
Start address of the array.
|
const
TText16
* aEnd
|
Address of the byte just beyond the end of the array.
|
TInt
aOffset = 0
|
Optional UTF16 offset into the array to initialise the current position to.
|
Member Functions Documentation
AtEnd()
TBool
|
AtEnd
|
(
|
)
|
const [inline]
|
BeforeStart()
TBool
|
BeforeStart
|
(
|
)
|
const [inline]
|
CurrentPosition()
const
TText16
*
|
CurrentPosition
|
(
|
)
|
const
|
Get()
TChar
|
Get
|
(
|
)
|
const [inline]
|
Get(TInt)
Returns the UTF32 char value at the offset specified. 0xFFFF may be returned for unpaired surrogate and noncharacters. Does not change the current position.
-
panic
-
EGdiPanic_OutOfText Raised when offset found to be outside the bounds of the original text array.
Parameters
TInt
offset
|
UTF16 offset from current iterator position to get UTF32 char form.
|
GetThenNext()
Return the UTF32 value at the current position.
-
panic
-
EGdiPanic_EndOfText Raised when current iterator position is not valid.
GetThenPrev()
Return the UTF32 value at the current position.
-
panic
-
EGdiPanic_EndOfText Raised when current iterator position is not valid.
LengthToEnd()
TInt
|
LengthToEnd
|
(
|
)
|
const
|
Returns the number of remaining TText16 codes still ahead of the iterator.
LengthToStart()
TInt
|
LengthToStart
|
(
|
)
|
const
|
Returns the number of TText16 codes between the start point and its current position.
Next()
Moves the iterator forward to the next valid UTF32 character value.
-
panic
-
EGdiPanic_OutOfText Raised when there is no next position to move to.
Prev()
Moves the iterator backwards to the next valid UTF32 character value.
-
panic
-
EGdiPanic_OutOfText Raised when there is no next position to move to.
SetCurrentPosition(const TText16 *)
void
|
SetCurrentPosition
|
(
|
const
TText16
*
|
|
)
|
|
SetPos(TInt)
void
|
SetPos
|
(
|
TInt
|
aOffset
|
)
|
|
Moves the iterator to the position specified by array start+offset.
-
panic
-
EGdiPanic_OutOfText Raised when there is no next position to move to.
Parameters
TInt
aOffset
|
UTF16 offset into the array to set the current position to.
|
UTF16ToTChar(const TText16 *)
This routine takes an encoded UTF16 byte array and decodes the first character at the start of the array and returns it as a
TChar
. If the char is "not a char" character 0xFFFF results.
Parameters
const
TText16
* a
|
UTF16 byte array to be decoded.
|
Member Data Documentation
TChar
iChar
UTF32 value of the character at the current iterator position
const TText16 * iCurrent
Address of current position in array
const TText16 * iEnd
Address of the first entry past the end of the array
const TText16 * iStart
Start address of the UTF16 array
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.