RStringBase Class Reference

#include <stringpool.h>

class RStringBase
Protected Attributes
RStringPool iPool
TUint32 iVal
Public Member Functions
RStringBase()
IMPORT_C voidClose()
IMPORT_C RStringBaseCopy()
IMPORT_C const TDesC8 &DesC()
IMPORT_C TIntIndex(const TStringTable &)
IMPORT_C const TStringTable *OriginalTableRef()
RStringPool Pool()
operator RStringTokenBase()

Detailed Description

Base class for classes that represent a string in a string pool.

There are sub-classes for folded and non-folded strings. Use this class when you want to receive a string, but have no intention of comparing it with anything.

See also: RStringPool

Member Attribute Documentation

iPool

RStringPool iPool[protected]

iVal

TUint32 iVal[protected]

Constructor & Destructor Documentation

RStringBase ( )

RStringBase()[inline]

Default constructor.

Member Function Documentation

Close ( )

IMPORT_C voidClose()

Closes a string.

You must close every string you open. In other words, every call to RStringBase::Copy(), RStringPool::OpenStringL() and RStringPool::OpenFStringL() must be matched by a close.

Strings created through RStringPool::String() or RStringPool::StringF() with an integer argument need not be closed (but closing is harmless).

Strings created through RStringPool::String() or RStringPool::StringF() with a StringToken or StringTokenF argument must not be closed, as they're just changing the external representation.

Copy ( )

IMPORT_C RStringBaseCopy()

Copies a string.

Both the original and the copy string must be separately closed.

Returns: The string base.

DesC ( )

IMPORT_C const TDesC8 &DesC()const

Returns the content of the string Gets the content of the string.

Returns: Descriptor containing the content of the string.

Index ( const TStringTable & )

IMPORT_C TIntIndex(const TStringTable &aTable)const

Gets the enumeration value corresponding to this string.

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

Returns: The string's enumeration value, or -1 if there is no such value

OriginalTableRef ( )

IMPORT_C const TStringTable *OriginalTableRef()const

Gets the table (if any) that first added the current string to the pool.

Note there multiple tables can contain the same string.

Returns: The table or NULL if the string was created dynamically (not from a table)

Pool ( )

RStringPool Pool()const [inline]

Gets the string pool.

Returns: The string pool.

operator RStringTokenBase ( )

operator RStringTokenBase()const [inline]

Returns a compact string equivalent to the string