TMemBuf Class Reference

class TMemBuf : public TStreamBuf

A stream buffer that uses plain memory for its implementation.

A stream of this type is used by RMemWriteStream and RMemReadStream objects. It also has intermediate buffering capabilities.

This is a seekable stream buffer.

RMemWriteStream RMemReadStream

Inherits from

Public Member Functions
TMemBuf ()
IMPORT_C void Set ( TUint8 *, TUint8 *, TInt )
Protected Member Functions
IMPORT_C TStreamPos DoSeekL ( TMark , TStreamLocation , TInt )
IMPORT_C void OverflowL ()
IMPORT_C TInt UnderflowL ( TInt )
Private Member Functions
TUint8 * Base ()
TUint8 * End ()
Inherited Functions
MStreamBuf::Close()
MStreamBuf::MStreamBuf()
MStreamBuf::PushL()
MStreamBuf::Read(TDes8 &,TInt,TRequestStatus &)
MStreamBuf::Read(TDes8 &,TRequestStatus &)
MStreamBuf::ReadL(MStreamInput &)
MStreamBuf::ReadL(MStreamInput &,TInt)
MStreamBuf::ReadL(MStreamInput &,TStreamTransfer)
MStreamBuf::ReadL(TAny *,TInt)
MStreamBuf::ReadL(TDes8 &,TInt,TRequestStatus &)
MStreamBuf::ReadL(TDes8 &,TRequestStatus &)
MStreamBuf::Release()
MStreamBuf::SeekL(TMark,TStreamLocation,TInt)
MStreamBuf::SeekL(TMark,TStreamPos)
MStreamBuf::SeekL(TRead,TInt)
MStreamBuf::SeekL(TRead,TStreamLocation,TInt)
MStreamBuf::SeekL(TWrite,TInt)
MStreamBuf::SeekL(TWrite,TStreamLocation,TInt)
MStreamBuf::SizeL()const
MStreamBuf::Synch()
MStreamBuf::SynchL()
MStreamBuf::TellL(TRead)const
MStreamBuf::TellL(TWrite)const
MStreamBuf::Write(const TDesC8 &,TInt,TRequestStatus &)
MStreamBuf::Write(const TDesC8 &,TRequestStatus &)
MStreamBuf::WriteL(MStreamOutput &)
MStreamBuf::WriteL(MStreamOutput &,TInt)
MStreamBuf::WriteL(MStreamOutput &,TStreamTransfer)
MStreamBuf::WriteL(const TAny *,TInt)
MStreamBuf::WriteL(const TDesC8 &,TInt,TRequestStatus &)
MStreamBuf::WriteL(const TDesC8 &,TRequestStatus &)
TStreamBuf::Avail(TArea)const
TStreamBuf::Avail(TRead)const
TStreamBuf::Avail(TWrite)const
TStreamBuf::DoReadL(MStreamInput &,TStreamTransfer)
TStreamBuf::DoReadL(TAny *,TInt)
TStreamBuf::DoWriteL(MStreamOutput &,TStreamTransfer)
TStreamBuf::DoWriteL(const TAny *,TInt)
TStreamBuf::End(TArea)const
TStreamBuf::End(TRead)const
TStreamBuf::End(TWrite)const
TStreamBuf::Ptr(TArea)const
TStreamBuf::Ptr(TRead)const
TStreamBuf::Ptr(TWrite)const
TStreamBuf::SetBuf(TArea,TUint8 *,TUint8 *)
TStreamBuf::SetBuf(TRead,TUint8 *,TUint8 *)
TStreamBuf::SetBuf(TWrite,TUint8 *,TUint8 *)
TStreamBuf::SetEnd(TArea,TUint8 *)
TStreamBuf::SetEnd(TRead,TUint8 *)
TStreamBuf::SetEnd(TWrite,TUint8 *)
TStreamBuf::SetPtr(TArea,TUint8 *)
TStreamBuf::SetPtr(TRead,TUint8 *)
TStreamBuf::SetPtr(TWrite,TUint8 *)
TStreamBuf::TStreamBuf()
Inherited Enumerations
MStreamBuf:TRead
MStreamBuf:TWrite
Private Attributes
TUint8 * iBase

Constructor & Destructor Documentation

TMemBuf()

IMPORT_C TMemBuf ( )

Constructs an empty object.

Call Set() before using the object.

Member Functions Documentation

Base()

TUint8 * Base ( ) const [private, inline]

DoSeekL(TMark, TStreamLocation, TInt)

IMPORT_C TStreamPos DoSeekL ( TMark aMark,
TStreamLocation aLocation,
TInt anOffset
) [protected, virtual]

Parameters

TMark aMark
TStreamLocation aLocation
TInt anOffset

End()

TUint8 * End ( ) const [private, inline]

OverflowL()

IMPORT_C void OverflowL ( ) [protected, virtual]

Empties the intermediate buffer and resets the start and end points of the write area.

The implementation of this function depends on the way the stream itself is implemented. For example, the in-memory streams have simple implementations.

Set(TUint8 *, TUint8 *, TInt)

IMPORT_C void Set ( TUint8 * aPtr,
TUint8 * anEnd,
TInt aMode = ERead|EWrite
)

Sets up the stream to use the specified area of plain memory.

MStreamBuf::TRead MStreamBuf::TWrite

Parameters

TUint8 * aPtr The start address for the area of plain memory that hosts the stream and that also acts as the intermediate buffer.
TUint8 * anEnd The end address for the area of plain memory that hosts the stream and that also acts as the intermediate buffer. The addressed byte is outside the memory area.
TInt aMode = ERead|EWrite The mode in which the stream is to be used. It can be used in either or both read and write modes, represented by ERead and EWrite.

UnderflowL(TInt)

IMPORT_C TInt UnderflowL ( TInt aMaxLength ) [protected, virtual]

Re-fills the intermediate buffer and resets the start and end points of the read area.

The implementation of this function depends on the way the stream itself is implemented. For example, the in-memory streams have simple implementations.

Parameters

TInt aMaxLength The maximum amount of data required for the intermediate buffer.

Member Data Documentation

TUint8 * iBase

TUint8 * iBase [private]