class CEmbeddedStore : public CPersistentStore |
Encapsulates an embedded store.
The embedded store may contain an arbitrarily complex network of streams, but is viewed as simply another stream by the embedding store. This means that the embedded store can dealt with as a single stream for purposes of copying or deleting.
Once streams within the embedded store have been committed and closed, they cannot subsequently be changed, i.e. streams cannot be replaced, deleted, extended or changed in any way.
Public Member Functions | |
---|---|
CEmbeddedStore(MStreamBuf *) | |
~CEmbeddedStore() | |
IMPORT_C void | ConstructL(RWriteStream &) |
IMPORT_C void | Detach() |
IMPORT_C CEmbeddedStore * | FromL(RReadStream &) |
IMPORT_C CEmbeddedStore * | FromLC(RReadStream &) |
MStreamBuf * | Host() |
IMPORT_C void | MarshalL(RReadStream &) |
IMPORT_C CEmbeddedStore * | NewL(RWriteStream &) |
IMPORT_C CEmbeddedStore * | NewLC(RWriteStream &) |
TStreamPos | Position(TStreamId) |
void | Reattach(MStreamBuf *) |
TStreamPos | Start() |
Protected Member Functions | |
---|---|
IMPORT_C MStreamBuf * | DoCreateL(TStreamId &) |
IMPORT_C MStreamBuf * | DoReadL(TStreamId) |
Private Member Functions | |
---|---|
IMPORT_C void | DoCommitL() |
CEmbeddedStore * | DoNewLC(MStreamBuf *) |
IMPORT_C void | DoSetRootL(TStreamId) |
Private Attributes | |
---|---|
__MUTABLE TStreamExchange | iHost |
TStreamPos | iStart |
Inherited Attributes | |
---|---|
CPersistentStore::iRoot |
IMPORT_C void | ConstructL | ( | RWriteStream & | aStream | ) |
RWriteStream & aStream |
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. |
CEmbeddedStore * | DoNewLC | ( | MStreamBuf * | aHost | ) | [private, static] |
MStreamBuf * aHost |
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 void | DoSetRootL | ( | TStreamId | anId | ) | [private, virtual] |
TStreamId anId |
IMPORT_C CEmbeddedStore * | FromL | ( | RReadStream & | aHost | ) | [static] |
RReadStream & aHost |
IMPORT_C CEmbeddedStore * | FromLC | ( | RReadStream & | aHost | ) | [static] |
RReadStream & aHost |
MStreamBuf * | Host | ( | ) | const [inline] |
Returns a pointer to the stream buffer which is acting as host to this embedded store. The embedded store retains ownership of the host stream buffer.
A pointer to the stream buffer which is host to this embedded store.
IMPORT_C CEmbeddedStore * | NewL | ( | RWriteStream & | aHost | ) | [static] |
RWriteStream & aHost |
IMPORT_C CEmbeddedStore * | NewLC | ( | RWriteStream & | aHost | ) | [static] |
RWriteStream & aHost |
TStreamPos | Position | ( | TStreamId | anId | ) | [static, inline] |
Returns the position of the specified stream, within the host stream.
The position of the stream with id anId within the host stream.
TStreamId anId | The stream id of the stream in the embedded store whose position within the host stream is to be returned. |
void | Reattach | ( | MStreamBuf * | aHost | ) | [inline] |
Takes ownership of the specified stream buffer. On return from this function, the embedded store assumes this to be the host stream buffer.
MStreamBuf * aHost | A pointer to the stream buffer over which the embedded store is to take ownership. |
TStreamPos | Start | ( | ) | const [inline] |
Returns the start position of this embedded store within the host stream.
The position of the this embedded store within the host stream.