Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: S32UCMP.H
Link against: estor.lib

Class TUnicodeExpander

class TUnicodeExpander : public TUnicodeCompressionState;

Description

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.

Derivation

Members

Defined in TUnicodeExpander:
ExpandL(), ExpandL(), ExpandedSizeL(), ExpandedSizeL(), FlushL(), TUnicodeExpander()

Inherited from TUnicodeCompressionState:
EDynamicWindows, ENotUnicode, EOutputBufferOverflow, ESpecialBases, EStaticWindows, EUnhandledByte, TPanic, anonymous, iActiveWindowBase, iCompressedBytes, iDynamicWindow, iDynamicWindowDefault, iMaxCompressedBytes, iMaxUnicodeWords, iSpecialBase, iStaticWindow, iUnicodeMode, iUnicodeWords


Construction and destruction


TUnicodeExpander()

IMPORT_C TUnicodeExpander();

Description

[Top]


Member functions


ExpandL()

IMPORT_C void ExpandL(MUnicodeSink &aOutput, RReadStream &aInput, TInt aMaxOutputWords=KMaxTInt, TInt aMaxInputBytes=KMaxTInt, TInt *aOutputWords=0,TInt *aInputBytes=0);

Description

Parameters

MUnicodeSink &aOutput

RReadStream &aInput

TInt aMaxOutputWords

TInt aMaxInputBytes

TInt *aOutputWords

TInt *aInputBytes


ExpandL()

IMPORT_C void ExpandL(MUnicodeSink &aOutput, const TUint8 *aInput, TInt aMaxOutputWords=KMaxTInt, TInt aMaxInputBytes=KMaxTInt, TInt *aOutputWords=0,TInt *aInputBytes=0);

Description

Parameters

MUnicodeSink &aOutput

const TUint8 *aInput

TInt aMaxOutputWords

TInt aMaxInputBytes

TInt *aOutputWords

TInt *aInputBytes


FlushL()

IMPORT_C TInt FlushL(MUnicodeSink &aOutput, TInt aMaxOutputWords, TInt &aOutputWords);

Description

Parameters

MUnicodeSink &aOutput

TInt aMaxOutputWords

TInt &aOutputWords

Return value

TInt


ExpandedSizeL()

static IMPORT_C TInt ExpandedSizeL(RReadStream &aInput, TInt aInputBytes);

Description

Parameters

RReadStream &aInput

TInt aInputBytes

Return value

TInt


ExpandedSizeL()

static IMPORT_C TInt ExpandedSizeL(const TUint8 *aInput, TInt aInputBytes);

Description

Parameters

const TUint8 *aInput

TInt aInputBytes

Return value

TInt