Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: s32std.h
Link against: estor.lib

Class RStoreWriteStream

RStoreWriteStream

Support

Supported from 5.0

Description

Supports the writing of a stream to a store.

The class allows:

Derivation

RStoreWriteStreamSupports the writing of a stream to a store
RWriteStreamThe write stream interface

Defined in RStoreWriteStream:
AppendL(), AppendLC(), CreateL(), CreateLC(), OpenL(), OpenLC(), RStoreWriteStream(), ReplaceL(), ReplaceLC()

Inherited from RWriteStream:
Attach(), Close(), CommitL(), Detach(), Pop(), PushL(), Release(), Sink(), WriteInt16L(), WriteInt32L(), WriteInt8L(), WriteL(), WriteReal32L(), WriteReal64L(), WriteUint16L(), WriteUint32L(), WriteUint8L()


Construction and destruction


RStoreWriteStream()

RStoreWriteStream();

Description

Constructs an uninitialised object. It is necessary because there are also non-default constructors in this class.


RStoreWriteStream()

RStoreWriteStream(const MExternalizer<TStreamRef>& anExter);

Description

Constructs an object with an externaliser. The store map CStoreMap is an example of an externalizer.

Parameters

const MExternalizer<TStreamRef>& anExter

Specifies an externaliser

[Top]


Creating a stream


CreateL()

TStreamId CreateL(CStreamStore& aStore);

Description

Creates a new stream.

The function creates a new stream in the specified store and prepares the stream for writing. The function returns the new stream id, and leaves if it cannot complete successfully.

Note that a call to this function must be matched by a call to CommitL() before this object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store which is to contain the new stream.

Return value

TStreamId

The stream id of the newly created stream.

See also:


CreateLC()

TStreamId CreateLC(CStreamStore& aStore);

Description

Creates a new stream, putting a cleanup item onto the cleanup stack.

The function creates a new stream in the specified store and prepares the stream for writing. The function returns the new stream id, and leaves if it cannot complete successfully.

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

Note that a call to this function must be matched by a call to CommitL() before this object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store which is to contain the new stream.

Return value

TStreamId

The stream id of the newly created stream.

See also:

[Top]


Overwriting a stream


OpenL()

void OpenL(CStreamStore& aStore,TStreamId anId);

Description

Opens an existing stream and prepares it for overwriting.

The function leaves if cannot complete successfully.

Note that a call to this function must be matched by a call to CommitL() before this object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store containing the stream.

TStreamId anId

The id of the stream to be overwritten.

Leave codes

 

This function is not supported by the direct file store, CDirectFileStore . If this function is called on a direct file store, it leaves with KErrNotSupported .

See also:


OpenLC()

void OpenLC(CStreamStore& aStore,TStreamId anId);

Description

Opens an existing stream, prepares it for overwriting, and puts a cleanup item onto the cleanup stack.

The function leaves if cannot complete successfully.

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

Note that a call to this function must be matched by a call to CommitL() before this object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store containing the stream.

TStreamId anId

The id of the stream to be overwritten.

Leave codes

 

This function is not supported by the direct file store, CDirectFileStore . If this function is called on a direct file store, it leaves with KErrNotSupported .

See also:

[Top]


Replacing a stream


ReplaceL()

void ReplaceL(CStreamStore& aStore,TStreamId anId);

Description

Opens an existing stream and prepares it for replacement.

The function leaves if it cannot complete successfully.

Note that a call to this function must be matched by a call to CommitL() before this object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store containing the stream.

TStreamId anId

The id of the stream to be replaced.

Leave codes

 

This function is not supported by the direct file store, CDirectFileStore . If this function is called on a direct file store, it leaves with KErrNotSupported .

See also:


ReplaceLC()

void ReplaceLC(CStreamStore& aStore,TStreamId anId);

Description

Opens an existing stream, prepares it for replacement and puts a cleanup item onto the cleanup stack.

The function leaves if it cannot complete successfully.

Placing a cleanup item onto the cleanup stack allows allocated resources to be cleaned up if a subsequent leave occurs.

Note that a call to this function must be matched by a call to CommitL() before this object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store containing the stream.

TStreamId anId

The id of the stream to be replaced.

Leave codes

 

This function is not supported by the direct file store, CDirectFileStore . If this function is called on a direct file store object, it leaves with KErrNotSupported .

See also:

[Top]


Appending to a stream


AppendL()

void AppendL(CStreamStore& aStore,TStreamId anId);

Description

Opens an existing stream and prepares it for appending.

The function leaves if it cannot complete successfully.

Note that a call to this function must be matched by a call to CommitL() before this object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store containing the stream.

TStreamId anId

The id of the stream to be appended.

Leave codes

 

This function is not supported by the direct file store, CDirectFileStore or the permanent file store CPermanentFileStore . If this function is called on a direct file store, it leaves with KErrNotSupported . If the function is called on a permanent file store, it leaves with KErrOverflow .

See also:


AppendLC()

void AppendLC(CStreamStore& aStore,TStreamId anId);

Description

Opens an existing stream, prepares it for appending, and puts a cleanup item onto the cleanup stack.

The function leaves if it cannot complete successfully.

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

Note that call to this function must be matched by a call to CommitL() before the RStoreWriteStream object is disposed of.

Parameters

CStreamStore& aStore

A reference to the store containing the stream.

TStreamId anId

The id of the stream to be appended.

Leave codes

 

This function is not supported by the direct file store, CDirectFileStore or the permanent file store CPermanentFileStore . If this function is called on a direct file store, it leaves with KErrNotSupported . If the function is called on a permanent file store, it leaves with KErrOverflow .

See also: