pdfmm 0.9.20
Public Member Functions | List of all members
mm::PdfCanvasInputDevice Class Reference

#include <PdfCanvasInputDevice.h>

Inheritance diagram for mm::PdfCanvasInputDevice:
mm::PdfInputDevice

Public Member Functions

bool TryGetChar (char &ch) override
 
size_t Tell () override
 
int Look () override
 
size_t Read (char *buffer, size_t size) override
 
bool Eof () const override
 
bool IsSeekable () const override
 
- Public Member Functions inherited from mm::PdfInputDevice
 PdfInputDevice (const std::string_view &filename)
 
 PdfInputDevice (const char *buffer, size_t len)
 
 PdfInputDevice (std::istream &stream)
 
virtual ~PdfInputDevice ()
 
virtual void Close ()
 
virtual size_t Tell ()
 
int GetChar ()
 
virtual bool TryGetChar (char &ch)
 
virtual int Look ()
 
void Seek (std::streamoff off, std::ios_base::seekdir dir=std::ios_base::beg)
 
virtual size_t Read (char *buffer, size_t size)
 
virtual bool Eof () const
 
virtual bool IsSeekable () const
 

Detailed Description

There are Pdfs spanning delimiters or begin/end tags into contents streams. Let's create a device correctly spanning I/O reads into these

Member Function Documentation

◆ Eof()

bool mm::PdfCanvasInputDevice::Eof ( ) const
inlineoverridevirtual
Returns
True if the stream is at EOF

Reimplemented from mm::PdfInputDevice.

◆ IsSeekable()

bool mm::PdfCanvasInputDevice::IsSeekable ( ) const
inlineoverridevirtual
Returns
True if the stream is seekable

Reimplemented from mm::PdfInputDevice.

◆ Look()

int PdfCanvasInputDevice::Look ( )
overridevirtual

Peek at next char in stream. /returns the next char in the stream

Reimplemented from mm::PdfInputDevice.

◆ Read()

size_t PdfCanvasInputDevice::Read ( char *  buffer,
size_t  size 
)
overridevirtual

Read a certain number of bytes from the input device.

Parameters
bufferstore bytes in this buffer. The buffer has to be large enough.
sizenumber of bytes to read.
Returns
the number of bytes that have been read. 0 if the device reached eof

Reimplemented from mm::PdfInputDevice.

◆ Tell()

size_t PdfCanvasInputDevice::Tell ( )
overridevirtual

Get the current position in file. /returns the current position in the file

Reimplemented from mm::PdfInputDevice.

◆ TryGetChar()

bool PdfCanvasInputDevice::TryGetChar ( char &  ch)
overridevirtual

Get next char from stream.

Returns
the next character from the stream

Reimplemented from mm::PdfInputDevice.