pdftron::Filters::MemoryFilter Class Reference

MemoryFilter is a memory buffer that can be used as a source or a sink Filter in the Filter pipeline. More...

#include <MemoryFilter.h>

Inheritance diagram for pdftron::Filters::MemoryFilter:

Inheritance graph
[legend]
Collaboration diagram for pdftron::Filters::MemoryFilter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MemoryFilter (size_t buf_sz, bool is_input)
UCharGetBuffer ()
void SetAsInputFilter ()


Detailed Description

MemoryFilter is a memory buffer that can be used as a source or a sink Filter in the Filter pipeline.

When a MemoryFilter is the source, other filters can read data stored in memory; When MemoryFilter is a sink, other filters generate data which is then pushed in a memory buffer owned by MemoryFilter (MemoryFilter makes sure that there is enough space to accommodate all data).


Constructor & Destructor Documentation

pdftron::Filters::MemoryFilter::MemoryFilter ( size_t  buf_sz,
bool  is_input 
)


Member Function Documentation

UChar* pdftron::Filters::MemoryFilter::GetBuffer (  ) 

Note:
MemoryFilter specific function.
Returns:
a pointer to the beginning of the buffer. Use method Count() to determine the number of bytes written to or read from MemoryFilter.

void pdftron::Filters::MemoryFilter::SetAsInputFilter (  ) 

Note:
MemoryFilter specific function used to change filter mode from output to input. The utility function is useful in cases when and output data buffer should be converted to an input stream.

The function has no effect on an input MemoryFilter.


© 2002-2010 PDFTron Systems Inc.