Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <S32STD.H>
Link against: estor.lib

Class CStreamDictionary

class CStreamDictionary : public CBase;

Description

Maintains two way associations between a UID (a TUid type) and a stream id (a TStreamId type) .

Each UID and stream id pair forms an entry in an array. The class provides member functions to manage these entries, for example, to add a new entry or to change the stream id associated with a UID.

Derivation

Members

Defined in CStreamDictionary:

Inherited from CBase:

See also:


Construction and destruction


NewL()

IMPORT_C static CStreamDictionary* NewL();

Description

Allocates, constructs and returns a pointer to a new stream dictionary.

The function leaves if it cannot complete successfully.

Return value

CStreamDictionary *

A pointer to the new stream dictionary object.


NewLC()

IMPORT_C static CStreamDictionary* NewLC();

Description

Allocates, constructs and returns a pointer to a new stream dictionary, putting the pointer onto the cleanup stack.

Putting the pointer onto the cleanup stack allows the object and allocated resources to be cleaned up if a subsequent leave occurs.

The function leaves if it cannot complete successfully.

Return value

CStreamDictionary *

A pointer to the new stream dictionary object.


CStreamDictionary()

IMPORT_C CStreamDictionary();

Description


~CStreamDictionary()

IMPORT_C ~CStreamDictionary();

Description

Frees resources owned by the object, prior to its destruction.

[Top]


Member functions


AssignL(TUid,TStreamId)

IMPORT_C void AssignL(TUid aUid, TStreamId anId);

Description

Creates or changes an association between a UID and a stream id.

If the stream dictionary already contains an entry with the same UID as aUid, then the associated stream id in that entry is replaced by anId.

If anId has the value KNullStreamId, then the function attempts to remove the entry whose unique identifier matches aUid.

Parameters

TUid aUid

The UID

TStreamId anId

The stream id.

See also:


Remove(TUid)

IMPORT_C void Remove(TUid aUid);

Description

Removes an association from the stream dictionary.

The function searches the stream dictionary for an entry whose UID matches aUid. If a match is found, the entry is removed. If no match is found, the stream dictionary remains unchanged.

Parameters

TUid aUid

The UID whose matching entry is to be removed from the stream dictionary.


At(TUid)const

IMPORT_C TStreamId At(TUid aUid) const;

Description

Returns the stream id associated with the specified UID.

Parameters

TUid aUid

The UID whose associated stream id is to be returned.

Return value

TStreamId

The stream id associated with the specified KNullStreamId, if no entry in the stream dictionary contains the specified UID.


IsNull()const

IMPORT_C TBool IsNull() const;

Description

Tests whether the stream dictionary is empty.

Return value

TBool

True, if the stream dictionary is empty. False if the stream dictionary contains at least one entry.


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Externalises an object of this class to a write stream.

The presence of this function means that the standard templated operator<<(RWriteStream &,const T &) can be used to externalise objects of this class.

Parameters

RWriteStream &aStream

Stream to which the object should be externalised


InternalizeL(RReadStream &)

IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Internalises an object of this class from a read stream.

The presence of this function means that the standard templated operator>>(RReadStream &,T &) can be used to internalise objects of this class.

Note that this function has assignment semantics. It replaces the old value of the object with a new value read from the read stream.

Parameters

RReadStream &aStream

Stream from which the object should be internalised.