Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: s32mem.h
Link against: estor.lib

Class TBufBuf

TBufBuf

Support

Supported from 5.0

Description

A stream buffer that uses a dynamic buffer for its implementation.

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

This is a seekable stream buffer.

There are three write modes:

Note that this object never takes ownership of the dynamic buffer, the CBufBase type object.

Derivation

MStreamBufA stream buffer that provides a generic I/O interface for streamed data
TBufBufA stream buffer that uses a dynamic buffer for its implementation
TStreamBufAdds buffering capabilities to a stream buffer

Defined in TBufBuf:
(Anonymous), EInsert, ETruncate, Set(), TBufBuf()

Inherited from MStreamBuf:
SeekL(), Close(), DoRelease(), DoSeekL(), DoSynchL(), ERead, EWrite, PushL(), Read(), ReadL(), Release(), SeekL(), SizeL(), Synch(), SynchL(), TMark, TRead, TWrite, TellL(), Write(), WriteL()

Inherited from TStreamBuf:
Avail(), DoReadL(), DoWriteL(), End(), OverflowL(), Ptr(), SetBuf(), SetEnd(), SetPtr(), TArea, UnderflowL()

See also:


Construction


TBufBuf()

TBufBuf();

Description

Constructs an empty object.

Call Set() before using the object.

[Top]


Member functions


Set()

void Set(CBufBase& aBuf,TInt aPos,TInt aMode=ERead|EWrite);

Description

Sets up the stream to use the specified dynamic buffer.

Parameters

CBufBase& aBuf

The dynamic buffer that hosts the stream and that also acts as the intermediate buffer.

TInt aPos

The offset within the dynamic buffer where the stream starts.

TInt aMode

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. In addition, specify TBufBuf::EInsert to imply insert mode; specify TBufBuf::ETruncate to imply truncate mode. If neither TBufBuf::EInsert nor TBufBuf::ETruncate are specified, then overwrite mode is implied. Both TBufBuf::EInsert and TBufBuf::ETruncate imply EWrite.

See also:

[Top]


Enumerators


Enum (Anonymous)

n/a

Description

Defines the insert and truncate mode bit values used by the mode parameter in Set().

ETruncate

Write mode is truncate.

EInsert

Write mode is insert.