All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::Filters::MemoryFilter Class Reference

#include <MemoryFilter.h>

+ Inheritance diagram for pdftron::Filters::MemoryFilter:

Public Member Functions

 MemoryFilter (size_t buf_sz, bool is_input)
 
UCharGetBuffer ()
 
void SetAsInputFilter ()
 
- Public Member Functions inherited from pdftron::Filters::Filter
 Filter ()
 
 ~Filter ()
 
 Filter (const Filter &copy)
 
Filteroperator= (const Filter &other)
 
 operator bool ()
 
void AttachFilter (Filter attach_filter)
 
Filter ReleaseAttachedFilter ()
 
Filter GetAttachedFilter ()
 
Filter GetSourceFilter ()
 
const char * GetName () const
 
const char * GetDecodeName () const
 
UCharBegin ()
 
size_t Size ()
 
void Consume (size_t num_bytes)
 
size_t Count ()
 
size_t SetCount (size_t new_count)
 
void SetStreamLength (size_t bytes)
 
void Flush ()
 
void FlushAll ()
 
bool IsInputFilter ()
 
bool CanSeek ()
 
void Seek (ptrdiff_t offset, ReferencePos origin)
 
ptrdiff_t Tell ()
 
Filter CreateInputIterator ()
 
const UString GetFilePath () const
 
void Destroy ()
 
void WriteToFile (const UString &path, bool append)
 

Additional Inherited Members

- Public Types inherited from pdftron::Filters::Filter
enum  ReferencePos { e_begin = SEEK_SET, e_end = SEEK_END, e_cur = SEEK_CUR }
 

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).

Definition at line 22 of file MemoryFilter.h.

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.

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