RWriteStream Class Reference

class RWriteStream

The write stream interface. The process of externalising to a stream is achieved through a reference to an object of this type.

A store aware class defines and implements an ExternalizeL() member function which is used to externalise that object and takes a reference to an RWriteStream as the interface to the write stream.

Public Member Functions
RWriteStream()
RWriteStream(const MExternalizer< TStreamRef > &)
RWriteStream(MStreamBuf *)
IMPORT_C voidClose()
IMPORT_C voidCommitL()
voidPop()
IMPORT_C voidPushL()
IMPORT_C voidRelease()
MStreamBuf *Sink()
IMPORT_C voidWriteInt16L(TInt)
IMPORT_C voidWriteInt32L(TInt32)
IMPORT_C voidWriteInt8L(TInt)
IMPORT_C voidWriteL(const TDesC8 &)
IMPORT_C voidWriteL(const TDesC8 &, TInt)
IMPORT_C voidWriteL(const TUint8 *, TInt)
IMPORT_C voidWriteL(RReadStream &)
IMPORT_C voidWriteL(RReadStream &, TInt)
IMPORT_C voidWriteL(const TDesC16 &)
IMPORT_C voidWriteL(const TDesC16 &, TInt)
IMPORT_C voidWriteL(const TUint16 *, TInt)
IMPORT_C voidWriteReal32L(TReal)
IMPORT_C voidWriteReal64L(TReal64)
IMPORT_C voidWriteUint16L(TUint)
IMPORT_C voidWriteUint32L(TUint32)
IMPORT_C voidWriteUint8L(TUint)
Protected Member Functions
voidAttach(MStreamBuf *)
voidDetach()
Private Member Functions
IMPORT_C voidWriteRefL(TStreamRef)
Private Attributes
const MExternalizer< TStreamRef > *iExterL
MStreamBuf *iSnk

Constructor & Destructor Documentation

RWriteStream()

RWriteStream()[inline]

The stream buffer sink, as returned by Sink(), is set to NULL, and the stream has no associated Store map.

RWriteStream(const MExternalizer< TStreamRef > &)

RWriteStream(const MExternalizer< TStreamRef > &anExter)[inline]

Constructs a write stream with an associated store map. The stream buffer sink is set to NULL.

Parameters

const MExternalizer< TStreamRef > & anExterSpecifies an externaliser. For example, CStoreMap implements MExternalizer<TStreamRef>.

RWriteStream(MStreamBuf *)

RWriteStream(MStreamBuf *aSink)[inline]

Constructs a write stream over the supplied stream buffer. The stream has no associated Store map.

Parameters

MStreamBuf * aSinkThe stream buffer used to write to the write stream.

Member Functions Documentation

Attach(MStreamBuf *)

voidAttach(MStreamBuf *aSink)[protected, inline]

Sets the stream buffer sink for this write stream. The existing sink, if there is one, will be discarded.

This is useful for derived classes, enabling them to set the sink following construction.

Note:

Release() is not called for discarded sinks.

Parameters

MStreamBuf * aSinkThe stream buffer sink for this write stream.

Close()

IMPORT_C voidClose()

CommitL()

IMPORT_C voidCommitL()

Detach()

voidDetach()[protected, inline]

Sets the stream buffer sink for this write stream to NULL. The existing sink, if there is one, will be discarded.

Note:

Release() is not called for discarded sinks.

Pop()

voidPop()[inline]

Removes the cleanup item for this write stream object from the cleanup stack.

PushL()

IMPORT_C voidPushL()

Release()

IMPORT_C voidRelease()

Sink()

MStreamBuf *Sink()[inline]

Gets the underlying stream buffer for the write stream. This provides access to the stream-buffer implementation used by the write stream.

The underlying stream buffer for the write stream.

WriteInt16L(TInt)

IMPORT_C voidWriteInt16L(TIntaValue)

Parameters

TInt aValue

WriteInt32L(TInt32)

IMPORT_C voidWriteInt32L(TInt32aValue)

Parameters

TInt32 aValue

WriteInt8L(TInt)

IMPORT_C voidWriteInt8L(TIntaValue)

Parameters

TInt aValue

WriteL(const TDesC8 &)

IMPORT_C voidWriteL(const TDesC8 &aDes)

Parameters

const TDesC8 & aDes

WriteL(const TDesC8 &, TInt)

IMPORT_C voidWriteL(const TDesC8 &aDes,
TIntaLength
)

Parameters

const TDesC8 & aDes
TInt aLength

WriteL(const TUint8 *, TInt)

IMPORT_C voidWriteL(const TUint8 *aPtr,
TIntaLength
)

Parameters

const TUint8 * aPtr
TInt aLength

WriteL(RReadStream &)

IMPORT_C voidWriteL(RReadStream &aStream)

Parameters

RReadStream & aStream

WriteL(RReadStream &, TInt)

IMPORT_C voidWriteL(RReadStream &aStream,
TIntaLength
)

Parameters

RReadStream & aStream
TInt aLength

WriteL(const TDesC16 &)

IMPORT_C voidWriteL(const TDesC16 &aDes)

Parameters

const TDesC16 & aDes

WriteL(const TDesC16 &, TInt)

IMPORT_C voidWriteL(const TDesC16 &aDes,
TIntaLength
)

Parameters

const TDesC16 & aDes
TInt aLength

WriteL(const TUint16 *, TInt)

IMPORT_C voidWriteL(const TUint16 *aPtr,
TIntaLength
)

Parameters

const TUint16 * aPtr
TInt aLength

WriteReal32L(TReal)

IMPORT_C voidWriteReal32L(TRealaValue)

Parameters

TReal aValue

WriteReal64L(TReal64)

IMPORT_C voidWriteReal64L(TReal64aValue)

Parameters

TReal64 aValue

WriteRefL(TStreamRef)

IMPORT_C voidWriteRefL(TStreamRefaRef)[private]

Parameters

TStreamRef aRef

WriteUint16L(TUint)

IMPORT_C voidWriteUint16L(TUintaValue)

Parameters

TUint aValue

WriteUint32L(TUint32)

IMPORT_C voidWriteUint32L(TUint32aValue)

Parameters

TUint32 aValue

WriteUint8L(TUint)

IMPORT_C voidWriteUint8L(TUintaValue)

Parameters

TUint aValue

Member Data Documentation

const MExternalizer< TStreamRef > * iExterL

const MExternalizer< TStreamRef > *iExterL[private]

MStreamBuf * iSnk

MStreamBuf *iSnk[private]