ZStreamW_Memory Class Reference

A write stream that writes to normal memory. More...

#include <ZStream_Memory.h>

Inheritance diagram for ZStreamW_Memory:

ZStreamW List of all members.

Public Member Functions

virtual void Imp_CopyFromDispatch (const ZStreamR &iStreamR, uint64 iCount, uint64 *oCountRead, uint64 *oCountWritten)
 Invoke iStreamR's Imp_CopyTo method.
virtual void Imp_CopyFrom (const ZStreamR &iStreamR, uint64 iCount, uint64 *oCountRead, uint64 *oCountWritten)
 Actually copy data to this stream from iStreamR.
void * GetCurrentAddress ()
 Returns the address to which the next write will be made.

Detailed Description

A write stream that writes to normal memory.

ZStreamW_Memory provides write stream access to normal memory. The memory is only referenced by the stream, no copy of it is taken, and no attempt is made to dispose it or otherwise interpret what kind of memory it might be. The caller is responsible for passing an address to which write access is permitted. The stream does not bound its accesses, it just writes the data it's passed and works its way through memory. If you need bounded access use a ZStreamWPos_Memory.

See also:
ZStreamWPos_Memory


Member Function Documentation

void ZStreamW_Memory::Imp_CopyFromDispatch ( const ZStreamR iStreamR,
uint64  iCount,
uint64 oCountRead,
uint64 oCountWritten 
) [virtual]

Invoke iStreamR's Imp_CopyTo method.

The first part of the two-stage dispatch initiated by ZStreamW::CopyFrom and ZStreamW::CopyAllFrom. Override if your stream's data is in memory and thus iStreamR can have its Read method called with your stream's data as its destination.

Reimplemented from ZStreamW.

void ZStreamW_Memory::Imp_CopyFrom ( const ZStreamR iStreamR,
uint64  iCount,
uint64 oCountRead,
uint64 oCountWritten 
) [virtual]

Actually copy data to this stream from iStreamR.

The second part of the two-stage dispatch initiated by ZStreamR::CopyTo and ZStreamR::CopyAllTo. The default implementation calls sCopyReadToWrite. Override this method if your stream's data is in memory and thus can be modified by calling iStreamR's Read method.

See also:
sCopyReadToWrite

Reimplemented from ZStreamW.


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