Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <stringpool.h>
Link against: bafl.lib

Class RStringPool

class RStringPool;

Description

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.

Members

Defined in RStringPool:


Construction and destruction


RStringPool()

inline RStringPool();

Description

Default constructor.

[Top]


Member functions


OpenL()

IMPORT_C void OpenL();

Description

Creates an initialised string pool with no pre-loaded string tables.

Leave codes

KErrNoMemory

Not enough memory to open the pool


OpenL(const TStringTable &)

IMPORT_C void OpenL(const TStringTable &aTable);

Description

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

Parameters

const TStringTable &aTable

The pre-loaded string table.

Leave codes

KErrNoMemory

Not enough memory to open the pool


OpenL(const TStringTable &,MStringPoolCloseCallBack &)

IMPORT_C void OpenL(const TStringTable &aTable, MStringPoolCloseCallBack &aCallBack);

Description

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

Parameters

const TStringTable &aTable

The pre-loaded string table.

MStringPoolCloseCallBack &aCallBack

Callback interface that is called when the string pool closes

Leave codes

KErrNoMemory

Not enough memory to open the pool


Close()

IMPORT_C void Close();

Description

Closes the string pool table.

This invalidates all other handles to the table.


OpenFStringL(const TDesC8 &)const

IMPORT_C RStringF OpenFStringL(const TDesC8 &aString) const;

Description

Creates an RStringF using the current string pool.

The string is opened as case-insensitive.

Parameters

const TDesC8 &aString

The value of the string.

Return value

RStringF

Initialised RStringF object

Leave codes

KErrNoMemory

Not enough memory to open the string


OpenStringL(const TDesC8 &)const

IMPORT_C RString OpenStringL(const TDesC8 &aString) const;

Description

Creates an RString using the current string pool.

The string is opened as case-sensitive.

Parameters

const TDesC8 &aString

The value of the string.

Return value

RString

Initialised RString object

Leave codes

KErrNoMemory

Not enough memory to open the string


String(RStringToken)const

IMPORT_C RString String(RStringToken aString) const;

Description

Creates an RString from the supplied RStringToken.

Parameters

RStringToken aString

The string token

Return value

RString

Initialised RString object


String(TInt,const TStringTable &)const

IMPORT_C RString String(TInt aIndex, const TStringTable &aTable) const;

Description

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

TInt aIndex

The string table enumeration value

const TStringTable &aTable

The string table from which to read the string

Return value

RString

Initialised RString object

Panic codes

EStringTableNotFound

If the table supplied is not found. This panic is raised in debug builds only, in release mode the behaviour is undefined


StringF(RStringTokenF)const

IMPORT_C RStringF StringF(RStringTokenF aString) const;

Description

Creates a RStringF from the supplied RStringToken.

Parameters

RStringTokenF aString

The value of the string

Return value

RStringF

Initialised RStringF object


StringF(TInt,const TStringTable &)const

IMPORT_C RStringF StringF(TInt aIndex, const TStringTable &aTable) const;

Description

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

TInt aIndex

The string table enumeration value

const TStringTable &aTable

The string table from which to read the string

Return value

RStringF

Initialised RStringF object

Panic codes

EStringTableNotFound

If the table supplied is not found. This panic is raised in debug builds only, in release mode the behaviour is undefined