ZStreamWPos Class Reference
[Streams]

Base interface for positionable write streams. More...

#include <ZStream.h>

Inheritance diagram for ZStreamWPos:

ZStreamW ZStreamRWPos ZStreamWPos_Memory ZStreamWPos_Null ZStreamWPos_String ZStreamRWPos_PageBuffered ZStreamRWPos_RAM ZStreamRWPos_String List of all members.

Public Member Functions

Position and size API
uint64 GetPosition () const
void SetPosition (uint64 iPosition) const
uint64 GetSize () const
void SetSize (uint64 iSize) const
void Truncate () const
Essential overrides
API that must be overridden.

virtual uint64 Imp_GetPosition ()=0
virtual void Imp_SetPosition (uint64 iPosition)=0
virtual uint64 Imp_GetSize ()=0
virtual void Imp_SetSize (uint64 iSize)=0
Optionally overridable API
virtual void Imp_Truncate ()
 Set the stream's size to match its current position.

Detailed Description

Base interface for positionable write streams.

A ZStreamWPos augments ZStreamW with two attributes, a size and a position.


Member Function Documentation

uint64 ZStreamWPos::GetPosition (  )  const [inline]

Return the stream's position.

Reimplemented in ZStreamRWPos.

void ZStreamWPos::SetPosition ( uint64  iPosition  )  const [inline]

Set the stream's position, without making any change in its size, even if iPosition is greater than the stream's size.

Reimplemented in ZStreamRWPos.

uint64 ZStreamWPos::GetSize (  )  const [inline]

Return the stream's size.

Reimplemented in ZStreamRWPos.

void ZStreamWPos::SetSize ( uint64  iSize  )  const [inline]

Set the stream's size, without making any change in its position even if that position is greater than iSize.

void ZStreamWPos::Truncate (  )  const [inline]

Set the stream's size to be the stream's position.

void ZStreamWPos::Imp_Truncate (  )  [virtual]

Set the stream's size to match its current position.

The default implementation uses the stream's own SetSize and GetPosition methods. Subclasses may be able to implement this more efficiently.


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