class TUnicodeExpander : public TUnicodeCompressionState |
A class to hold functions to expand text using the Standard Compression Scheme for Unicode.
A note on error handling and leaving.
Although all the public functions except the constructor can leave, it is possible to guarantee success: that is, guarantee that a call will not leave, and that expansion will be completed. To do this, (i) supply a MUnicodeSink object with a non-leaving WriteUnicodeValueL function, such as a TMemoryUnicodeSink; (ii) read input from a RReadStream with a non-leaving ReadL function; (iii) supply a big enough buffer to write the ouput; you can find out how big by calling ExpandedSizeL, using methods (i) and (ii) to guarantee success.
This guarantee of success is particularly useful when expanding from one memory buffer to another.
Public Member Functions | |
---|---|
TUnicodeExpander() | |
IMPORT_C void | ExpandL(MUnicodeSink &, RReadStream &, TInt, TInt, TInt *, TInt *) |
IMPORT_C void | ExpandL(MUnicodeSink &, const TUint8 *, TInt, TInt, TInt *, TInt *) |
IMPORT_C TInt | ExpandedSizeL(RReadStream &, TInt) |
IMPORT_C TInt | ExpandedSizeL(const TUint8 *, TInt) |
IMPORT_C TInt | FlushL(MUnicodeSink &, TInt, TInt &) |
Private Member Functions | |
---|---|
TBool | DefineExpansionWindowL() |
TBool | DefineWindowL(TInt) |
void | DoExpandL(MUnicodeSink *, RReadStream *, const TUint8 *, TInt, TInt, TInt *, TInt *) |
void | FlushOutputBufferL() |
void | HandleByteL() |
TBool | HandleSByteL(TUint8) |
TBool | HandleUByteL(TUint8) |
TBool | QuoteUnicodeL() |
TBool | ReadByteL(TUint8 &) |
void | WriteChar(TText) |
void | WriteChar32(TUint) |
Private Member Enumerations | |
---|---|
enum | anonymous { EMaxInputBufferSize = 3, EMaxOutputBufferSize = 2 } |
Inherited Enumerations | |
---|---|
TUnicodeCompressionState:@47 | |
TUnicodeCompressionState:TPanic |
void | DoExpandL | ( | MUnicodeSink * | aOutput, |
RReadStream * | aInputStream, | |||
const TUint8 * | aInputPointer, | |||
TInt | aMaxOutputWords, | |||
TInt | aMaxInputBytes, | |||
TInt * | aOutputWords, | |||
TInt * | aInputBytes | |||
) | [private] |
MUnicodeSink * aOutput | |
RReadStream * aInputStream | |
const TUint8 * aInputPointer | |
TInt aMaxOutputWords | |
TInt aMaxInputBytes | |
TInt * aOutputWords | |
TInt * aInputBytes |
IMPORT_C void | ExpandL | ( | MUnicodeSink & | aOutput, |
RReadStream & | aInput, | |||
TInt | aMaxOutputWords = KMaxTInt , | |||
TInt | aMaxInputBytes = KMaxTInt , | |||
TInt * | aOutputWords = NULL, | |||
TInt * | aInputBytes = NULL | |||
) |
MUnicodeSink & aOutput | |
RReadStream & aInput | |
TInt aMaxOutputWords = KMaxTInt | |
TInt aMaxInputBytes = KMaxTInt | |
TInt * aOutputWords = NULL | |
TInt * aInputBytes = NULL |
IMPORT_C void | ExpandL | ( | MUnicodeSink & | aOutput, |
const TUint8 * | aInput, | |||
TInt | aMaxOutputWords = KMaxTInt , | |||
TInt | aMaxInputBytes = KMaxTInt , | |||
TInt * | aOutputWords = NULL, | |||
TInt * | aInputBytes = NULL | |||
) |
IMPORT_C TInt | ExpandedSizeL | ( | RReadStream & | aInput, |
TInt | aInputBytes | |||
) | [static] |
RReadStream & aInput | |
TInt aInputBytes |
IMPORT_C TInt | ExpandedSizeL | ( | const TUint8 * | aInput, |
TInt | aInputBytes | |||
) | [static] |
IMPORT_C TInt | FlushL | ( | MUnicodeSink & | aOutput, |
TInt | aMaxOutputWords, | |||
TInt & | aOutputWords | |||
) |
MUnicodeSink & aOutput | |
TInt aMaxOutputWords | |
TInt & aOutputWords |
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.