Foxit PDF SDK

Public Member Functions | List of all members
CFX_DataFilter Class Referenceabstract
FXCRT

Inherits CFX_Object.

## Public Member Functions
virtual | ~CFX_DataFilter ()
| The destructor. Destroy this filter and all its chain.
FX_BOOL | Abort () const
| Indicate whether to abort the filter process. More...
FX_BOOL | AbortAll ()
| Indicate whether to abort the filter process, including all dest filter. More...
void | FilterFinish (CFX_BinaryBuf &dest_buf)
| Indicate the input finished. For some filters, there might be some last output generated. More...
void | FilterIn (FX_LPCBYTE src_buf, size_t src_size, CFX_BinaryBuf &dest_buf)
| Input a data block to the filter (and its filter chain), and receive the final output. More...
FX_INT64 | GetSrcPos () const
| Get current position in the source stream (byte offset from the beginning of all input data). More...
FX_BOOL | IsEOF () const
| Detect EOF. More...
FX_BOOL | IsExhaustBuffer () const
| Indicate whether this filter exhausts the input buffer. More...
FX_BOOL | NeedNewSrc ()
| Indicate whether this filter needs to input new src data. More...
void | ResetStatistics ()
| Reset statistics. More...
void | SetDestFilter (CFX_DataFilter *pFilter)
| Set destination filter. Note the filter will be appended to the end of current filter chain. More...

## Detailed Description

Base class for data filters. A data filter takes some input data and outputs to another filter, or the final destination buffer.

## Member Function Documentation

## ◆ Abort()

FX_BOOL CFX_DataFilter::Abort | ( |  | ) | const
| inline

Indicate whether to abort the filter process.

Returns
  true means to abort, while false means not.

## ◆ AbortAll()

FX_BOOL CFX_DataFilter::AbortAll | ( |  | ) |

Indicate whether to abort the filter process, including all dest filter.

Returns
  true means to abort, while false means not.

## ◆ FilterFinish()

void CFX_DataFilter::FilterFinish | ( | CFX_BinaryBuf & | dest_buf | ) |

Indicate the input finished. For some filters, there might be some last output generated.

Parameters

  [out] | dest_buf | It receives the output data.

Returns
  None.

## ◆ FilterIn()

void CFX_DataFilter::FilterIn | ( | FX_LPCBYTE | src_buf,
|  | size_t | src_size,
|  | CFX_BinaryBuf & | dest_buf
| ) |  |

Input a data block to the filter (and its filter chain), and receive the final output.

Parameters

  [in] | src_buf | The input data block.
  [in] | src_size | The size in bytes of the input data block.
  [out] | dest_buf | It receives the output data.

Returns
  None.

## ◆ GetSrcPos()

FX_INT64 CFX_DataFilter::GetSrcPos | ( |  | ) | const
| inline

Get current position in the source stream (byte offset from the beginning of all input data).

Returns
  The current position in the source stream.

## ◆ IsEOF()

FX_BOOL CFX_DataFilter::IsEOF | ( |  | ) | const
| inline

Detect EOF.

Returns
  true means it met EOF, while false means not yet.

## ◆ IsExhaustBuffer()

FX_BOOL CFX_DataFilter::IsExhaustBuffer | ( |  | ) | const
| inline

Indicate whether this filter exhausts the input buffer.

Returns
  true means input buffer is exhausted., while false means not.

## ◆ NeedNewSrc()

FX_BOOL CFX_DataFilter::NeedNewSrc | ( |  | ) |

Indicate whether this filter needs to input new src data.

Returns
  true means all filters exhaust the input buffer, while false means not.

## ◆ ResetStatistics()

void CFX_DataFilter::ResetStatistics | ( |  | ) |

Reset statistics.

Returns
  None.

## ◆ SetDestFilter()

void CFX_DataFilter::SetDestFilter | ( | CFX_DataFilter * | pFilter | ) |

Set destination filter. Note the filter will be appended to the end of current filter chain.

Parameters

  [in] | pFilter | The input data filter.

Returns
  None.