CBufferFilter Class Reference

Buffer filter. More...

#include <BufferFilter.h>

Inheritance diagram for CBufferFilter:

CXSIFilter List of all members.

Public Member Functions

  CBufferFilter ()
virtual  ~CBufferFilter ()
int  Open (CSIBCString in_szFilename, _SI_FILE_MODE in_Mode)
int  Close ()
int  Read (SI_Char *out_pBuffer, SI_Long in_lSize)
int  Write (SI_Char *in_pBuffer, SI_Long in_lSize)
int  Eof ()
int  Tell ()

Detailed Description

Buffer filter.

This class will gather up to a certain size of data until it calls its subfilter to write or it will read up to a certain size in one go and answer to request until it has exhausted the data at which point it will ask its subfilter for more data.


Constructor & Destructor Documentation

CBufferFilter (  ) 

Constructor

virtual ~CBufferFilter (  )  [virtual]

Destructor


Member Function Documentation

int Open ( CSIBCString  in_szFilename,
_SI_FILE_MODE  in_Mode  
) [virtual]

Opens the file for either reading or writing

Parameters:
in_szFilename  file to open
in_Mode  whether to read or write
Returns:
Whether the file was successfully opened or not

Reimplemented from CXSIFilter.

int Close (  )  [virtual]

Closes the file when finished

Returns:
Whether the file was successfully closed or not

Reimplemented from CXSIFilter.

int Read ( SI_Char *  out_pBuffer,
SI_Long  in_lSize  
) [virtual]

Reads a number of bytes into the buffer passed in.

Return values:
out_pBuffer  output buffer
Parameters:
in_lSize  number of bytes to read
Returns:
number of bytes read.

Reimplemented from CXSIFilter.

int Write ( SI_Char *  in_pBuffer,
SI_Long  in_lSize  
) [virtual]

Writes a number of bytes to the file

Parameters:
in_pBuffer  input buffer
in_lSize  number of bytes to write
Returns:
number of bytes written

Reimplemented from CXSIFilter.

int Eof (  )  [virtual]

Tests whether we have reached the end of file

Returns:
1 if we are at the end of the file

0 otherwise

Reimplemented from CXSIFilter.

int Tell (  )  [virtual]

Returns the current position in the file.

Returns:
position in the file (0 - beginning)

Reimplemented from CXSIFilter.


The documentation for this class was generated from the following file: