class CBufStore : public CStreamStore |
In-memory non-persistent store. The buffer store does not have a root stream and cannot be closed without losing all the data.
It implements many of the operations defined by the store abstract framework. Specifically, streams in this store can be: overwritten, replaced, appended, deleted, and created in advance of being written to. However the class does not support commit and revert operations.
Overwriting an existing stream can result in a shorter stream; however, a stream cannot be extended beyond its original length. Replacing a stream can result in a stream which is longer or shorter than the original. The order in which streams are written to a memory store is not important as streams can be changed and rewritten.
Public Member Functions | |
---|---|
CBufStore(TInt) | |
~CBufStore() | |
IMPORT_C CBufStore * | NewL(TInt) |
IMPORT_C CBufStore * | NewLC(TInt) |
Protected Member Functions | |
---|---|
IMPORT_C MStreamBuf * | DoCreateL(TStreamId &) |
IMPORT_C void | DoDeleteL(TStreamId) |
IMPORT_C TStreamId | DoExtendL() |
IMPORT_C MStreamBuf * | DoReadL(TStreamId) |
IMPORT_C MStreamBuf * | DoReplaceL(TStreamId) |
IMPORT_C MStreamBuf * | DoWriteL(TStreamId) |
Private Member Functions | |
---|---|
CBufSeg & | BufL(TStreamId) |
Private Attributes | |
---|---|
CArrayFixFlat< CBufSeg * > | iBufArray |
TInt | iExpandSize |
IMPORT_C MStreamBuf * | DoCreateL | ( | TStreamId & | anId | ) | [protected, virtual] |
Creates a new stream in the store. The function gets the allocated stream id in the anId parameter. A stream buffer for the stream should be returned, ready to write into the new stream. This provides the implementation for the RStoreWriteStream::CreateL() functions.
The stream buffer to be written to.
TStreamId & anId | On return, contains the allocated stream id. |
IMPORT_C void | DoDeleteL | ( | TStreamId | anId | ) | [protected, virtual] |
TStreamId anId |
IMPORT_C MStreamBuf * | DoReadL | ( | TStreamId | anId | ) | const [protected, virtual] |
Opens the requested stream for reading. The function should return a stream buffer positioned at the beginning of this stream.
This function is called by the OpenL() and OpenLC() member functions of RStoreReadStream.
A stream buffer positioned at the beginning of the stream to be read.
TStreamId anId | The stream to be read. |
IMPORT_C MStreamBuf * | DoReplaceL | ( | TStreamId | anId | ) | [protected, virtual] |
TStreamId anId |
IMPORT_C MStreamBuf * | DoWriteL | ( | TStreamId | anId | ) | [protected, virtual] |
TStreamId anId |