![]() |
#include <FilterReader.h>
Public Member Functions | |
FilterReader () | |
FilterReader (Filter &filter) | |
~FilterReader () | |
int | Get () |
int | Peek () |
size_t | Read (UChar *buf, size_t buf_size) |
void | AttachFilter (Filter &filter) |
Attaches a filter to the this FilterReader. | |
Filter | GetAttachedFilter () |
void | Seek (ptrdiff_t offset, Filter::ReferencePos origin) |
Sets the position within the current stream. | |
ptrdiff_t | Tell () |
Reports the current read position in the stream relative to the stream origin. | |
size_t | Count () |
void | Flush () |
Forces any data remaining in the buffer to be written to input or output filter. | |
void | FlushAll () |
Forces any data remaining in the filter chain to the source or destination. |
For example:
StdFile file("my_stream.txt", StdFile::e_read_mode); FilterReader reader(file); while (reader.Read(...)) ...
pdftron::Filters::FilterReader::FilterReader | ( | ) |
pdftron::Filters::FilterReader::FilterReader | ( | Filter & | filter | ) |
pdftron::Filters::FilterReader::~FilterReader | ( | ) |
int pdftron::Filters::FilterReader::Get | ( | ) |
int pdftron::Filters::FilterReader::Peek | ( | ) |
size_t pdftron::Filters::FilterReader::Read | ( | UChar * | buf, | |
size_t | buf_size | |||
) |
void pdftron::Filters::FilterReader::AttachFilter | ( | Filter & | filter | ) |
Attaches a filter to the this FilterReader.
Filter pdftron::Filters::FilterReader::GetAttachedFilter | ( | ) |
void pdftron::Filters::FilterReader::Seek | ( | ptrdiff_t | offset, | |
Filter::ReferencePos | origin | |||
) |
Sets the position within the current stream.
offset | - A byte offset relative to origin. If offset is negative, the new position will precede the position specified by origin by the number of bytes specified by offset. If offset is zero, the new position will be the position specified by origin. If offset is positive, the new position will follow the position specified by origin by the number of bytes specified by offset. | |
origin | - A value of type ReferencePos indicating the reference point used to obtain the new position |
- | throws an exception if the method is not implemented in the associated filter. |
ptrdiff_t pdftron::Filters::FilterReader::Tell | ( | ) |
Reports the current read position in the stream relative to the stream origin.
- | throws an exception if the method is not implemented in the associated filter. |
size_t pdftron::Filters::FilterReader::Count | ( | ) |
void pdftron::Filters::FilterReader::Flush | ( | ) |
Forces any data remaining in the buffer to be written to input or output filter.
void pdftron::Filters::FilterReader::FlushAll | ( | ) |
Forces any data remaining in the filter chain to the source or destination.