#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 is suitable for inheritance to provide input devices of your own for PoDoFo. Just overide 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 |
PoDoFo::PdfInputDevice::~PdfInputDevice | ( | ) | [virtual] |
Destruct the PdfInputDevice object and close any open files.
PoDoFo::PdfInputDevice::PdfInputDevice | ( | ) | [protected] |
CAN NOT Construct a new PdfInputDevice without an input source. However subclasses may well need to do just that.
bool PoDoFo::PdfInputDevice::Bad | ( | ) | const [inline, virtual] |
void PoDoFo::PdfInputDevice::Clear | ( | std::ios_base::iostate | state = std::ios_base::goodbit |
) | const [inline, virtual] |
Set the stream error state. By default, clears badbit, eofbit and failbit.
void PoDoFo::PdfInputDevice::Close | ( | ) | [virtual] |
Close the input device. No further operations may be performed on this device after calling this function.
bool PoDoFo::PdfInputDevice::Eof | ( | ) | const [inline, virtual] |
int PoDoFo::PdfInputDevice::GetChar | ( | ) | const [virtual] |
Get next char from stream.
bool PoDoFo::PdfInputDevice::IsSeekable | ( | ) | const [inline] |
int PoDoFo::PdfInputDevice::Look | ( | ) | const [virtual] |
Peek at next char in stream. /returns the next char in the stream
std::streamoff PoDoFo::PdfInputDevice::Read | ( | char * | pBuffer, | |
std::streamsize | lLen | |||
) | [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. |
void PoDoFo::PdfInputDevice::Seek | ( | std::streamoff | off, | |
std::ios_base::seekdir | dir = std::ios_base::beg | |||
) | [virtual] |
Seek the device to the position offset from the begining
off | from the beginning of the file | |
dir | where to start (start, cur, end) |
void PoDoFo::PdfInputDevice::SetSeekable | ( | bool | bIsSeekable | ) | [inline, protected] |
Control whether or or not this stream is flagged seekable.
std::streamoff PoDoFo::PdfInputDevice::Tell | ( | ) | const [virtual] |
Get the current position in file. /returns the current position in the file