Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AxPipe::CFilterByte Class Reference

A byte-wise filter class, enabling the caller to retrieve one byte at a time. More...

#include <AxPipe.h>

Inheritance diagram for AxPipe::CFilterByte:

Inheritance graph
[legend]
Collaboration diagram for AxPipe::CFilterByte:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

bool GetNextSeg ()
 Helper routine to get next segment.

int ReadByte ()
 Read a byte from the stream.

CSegRead ()
 Errror catcher, can't call Read() from CFilterByte derived.

size_t Skip (size_t cb)
 Skip bytes in stream.


Detailed Description

A byte-wise filter class, enabling the caller to retrieve one byte at a time.

Use ReadByte() in your implementation of InFilter() to get a byte at a time as an int. It'll return -1 on eos.

Definition at line 497 of file AxPipe.h.


Member Function Documentation

bool AxPipe::CFilterByte::GetNextSeg  )  [protected]
 

Helper routine to get next segment.

m_pSeg can only be valid, zero-length or NULL here. If we already have a valid segment in m_pSeg, we don't get a new one.

Returns:
true if we return with a segment ready to use in m_pSeg.

Definition at line 175 of file CFilter.cpp.

References AxPipe::CCoContext::Go(), AxPipe::CSeg::Len(), and AxPipe::CSeg::Release().

Referenced by AxPipe::CFilterBlock::ReadBlock(), ReadByte(), and Skip().

int AxPipe::CFilterByte::ReadByte  )  [protected]
 

Read a byte from the stream.

Returns:
A byte as an int, or -1 on eos or error

Definition at line 189 of file CFilter.cpp.

References AxPipe::CSeg::Drop(), GetNextSeg(), AxPipe::CSeg::Len(), and AxPipe::CSeg::PtrRd().

size_t AxPipe::CFilterByte::Skip size_t  cb  )  [protected]
 

Skip bytes in stream.

Parameters:
cb Number of bytes to skip
Returns:
Number of bytes not skipped because stream ended prematurely.

Definition at line 213 of file CFilter.cpp.

References AxPipe::CSeg::Drop(), GetNextSeg(), and AxPipe::CSeg::Len().


The documentation for this class was generated from the following files:
Generated on Mon Feb 2 13:19:21 2004 for AxPipe by doxygen 1.3.5