RStringPool Class Reference

#include <stringpool.h>

class RStringPool
Public Member Functions
RStringPool()
IMPORT_C voidClose()
IMPORT_C RStringFOpenFStringL(const TDesC8 &)
IMPORT_C voidOpenL()
IMPORT_C voidOpenL(const TStringTable &)
IMPORT_C voidOpenL(const TStringTable &, MStringPoolCloseCallBack &)
IMPORT_C RStringOpenStringL(const TDesC8 &)
IMPORT_C RStringString(RStringToken)
IMPORT_C RStringString(TInt, const TStringTable &)
IMPORT_C RStringFStringF(RStringTokenF)
IMPORT_C RStringFStringF(TInt, const TStringTable &)

Detailed Description

The string pool handle object. A string pool can have several distinct handles associated with it, each associated with a different pre-loaded table. The difference between them is that creating a string from an enum will interpret the enum as an offset into the relevant pre-loaded table String pool handle.

A string pool can have several distinct handles associated with it, each associated with a different pre-loaded table. Creating a string from an enum value interprets the value as an offset into the relevant pre-loaded table.

Constructor & Destructor Documentation

RStringPool ( )

RStringPool()[inline]

Default constructor.

Member Function Documentation

Close ( )

IMPORT_C voidClose()

Closes the string pool table.

This invalidates all other handles to the table.

OpenFStringL ( const TDesC8 & )

IMPORT_C RStringFOpenFStringL(const TDesC8 &aString)const

Creates an RStringF using the current string pool.

The string is opened as case-insensitive.

Parameters
aStringThe value of the string.
Return Value
Initialised RStringF object
Leave Codes
KErrNoMemoryNot enough memory to open the string

OpenL ( )

IMPORT_C voidOpenL()

Implementation of RStringPool class Creates an initialised string pool with no pre-loaded string tables.

Leave Codes
KErrNoMemoryNot enough memory to open the pool

OpenL ( const TStringTable & )

IMPORT_C voidOpenL(const TStringTable &aTable)

Creates an initialised string pool with a pre-loaded string table.

Parameters
aTableThe pre-loaded string table.
Leave Codes
KErrNoMemoryNot enough memory to open the pool

OpenL ( const TStringTable &, MStringPoolCloseCallBack & )

IMPORT_C voidOpenL(const TStringTable &aTable,
MStringPoolCloseCallBack &aCallBack
)

Creates an initialised string pool with a pre-loaded string table, and a string-pool-closing callback.

Parameters
aTableThe pre-loaded string table.
aCallBackCallback interface that is called when the string pool closes
Leave Codes
KErrNoMemoryNot enough memory to open the pool

OpenStringL ( const TDesC8 & )

IMPORT_C RStringOpenStringL(const TDesC8 &aString)const

Creates an RString using the current string pool.

The string is opened as case-sensitive.

Parameters
aStringThe value of the string.
Return Value
Initialised RString object
Leave Codes
KErrNoMemoryNot enough memory to open the string

String ( RStringToken )

IMPORT_C RStringString(RStringTokenaString)const

Creates an RString from the supplied RStringToken.

Parameters
aStringThe string token
Return Value
Initialised RString object

String ( TInt, const TStringTable & )

IMPORT_C RStringString(TIntaIndex,
const TStringTable &aTable
)const

Gets a case-sensitive string specified by a string table enumeration value.

aIndex is interpreted as an offset into the handle's pre-loaded string table.

Parameters
aIndexThe string table enumeration value
aTableThe string table from which to read the string
Return Value
Initialised RString object
Panic Codes
EStringTableNotFoundIf the table supplied is not found. This panic is raised in debug builds only, in release mode the behaviour is undefined

StringF ( RStringTokenF )

IMPORT_C RStringFStringF(RStringTokenFaString)const

Creates a RStringF from the supplied RStringToken.

Parameters
aStringThe value of the string
Return Value
Initialised RStringF object

StringF ( TInt, const TStringTable & )

IMPORT_C RStringFStringF(TIntaIndex,
const TStringTable &aTable
)const

Gets a case-insensitive string specified by a string table enumeration value.

Creates an RStringF from a string table enumeration value.

aIndex is interpreted as an offset into the handle's pre-loaded string table.

Parameters
aIndexThe string table enumeration value
aTableThe string table from which to read the string
Return Value
Initialised RStringF object
Panic Codes
EStringTableNotFoundIf the table supplied is not found. This panic is raised in debug builds only, in release mode the behaviour is undefined