PoDoFo 0.7.0
Public Member Functions

PoDoFo::PdfRefCountedInputDevice Class Reference

#include <PdfRefCountedInputDevice.h>

List of all members.

Public Member Functions

 PdfRefCountedInputDevice ()
 PdfRefCountedInputDevice (const char *pszFilename, const char *pszMode)
 PdfRefCountedInputDevice (const char *pBuffer, size_t lLen)
 PdfRefCountedInputDevice (PdfInputDevice *pDevice)
 PdfRefCountedInputDevice (const PdfRefCountedInputDevice &rhs)
 ~PdfRefCountedInputDevice ()
PODOFO_NOTHROW PdfInputDeviceDevice () const
const PdfRefCountedInputDeviceoperator= (const PdfRefCountedInputDevice &rhs)

Detailed Description

A reference counted input device object which is closed as soon as the last object having access to it is deleted.


Constructor & Destructor Documentation

PoDoFo::PdfRefCountedInputDevice::PdfRefCountedInputDevice ( )

Created an empty reference counted input device object The input device will be initialize to NULL

PoDoFo::PdfRefCountedInputDevice::PdfRefCountedInputDevice ( const char *  pszFilename,
const char *  pszMode 
)

Create a new PdfRefCountedInputDevice which reads from a file. The file is opened using fopen()

Parameters:
pszFilenamea filename to be passed to fopen
pszModea mode string that can be passed to fopen
PoDoFo::PdfRefCountedInputDevice::PdfRefCountedInputDevice ( const char *  pBuffer,
size_t  lLen 
)

Create a new PdfRefCountedInputDevice which operates on a in memory buffer

Parameters:
pBufferpointer to the buffer
lLenlength of the buffer
PoDoFo::PdfRefCountedInputDevice::PdfRefCountedInputDevice ( PdfInputDevice pDevice)

Create a new PdfRefCountedInputDevice from an PdfInputDevice

Parameters:
pDevicethe input device. It will be owned and deleted by this object.
PoDoFo::PdfRefCountedInputDevice::PdfRefCountedInputDevice ( const PdfRefCountedInputDevice rhs)

Copy an existing PdfRefCountedFile and increase the reference count

Parameters:
rhsthe PdfRefCountedFile to copy
PoDoFo::PdfRefCountedInputDevice::~PdfRefCountedInputDevice ( )

Decrease the reference count and close the file if this is the last owner


Member Function Documentation

PdfInputDevice * PoDoFo::PdfRefCountedInputDevice::Device ( ) const [inline]

Get access to the file handle

Returns:
the file handle
const PdfRefCountedInputDevice & PoDoFo::PdfRefCountedInputDevice::operator= ( const PdfRefCountedInputDevice rhs)

Copy an existing PdfRefCountedFile and increase the reference count

Parameters:
rhsthe PdfRefCountedFile to copy
Returns:
the copied object