Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

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

Class RStringBase

class RStringBase;

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.

Members

Defined in RStringBase:

See also:


Construction and destruction


RStringBase()

inline RStringBase();

Description

Default constructor.

[Top]


Member functions


Close()

IMPORT_C void Close();

Description

Closes a string.

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

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

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


Copy()

IMPORT_C RStringBase Copy();

Description

Copies a string.

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

Return value

RStringBase

The string base.


DesC()const

IMPORT_C const TDesC8& DesC() const;

Description

Gets the content of the string.

Return value

const TDesC8 &

Descriptor containing the content of the string.


operator RStringTokenBase()const

inline operator RStringTokenBase() const;

Description

Returns a compact string equivalent to the string

Return value


Index(const TStringTable &)const

IMPORT_C TInt Index(const TStringTable &aTable) const;

Description

Gets the enumeration value corresponding to this string.

Parameters

const TStringTable &aTable

String table to look in

Return value

TInt

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

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


OriginalTableRef()const

IMPORT_C const TStringTable* OriginalTableRef() const;

Description

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

Note there multiple tables can contain the same string.

Return value

const TStringTable *

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


Pool()const

inline RStringPool Pool() const;

Description

Gets the string pool.

Return value

RStringPool

The string pool.

[Top]


Member data


iPool

protected: RStringPool iPool;

Description


iVal

protected: TUint32 iVal;

Description