PoDoFo 1.2.0
Loading...
Searching...
No Matches
PoDoFo::InputStreamDevice Class Referenceabstract

This class represents an input device It optionally supports peeking. More...

#include <InputDevice.h>

Inheritance diagram for PoDoFo::InputStreamDevice:
PoDoFo::InputStream PoDoFo::PdfCanvasInputDevice PoDoFo::StreamDevice PoDoFo::NullStreamDevice

Public Member Functions

bool Peek (char &ch) const
 Peek at next char in stream.
Public Member Functions inherited from PoDoFo::InputStream
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.

Protected Member Functions

 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.
void resetBuffers () override
void enableReadWindow (const char *head, const char *tail)
 Enable the inline read window over the supplied memory region.
void disableReadWindow ()
 Disarm the read window, handing the logical position back to the device.
Protected Member Functions inherited from PoDoFo::InputStream
virtual size_t readBuffer (char *buffer, size_t size, bool &eof)=0
 Read a buffer from the stream.
virtual bool readChar (char &ch)
 Read the next char in stream.

Additional Inherited Members

Static Protected Member Functions inherited from PoDoFo::InputStream
static size_t ReadBuffer (InputStream &stream, char *buffer, size_t size, bool &eof)
 Read from another stream, to be used by decorator streams on their source.
static bool ReadChar (InputStream &stream, char &ch)
Protected Attributes inherited from PoDoFo::InputStream
const char * m_head
 Inline read window over memory that already holds the bytes at the current logical position.
const char * m_tail

Detailed Description

This class represents an input device It optionally supports peeking.

Member Function Documentation

◆ checkRead()

void InputStreamDevice::checkRead ( ) const
overrideprotectedvirtual

Optional checks before reading By default does nothing.

Reimplemented from PoDoFo::InputStream.

◆ Peek()

PODOFO_INLINE bool InputStreamDevice::Peek ( char & ch) const

Peek at next char in stream.

Returns
true if success, false if EOF is encountered before peeking the character

◆ peek()

virtual bool PoDoFo::InputStreamDevice::peek ( char & ch) const
protectedpure virtual

Peek at next char in stream.

Returns
true if success, false if EOF

Implemented in PoDoFo::NullStreamDevice, and PoDoFo::PdfCanvasInputDevice.


The documentation for this class was generated from the following files:
  • src/podofo/auxiliary/InputDevice.h
  • src/podofo/auxiliary/InputDevice.cpp