RReadStream Class Reference

#include <s32strm.h>

class RReadStream
Public Member Functions
RReadStream()
RReadStream(MStreamBuf *)
voidClose()
voidPop()
IMPORT_C voidPushL()
IMPORT_C TInt16ReadInt16L()
IMPORT_C TInt32ReadInt32L()
IMPORT_C TInt8ReadInt8L()
IMPORT_C voidReadL(TDes8 &)
IMPORT_C voidReadL(TDes8 &, TInt)
IMPORT_C voidReadL(TDes8 &, TChar)
IMPORT_C voidReadL(TUint8 *, TInt)
IMPORT_C voidReadL(TInt)
voidReadL(RWriteStream &)
voidReadL(RWriteStream &, TInt)
IMPORT_C voidReadL(TDes16 &)
IMPORT_C voidReadL(TDes16 &, TInt)
IMPORT_C voidReadL(TDes16 &, TChar)
IMPORT_C voidReadL(TUint16 *, TInt)
IMPORT_C TReal32ReadReal32L()
IMPORT_C TReal64ReadReal64L()
IMPORT_C TUint16ReadUint16L()
IMPORT_C TUint32ReadUint32L()
IMPORT_C TUint8ReadUint8L()
IMPORT_C voidRelease()
MStreamBuf *Source()
Protected Member Functions
voidAttach(MStreamBuf *)
voidDetach()

Detailed Description

The read stream interface. The process of internalising from a stream is achieved through a reference to an object of this type.

A store aware class defines an implements an InternalizeL() member function which is used to internalise that object and takes a reference to an RReadStream as the interface to the read stream.

Constructor & Destructor Documentation

RReadStream ( )

RReadStream()[inline]

Sets the stream buffer source to NULL, which implies that it is safe to close

See also: RReadStream::Source()

RReadStream ( MStreamBuf * )

RReadStream(MStreamBuf *aSource)[inline]

Constructs a read stream over the supplied stream buffer.

See also: RReadStream::Source()

Parameters
aSourceThe stream buffer used to read from the read stream.

Member Function Documentation

Attach ( MStreamBuf * )

voidAttach(MStreamBuf *aSource)[protected, inline]

Sets the stream buffer source for this read stream. The existing source (if there is one) will be discarded.

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

Note:

Release() is not called on any discarded stream buffer.

See also: RReadStream::Source() RReadStream::Detach()

Parameters
aSourceThe new source stream buffer for this read stream.

Close ( )

voidClose()[inline]

Frees resources used by the stream.

See also: RReadStream::Release()

Detach ( )

voidDetach()[protected, inline]

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

Note that Release() is not called on any discarded stream buffer.

See also: RReadStream::Source() RReadStream::Attach()

Pop ( )

voidPop()[inline]

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

PushL ( )

IMPORT_C voidPushL()

Puts a cleanup item for this read stream object onto the cleanup stack. This allows allocated resources to be cleaned up if a subsequent leave occurs.

ReadInt16L ( )

IMPORT_C TInt16ReadInt16L()

Internalises a TInt16 value. The function reads a 16 bit value from this stream and interprets it as a TInt16.

Return Value
The 16bit value read from this stream.

ReadInt32L ( )

IMPORT_C TInt32ReadInt32L()

Internalises a TInt32 value. The function reads a 32 bit value from this stream and interprets it as a TInt32.

Return Value
The 32 bit value read from this stream.

ReadInt8L ( )

IMPORT_C TInt8ReadInt8L()

Internalises a TInt8 value The function reads an 8 bit value from this stream and interprets it as a TInt8.

Return Value
The 8bit value read from this stream.

ReadL ( TDes8 & )

IMPORT_C voidReadL(TDes8 &aDes)

Reads sufficient data from this stream to fill the specified 8 bit descriptor up to its maximum length. No other information is read from this read stream.

Parameters
aDesA reference to a modifiable descriptor which is to receive the data read from this stream. Passing the build independent type TDes& allows the compiler to choose the appropriate ReadL() variant (i.e the 8 bit or the 16 bit) at build time.

ReadL ( TDes8 &, TInt )

IMPORT_C voidReadL(TDes8 &aDes,
TIntaLength
)

Reads data of specified length from this stream into the specified 8 bit descriptor. No other information is read from this stream.

Parameters
aDesA reference to a modifiable type descriptor which is to receive the data read from this stream. Passing the build independent type TDes& allows the compiler to choose the appropriate ReadL() variant (i.e the 8 bit or the 16 bit) at build time.
aLengthThe length of data to be read from this stream. This value must be non-negative and must not be greater than the maximum length of the descriptor otherwise the function raises a USER 11 panic.

ReadL ( TDes8 &, TChar )

IMPORT_C voidReadL(TDes8 &aDes,
TCharaDelim
)

Reads data from this stream into the 8 bit descriptor, until either the specified delimiter is encountered or the descriptor is filled to its maximum length. The resulting data in aDes always includes the delimiter aDelim, if aDes is large enough.

Parameters
aDesA reference to a modifiable type descriptor which is to receive the data read from this stream. Passing the build independent type TDes& allows the compiler to choose the appropriate ReadL() variant (i.e the 8 bit or the 16 bit) at build time.
aDelimThe delimiter marking the end of the data in the stream.

ReadL ( TUint8 *, TInt )

IMPORT_C voidReadL(TUint8 *aPtr,
TIntaLength
)

Reads data of specified length from this stream into the location defined by the specified TUint8 pointer.

Parameters
aPtrThe target location for the streamed in data.
aLengthThe length of data to be streamed in.

ReadL ( TInt )

IMPORT_C voidReadL(TIntaLength)

Discards data of specified length read from this stream.

Parameters
aLengthThe length of data to be discarded from this read stream.

ReadL ( RWriteStream & )

voidReadL(RWriteStream &aStream)[inline]

Writes the content of this stream to the specified write stream.

Parameters
aStreamA reference to the write stream to which this stream is to be written.

ReadL ( RWriteStream &, TInt )

voidReadL(RWriteStream &aStream,
TIntaLength
)[inline]

Writes the content of this stream to the specified write stream.

Parameters
aStreamA reference to the write stream to which this stream is to be written.
aLengthThe length of data from this stream to be written to aStream.

ReadL ( TDes16 & )

IMPORT_C voidReadL(TDes16 &aDes)

Reads sufficient data from this stream to fill the specified 16 bit descriptor up to its maximum length. No other information is read from this read stream.

Parameters
aDesA reference to a modifiable type descriptor which is to receive the data read from this stream. Passing the build independent type TDes& allows the compiler to choose the appropriate ReadL() variant (i.e the 8 bit or the 16 bit) at build time.

ReadL ( TDes16 &, TInt )

IMPORT_C voidReadL(TDes16 &aDes,
TIntaLength
)

Reads data of specified length from this stream into the specified 16 bit descriptor. No other information is read from this stream.

Parameters
aDesA reference to a modifiable type descriptor which is to receive the data read from this stream. Passing the build independent type TDes& allows the compiler to choose the appropriate ReadL() variant (i.e the 8 bit or the 16 bit) at build time.
aLengthThe length of data to be read from this stream. This value must be non-negative and must not be greater than the maximum length of the descriptor otherwise the function raises a USER 11 panic.

ReadL ( TDes16 &, TChar )

IMPORT_C voidReadL(TDes16 &aDes,
TCharaDelim
)

Reads data from this stream into the 16 bit descriptor, until either the specified delimiter is encountered or the descriptor is filled to its maximum length. The resulting data in aDes always includes the delimiter aDelim, if aDes is large enough.

Parameters
aDesA reference to a modifiable type descriptor which is to receive the data read from this stream. Passing the build independent type TDes& allows the compiler to choose the appropriate ReadL() variant (i.e the 8 bit or the 16 bit) at build time.
aDelimThe delimiter marking the end of the data in the stream.

ReadL ( TUint16 *, TInt )

IMPORT_C voidReadL(TUint16 *aPtr,
TIntaLength
)

Reads data of specified length from this stream into the specified 16 bit descriptor. No other information is read from this stream.

Parameters
aLengthThe length of data to be read from this stream. This value must be non-negative and must not be greater than the maximum length of the descriptor otherwise the function raises a USER 11 panic.

ReadReal32L ( )

IMPORT_C TReal32ReadReal32L()

Internalises a TReal32 value. The function reads a 32 bit value from this stream and interprets it as a TReal32.

Return Value
The 32 bit value read from this read stream.

ReadReal64L ( )

IMPORT_C TReal64ReadReal64L()

Internalises a TReal64 value. The function reads a 64 bit value from this stream and interprets it as a TReal64.

Return Value
The 64bit value read from this stream.

ReadUint16L ( )

IMPORT_C TUint16ReadUint16L()

Internalises a TUint16 value. The function reads a 16 bit value from this stream and interprets it as a TUint16.

Return Value
The 16 bit value read from this stream.

ReadUint32L ( )

IMPORT_C TUint32ReadUint32L()

Internalises a TUint32 value. The function reads a 32 bit value from this stream and interprets it as a TUint32.

Return Value
The 32 bit value read from this stream.

ReadUint8L ( )

IMPORT_C TUint8ReadUint8L()

Internalises a TUint8 value. The function reads an 8 bit value from this stream and interprets it as a TUint8.

Return Value
The 8 bit value read from this stream.

Release ( )

IMPORT_C voidRelease()

Frees resources before abandoning the stream.

Note that, if a cleanup item for the stream was placed on the cleanup stack when the stream was opened by a call to OpenLC(), then this function need not be called explicitly; clean up is implicitly done by CleanupStack::PopAndDestroy().

Source ( )

MStreamBuf *Source()[inline]

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

Note:

If the stream buffer supports seeking, this allows the RReadStream client to have random access to the stream data.

See also: RReadStream::Attach() RReadStream::Detach()

Return Value
The underlying stream buffer for the read stream.