Class Filter.

Inherits Garbage

The Filter class filters a the I/O of a Buffer.

A Buffer may call the file read/write functions, or it may call a Filter's read() or write() (both of which are virtual functions). A filter may be installed on a Buffer using Buffer::addFilter().

Filter::Filter()

Constructs an empty Filter.

Reimplements Garbage::Garbage().

void Filter::flush( Buffer * buffer )

This virtual function is responsible for flushing any queues the filter may have, such that all output is sent to buffer. The default implementation does nothing.

int Filter::read( char * address, uint len, Buffer * buffer )

This virtual function reads up to len bytes into memory starting at address. It may use buffer as a data source, filtering the data as appropriate for each subclass of Filter.

int Filter::write( char * address, uint len, Buffer * buffer )

This virtual function writes len bytes starting at address. It may use buffer as a sink after filtering the data.

Filter::~Filter()

Destroys the object and frees any allocated resources.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.