Location:
s32stor.h
Link against: estor.lib
CEmbeddedStore
Supported from 5.0
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.
|
Defined in CEmbeddedStore
:
Detach()
, FromL()
, FromLC()
, Host()
, NewL()
, NewLC()
, Position()
, Reattach()
, Start()
, ~CEmbeddedStore()
Inherited from CBase
:
operator new()
Inherited from CPersistentStore
:
Root()
,
SetRootL()
Inherited from CStreamStore
:
Commit()
,
CommitL()
,
CompactL()
,
Delete()
,
DeleteL()
,
DoCommitL()
,
DoCompactL()
,
DoCreateL()
,
DoDeleteL()
,
DoReadL()
,
DoReclaimL()
,
DoReplaceL()
,
DoRevertL()
,
DoWriteL()
,
ExtendL()
,
ReclaimL()
,
Revert()
,
RevertL()
static CEmbeddedStore* NewL(RWriteStream& aHost);
Creates an embedded store within the specified host stream.
Note that ownership of the stream passes to the store and the
referenced RWriteStream
is cleared.
|
|
static CEmbeddedStore* NewLC(RWriteStream& aHost);
Creates an embedded store within the specified host stream, putting a pointer to the store onto the cleanup stack.
Putting a pointer to the embedded store object onto the cleanup stack allows the object and allocated resources to be cleaned up if a subsequent leave occurs.
Note that ownership of the stream passes to the store and the
referenced RWriteStream
is cleared.
|
|
~CEmbeddedStore();
Frees resources owned by the object, prior to its destruction. In particular, the destructor closes the associated file.
static CEmbeddedStore* FromL(RReadStream& aHost);
Opens the store hosted by the specified stream.
Note that ownership of the stream passes to the store; the referenced
RReadStream
is cleared.
|
|
static CEmbeddedStore* FromLC(RReadStream& aHost);
Open the store hosted by the specified stream, putting a pointer to the store onto the cleanup stack.
Putting a pointer to the embedded store object onto the cleanup stack allows the object and allocated resources to be cleaned up if a subsequent leave occurs.
Note that ownership of the stream passes to the store and the
referenced RReadStream
is cleared.
|
|
TStreamPos Start() const;
Returns the start position of this embedded store within the host stream.
|
static TStreamPos Position(TStreamId anId);
Returns the position of the specified stream, within the host stream.
|
|
MStreamBuf* Host() const;
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.
|
void Detach();
Gives up ownership of the host stream buffer. The caller takes on the responsibility for discarding the buffer.
void Reattach(MStreamBuf* aHost);
Takes ownership of the specified stream buffer. On return from this function, the embedded store assumes this to be the host stream buffer.
|