ZStreamRWPos_RAM Class Reference

A RWPos stream that maintains its data in multiple fixed size memory chunks. More...

#include <ZStreamRWPos_RAM.h>

Inheritance diagram for ZStreamRWPos_RAM:

ZStreamRWPos ZStreamRPos ZStreamWPos ZStreamU ZStreamW ZStreamR List of all members.

Public Member Functions

virtual size_t Imp_CountReadable ()
 Returns the number of bytes guaranteed to be readable without blocking.
virtual void Imp_Skip (uint64 iCount, uint64 *oCountSkipped)
 Read and discard iCount bytes.

Detailed Description

A RWPos stream that maintains its data in multiple fixed size memory chunks.

ZStreamRWPos_RAM maintainins its contents in a list of fixed size chunks. A similar capability exists with ZStreamRWPos_Handle, but there the backing store is a single block of memory which must be resized as it is written to, leading to a great deal of copying overhead.


Member Function Documentation

size_t ZStreamRWPos_RAM::Imp_CountReadable (  )  [virtual]

Returns the number of bytes guaranteed to be readable without blocking.

If the stream does not or cannot know this information it should return zero. A zero return thus does not mean no data is available, simply that a subsequent Read or Skip may block indefinitely.

Reimplemented from ZStreamRPos.

void ZStreamRWPos_RAM::Imp_Skip ( uint64  iCount,
uint64 oCountSkipped 
) [virtual]

Read and discard iCount bytes.

Override this method if your stream implementation can skip past bytes in the stream without actually reading them.

Parameters:
iCount Count of bytes to be skipped.
oCountSkipped Number of bytes that were actually skipped. If iCount is non zero and oCountSkipped is set to zero then this indicates that the stream has reached its end.

Reimplemented from ZStreamRPos.


The documentation for this class was generated from the following files:
Generated on Thu Jul 26 11:22:04 2007 for ZooLib by  doxygen 1.4.7