Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: s32stor.h
Link against: estor.lib

Class CDictionaryStore

CDictionaryStore

Support

Supported from 5.0

Description

Dictionary store interface.

This is an abstract class which provides the necessary interface for using concrete dictionary stores.

A dictionary store is a store where a stream is accessed by UID (TUid), rather than directly by stream id (TStreamId).

This type of store contains streams in the usual way but, in addition, the root stream is a stream dictionary. The stream dictionary provides a list of two-way associations between unique identifiers and stream ids.

Note that a dictionary store object does not derive from CStreamStore, but owns a persistent store and a stream dictionary as part of its implementation.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CDictionaryStoreDictionary store interface

Defined in CDictionaryStore:
Commit(), CommitL(), IsNullL(), IsPresentL(), Remove(), RemoveL(), Revert(), RevertL(), ~CDictionaryStore()

Inherited from CBase:
operator new()

See also:


Construction and destruction


~CDictionaryStore()

~CDictionaryStore();

Description

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

[Top]


Stream management


IsNullL()

TBool IsNullL() const;

Description

Tests whether the dictionary store’s stream dictionary is empty.

Return value

TBool

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

Leave codes

 

The function restores the stream dictionary, if this has not already been done, and may fail because of lack of memory.

See also:


IsPresentL()

TBool IsPresentL(TUid aUid) const;

Description

Tests whether the specified UID has an associated stream within this dictionary store.

Parameters

TUid aUid

The UID.

Return value

TBool

True, if there is a stream associated with the specified UID in the dictionary store; false otherwise.

Leave codes

 

The function restores the stream dictionary, if this has not already been done, and may fail because of lack of memory.

See also:


Remove()

void Remove(TUid aUid);

Description

Removes the stream associated with the specified UID from the dictionary store.

If there is no stream associated with the specified UID, then the dictionary store remains unchanged.

The function cannot leave; it returns whether or not it is succesful.

Parameters

TUid aUid

The UID whose associated stream is to be removed from the dictionary store.


RemoveL()

void RemoveL(TUid aUid);

Description

Removes the stream associated with the specified UID from the dictionary store and leaves if unsuccessful.

If there is no stream associated with the specified UID, then the dictionary store remains unchanged.

Parameters

TUid aUid

The UID whose associated stream is to be removed from the dictionary store.

[Top]


Committing changes to the dictionary store


Commit()

TInt Commit();

Description

Commits changes.

It establishes a new commit point and then compacts the dictionary store. Typically, this is done after changes to new or existing streams are complete and the streams themselves have been committed.

Establishing a new commit point makes changes to the store permanent. Until such changes are committed, they can be rolled back, effectively causing the store to revert back to its state before the changes were made.

This ensures that persistent data moves from one consistent state to another and guarantees the integrity of persistent store data in the event of failures. In particular, if a process terminates or a media failure occurs, the store reverts automatically to its state at the last successful commit point.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


CommitL()

void CommitL();

Description

Commits changes and leaves if unsuccessful.

See also:

[Top]


Reverting changes


Revert()

void Revert();

Description

Rolls the dictionary store back to its state at the last commit point.

A commit point is set using the Commit() or CommitL() functions.

The function returns, whether or not it completes successfully.

See also:


RevertL()

void RevertL();

Description

Rolls the dictionary store back to its state at the last commit point and leaves if unsuccessful.

A commit point is set using the Commit() or CommitL() functions.

See also: