![]() |
#include <FilterWriter.h>
Public Member Functions | |
FilterWriter () | |
FilterWriter (Filter &filter) | |
~FilterWriter () | |
void | WriteUChar (UChar ch) |
Write a single character to the output stream. | |
void | WriteInt (Int16 num) |
Write an integer to the output stream. | |
void | WriteInt (UInt16 num) |
void | WriteInt (Int32 num) |
void | WriteInt (UInt32 num) |
void | WriteInt (Int64 num) |
void | WriteInt (UInt64 num) |
void | WriteString (const std::string &str) |
Write a string to the output stream. | |
void | WriteString (const char *str) |
Write a null terminated string. | |
void | WriteFilter (FilterReader &reader) |
Write the entire input stream to the output stream (i.e. | |
void | WriteLine (const char *line, char eol=0x0D) |
Write out a null terminated 'line' followed by a end of line character default end of line character is carriage return. | |
size_t | WriteBuffer (const char *buf, size_t buf_size) |
void | AttachFilter (Filter &filter) |
Attaches a filter to the this FilterWriter. | |
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 outfile("file.dat", StdFile::e_write_mode); FilterWriter fwriter(outfile); fwriter.WriteBuffer(buf, buf_sz); fwriter.Flush();
pdftron::Filters::FilterWriter::FilterWriter | ( | ) |
pdftron::Filters::FilterWriter::FilterWriter | ( | Filter & | filter | ) |
pdftron::Filters::FilterWriter::~FilterWriter | ( | ) |
void pdftron::Filters::FilterWriter::WriteUChar | ( | UChar | ch | ) |
Write a single character to the output stream.
ch | An unsigned character to write to the output stream. |
void pdftron::Filters::FilterWriter::WriteInt | ( | Int16 | num | ) |
Write an integer to the output stream.
num | An integer to write to the output stream. |
void pdftron::Filters::FilterWriter::WriteInt | ( | UInt16 | num | ) |
void pdftron::Filters::FilterWriter::WriteInt | ( | Int32 | num | ) |
void pdftron::Filters::FilterWriter::WriteInt | ( | UInt32 | num | ) |
void pdftron::Filters::FilterWriter::WriteInt | ( | Int64 | num | ) |
void pdftron::Filters::FilterWriter::WriteInt | ( | UInt64 | num | ) |
void pdftron::Filters::FilterWriter::WriteString | ( | const std::string & | str | ) |
Write a string to the output stream.
str | A string to write to the output stream. |
void pdftron::Filters::FilterWriter::WriteString | ( | const char * | str | ) |
Write a null terminated string.
str | A terminated string string to write to the output stream. |
void pdftron::Filters::FilterWriter::WriteFilter | ( | FilterReader & | reader | ) |
Write the entire input stream to the output stream (i.e.
to this FilterWriter).
reader | A FilterReader attached to an input stream. |
void pdftron::Filters::FilterWriter::WriteLine | ( | const char * | line, | |
char | eol = 0x0D | |||
) |
Write out a null terminated 'line' followed by a end of line character default end of line character is carriage return.
size_t pdftron::Filters::FilterWriter::WriteBuffer | ( | const char * | buf, | |
size_t | buf_size | |||
) |
void pdftron::Filters::FilterWriter::AttachFilter | ( | Filter & | filter | ) |
Attaches a filter to the this FilterWriter.
Filter pdftron::Filters::FilterWriter::GetAttachedFilter | ( | ) |
void pdftron::Filters::FilterWriter::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::FilterWriter::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::FilterWriter::Count | ( | ) |
void pdftron::Filters::FilterWriter::Flush | ( | ) |
Forces any data remaining in the buffer to be written to input or output filter.
void pdftron::Filters::FilterWriter::FlushAll | ( | ) |
Forces any data remaining in the filter chain to the source or destination.