Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Filter Class Reference

Inheritance diagram for Filter:

Stream DynamicFilter Gzip GzipDecompress List of all members.

Public Member Functions

 Filter ()
virtual int flush (u_long *)
virtual int getFooter (char *buffer, u_long len, u_long *nbw)
virtual int getHeader (char *buffer, u_long len, u_long *nbw)
virtual const char * getName (char *, u_long)
StreamgetParent ()
ProtocolgetProtocol ()
void * getProtocolData ()
virtual int modifyData ()
virtual int read (char *buffer, u_long len, u_long *)
void setParent (Stream *)
void setProtocol (Protocol *pr)
void setProtocolData (void *prd)
virtual int write (const char *buffer, u_long len, u_long *)
virtual ~Filter ()=0

Protected Attributes

Streamparent
Protocolprotocol
void * protocolData

Detailed Description

Abstract class to handle virtual data filters.


Constructor & Destructor Documentation

Filter::Filter  ) 
 

Default constructor.

Filter::~Filter  )  [pure virtual]
 

Avoid direct instances of this class.


Member Function Documentation

int Filter::flush u_long *  nbw  )  [virtual]
 

Flush everything to the stream. Returns -1 on errors.

Parameters:
nbw A pointer to receive the number of read bytes.

Reimplemented from Stream.

Reimplemented in DynamicFilter, Gzip, and GzipDecompress.

int Filter::getFooter char *  buffer,
u_long  len,
u_long *  nbr
[virtual]
 

Get a footer for the filter. Returns -1 on errors.

Parameters:
buffer The buffer where receive read data.
len The buffer length in bytes.
nbr A pointer to receive the number of read bytes.

Reimplemented in DynamicFilter, Gzip, and GzipDecompress.

int Filter::getHeader char *  buffer,
u_long  len,
u_long *  nbr
[virtual]
 

Get an header for the filter. Returns -1 on errors.

Parameters:
buffer The buffer where receive read data.
len The buffer length in bytes.
nbr A pointer to receive the number of read bytes.

Reimplemented in DynamicFilter, Gzip, and GzipDecompress.

const char * Filter::getName char *  name,
u_long  len
[virtual]
 

Return a string with the filter name. If an external buffer is provided write the name there too.

Parameters:
name The buffer where write the filter name.
len The buffer length.

Reimplemented in DynamicFilter, Gzip, and GzipDecompress.

Stream * Filter::getParent  ) 
 

Get the stream used by the filter.

Reimplemented in DynamicFilter.

Protocol* Filter::getProtocol  ) 
 

void* Filter::getProtocolData  ) 
 

int Filter::modifyData  )  [virtual]
 

Returns a nonzero value if the filter modify the input/output data.

Reimplemented in DynamicFilter, Gzip, and GzipDecompress.

int Filter::read char *  buffer,
u_long  len,
u_long *  nbr
[virtual]
 

Read [len] characters using the filter. Returns -1 on errors. buffer The buffer where receive read data.

Parameters:
len The buffer length in bytes.
nbr A pointer to receive the number of read bytes.

Reimplemented from Stream.

Reimplemented in DynamicFilter, Gzip, and GzipDecompress.

void Filter::setParent Stream parentStream  ) 
 

Set the stream where apply the filter.

Parameters:
parentStream The stream to use as parent.

Reimplemented in DynamicFilter.

void Filter::setProtocol Protocol pr  ) 
 

void Filter::setProtocolData void *  prd  ) 
 

int Filter::write const char *  buffer,
u_long  len,
u_long *  nbw
[virtual]
 

Write [len] characters to the stream. Returns -1 on errors.

Parameters:
buffer The buffer with the data to write.
len Number of bytes to use.
nbw A pointer to receive the number of written bytes.

Reimplemented from Stream.

Reimplemented in DynamicFilter, Gzip, and GzipDecompress.


Member Data Documentation

Stream* Filter::parent [protected]
 

Protocol* Filter::protocol [protected]
 

void* Filter::protocolData [protected]
 


Generated on Thu May 1 12:41:00 2008 for MyServer by  doxygen 1.3.9.1