ZStrimR_Limited Class Reference

A read filter strim that limits the number of code points read through it. More...

#include <ZStrim_Limited.h>

Inheritance diagram for ZStrimR_Limited:

ZStrimR List of all members.

Public Member Functions

virtual void Imp_CopyToDispatch (const ZStrimW &iStrimW, size_t iCountCP, size_t *oCountCPRead, size_t *oCountCPWritten)
 Invoke iStrimW's Imp_CopyFrom method.
virtual void Imp_CopyTo (const ZStrimW &iStrimW, size_t iCountCP, size_t *oCountCPRead, size_t *oCountCPWritten)
 Actually copy data from this strim to iStrimW.
virtual void Imp_Skip (size_t iCountCP, size_t *oCountCPSkipped)
 Read and discard iCountCP code points.

Detailed Description

A read filter strim that limits the number of code points read through it.


Member Function Documentation

void ZStrimR_Limited::Imp_CopyToDispatch ( const ZStrimW iStrimW,
size_t  iCountCP,
size_t *  oCountCPRead,
size_t *  oCountCPWritten 
) [virtual]

Invoke iStrimW's Imp_CopyFrom method.

The first part of the two-stage dispatch initiated by CopyTo and CopyAllTo. Override this method if your strim's data is in memory and thus can be written to iStrimW by a single call to its Write method.

Reimplemented from ZStrimR.

void ZStrimR_Limited::Imp_CopyTo ( const ZStrimW iStrimW,
size_t  iCountCP,
size_t *  oCountCPRead,
size_t *  oCountCPWritten 
) [virtual]

Actually copy data from this strim to iStrimW.

The second part of the two-stage dispatch initiated by CopyTo and CopyAllTo. The default implementation calls sCopyReadToWrite. Override this method if your strim's data is in memory and thus can be written to iStrimW by a single call to its Write method.

See also:
sCopyReadToWrite

Reimplemented from ZStrimR.

void ZStrimR_Limited::Imp_Skip ( size_t  iCountCP,
size_t *  oCountCPSkipped 
) [virtual]

Read and discard iCountCP code points.

Override this method if your strim implementation can skip past code points without actually reading them.

Parameters:
iCountCP Count of code points to be skipped.
oCountCPSkipped Number of code points that were actually skipped. If iCountCP is non zero and oCountCPSkipped is set to zero then this indicates that the strim has reached its end.

Reimplemented from ZStrimR.


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