PoDoFo 1.0.0-dev
|
This class provides an output device which operates either on a file or on a buffer in memory. More...
#include <StreamDevice.h>
Protected Member Functions | |
StreamDevice (DeviceAccess access) | |
![]() | |
InputStreamDevice (bool init) | |
virtual bool | peek (char &ch) const =0 |
Peek at next char in stream. | |
void | checkRead () const override |
Optional checks before reading By default does nothing. | |
![]() | |
virtual size_t | readBuffer (char *buffer, size_t size, bool &eof)=0 |
Read a buffer from the stream /param eof true if the stream reached eof during read /returns number of read bytes. | |
virtual bool | readChar (char &ch) |
Read the next char in stream. | |
Static Protected Member Functions | |
static size_t | SeekPosition (size_t curpos, size_t devlen, ssize_t offset, SeekDirection direction) |
![]() | |
static size_t | ReadBuffer (InputStream &stream, char *buffer, size_t size, bool &eof) |
static bool | ReadChar (InputStream &stream, char &ch) |
Additional Inherited Members | |
![]() | |
bool | Peek (char &ch) const |
Peek at next char in stream. | |
![]() | |
void | Read (char *buffer, size_t size) |
Read data from the device. | |
size_t | Read (char *buffer, size_t size, bool &eof) |
Read data from the device. | |
char | ReadChar () |
Get next char from stream. | |
bool | Read (char &ch) |
Get next char from stream. | |
void | CopyTo (OutputStream &stream) |
Copy this stream to another. | |
void | CopyTo (OutputStream &stream, size_t size) |
Copy this stream to another. | |
This class provides an output device which operates either on a file or on a buffer in memory.
Additionally it can count the bytes written to the device.
This class is suitable for inheritance to provide output devices of your own. Just override the required virtual methods.