PoDoFo
0.9.6
|
#include <PdfInputDevice.h>
Public Member Functions | |
PdfInputDevice (const char *pszFilename) | |
PdfInputDevice (const char *pBuffer, size_t lLen) | |
PdfInputDevice (const std::istream *pInStream) | |
virtual | ~PdfInputDevice () |
virtual void | Close () |
virtual std::streamoff | Tell () const |
virtual int | GetChar () const |
virtual int | Look () const |
virtual void | Seek (std::streamoff off, std::ios_base::seekdir dir=std::ios_base::beg) |
virtual std::streamoff | Read (char *pBuffer, std::streamsize lLen) |
virtual PODOFO_NOTHROW bool | Eof () const |
virtual PODOFO_NOTHROW bool | Bad () const |
virtual PODOFO_NOTHROW void | Clear (std::ios_base::iostate state=std::ios_base::goodbit) const |
PODOFO_NOTHROW bool | IsSeekable () const |
Protected Member Functions | |
PODOFO_NOTHROW void | SetSeekable (bool bIsSeekable) |
PdfInputDevice () | |
This class provides an Input device which operates either on a file, a buffer in memory or any arbitrary std::istream
This class is suitable for inheritance to provide input devices of your own for PoDoFo. Just override the required virtual methods.
PoDoFo::PdfInputDevice::PdfInputDevice | ( | const char * | pszFilename | ) |
Construct a new PdfInputDevice that reads all data from a file.
pszFilename | path to a file that will be opened and all data is read from this file. |
PoDoFo::PdfInputDevice::PdfInputDevice | ( | const char * | pBuffer, |
size_t | lLen | ||
) |
Construct a new PdfInputDevice that reads all data from a memory buffer. The buffer will not be owned by this object - it is COPIED.
pBuffer | a buffer in memory |
lLen | the length of the buffer in memory |
PoDoFo::PdfInputDevice::PdfInputDevice | ( | const std::istream * | pInStream | ) |
Construct a new PdfInputDevice that reads all data from a std::istream.
pInStream | read from this std::istream |
|
virtual |
Destruct the PdfInputDevice object and close any open files.
|
protected |
CAN NOT Construct a new PdfInputDevice without an input source. However subclasses may well need to do just that.
|
inlinevirtual |
|
inlinevirtual |
Set the stream error state. By default, clears badbit, eofbit and failbit.
|
virtual |
Close the input device. No further operations may be performed on this device after calling this function.
|
inlinevirtual |
|
virtual |
Get next char from stream.
|
inline |
|
virtual |
Peek at next char in stream. /returns the next char in the stream
|
virtual |
Read a certain number of bytes from the input device.
pBuffer | store bytes in this buffer. The buffer has to be large enough. |
lLen | number of bytes to read. |
|
virtual |
Seek the device to the position offset from the beginning
off | from the beginning of the file |
dir | where to start (start, cur, end) |
A non-seekable input device will throw an InvalidDeviceOperation.
|
inlineprotected |
Control whether or or not this stream is flagged seekable.
|
virtual |
Get the current position in file. /returns the current position in the file