PoDoFo 0.9.1
Public Member Functions
PoDoFo::PdfReference Class Reference

#include <PdfReference.h>

Inheritance diagram for PoDoFo::PdfReference:
PoDoFo::PdfDataType

List of all members.

Public Member Functions

 PdfReference ()
 PdfReference (const pdf_objnum nObjectNo, const pdf_gennum nGenerationNo)
 PdfReference (const PdfReference &rhs)
const std::string ToString () const
PODOFO_NOTHROW const PdfReferenceoperator= (const PdfReference &rhs)
void Write (PdfOutputDevice *pDevice, EPdfWriteMode eWriteMode, const PdfEncrypt *pEncrypt=NULL) const
PODOFO_NOTHROW bool operator== (const PdfReference &rhs) const
PODOFO_NOTHROW bool operator!= (const PdfReference &rhs) const
PODOFO_NOTHROW bool operator< (const PdfReference &rhs) const
PODOFO_NOTHROW void SetObjectNumber (pdf_objnum o)
PODOFO_NOTHROW pdf_objnum ObjectNumber () const
PODOFO_NOTHROW void SetGenerationNumber (const pdf_gennum g)
PODOFO_NOTHROW pdf_gennum GenerationNumber () const
PODOFO_NOTHROW bool IsIndirect () const

Detailed Description

A reference is a pointer to a object in the PDF file of the form "4 0 R", where 4 is the object number and 0 is the generation number. Every object in the PDF file can be indetified this way.

This class is a indirect reference in a PDF file.


Constructor & Destructor Documentation

PoDoFo::PdfReference::PdfReference ( ) [inline]

Create a PdfReference with object number and generation number initialized to 0.

PoDoFo::PdfReference::PdfReference ( const pdf_objnum  nObjectNo,
const pdf_gennum  nGenerationNo 
) [inline]

Create a PdfReference to an object with a given object and generation number.

Parameters:
nObjectNothe object number
nGenerationNothe generation number
PoDoFo::PdfReference::PdfReference ( const PdfReference rhs) [inline]

Create a copy of an existing PdfReference.

Parameters:
rhsthe object to copy

Member Function Documentation

pdf_gennum PoDoFo::PdfReference::GenerationNumber ( ) const [inline]

Get the generation number.

Returns:
the generation number of this PdfReference
bool PoDoFo::PdfReference::IsIndirect ( ) const [inline]

Allows to check if a reference points to an indirect object.

A reference is indirect if object number and generation number are both not equal 0.

Returns:
true if this reference is the reference of an indirect object.
pdf_objnum PoDoFo::PdfReference::ObjectNumber ( ) const [inline]

Get the object number.

Returns:
the object number of this PdfReference
bool PoDoFo::PdfReference::operator!= ( const PdfReference rhs) const [inline]

Compare to PdfReference objects.

Returns:
false if both reference the same object
bool PoDoFo::PdfReference::operator< ( const PdfReference rhs) const [inline]

Compare to PdfReference objects.

Returns:
true if this reference has a smaller object and generation number
const PdfReference & PoDoFo::PdfReference::operator= ( const PdfReference rhs) [inline]

Assign the value of another object to this PdfReference.

Parameters:
rhsthe object to copy
bool PoDoFo::PdfReference::operator== ( const PdfReference rhs) const [inline]

Compare to PdfReference objects.

Returns:
true if both reference the same object
void PoDoFo::PdfReference::SetGenerationNumber ( const pdf_gennum  g) [inline]

Set the generation number of this object

Parameters:
gthe new generation number
void PoDoFo::PdfReference::SetObjectNumber ( pdf_objnum  o) [inline]

Set the object number of this object

Parameters:
othe new object number
const std::string PoDoFo::PdfReference::ToString ( ) const

Convert the reference to a string.

Returns:
a string representation of the object.
See also:
PdfVariant::ToString
void PoDoFo::PdfReference::Write ( PdfOutputDevice pDevice,
EPdfWriteMode  eWriteMode,
const PdfEncrypt pEncrypt = NULL 
) const [virtual]

Write the complete variant to an output device. This is an overloaded member function.

Parameters:
pDevicewrite the object to this device
eWriteModeadditional options for writing this object
pEncryptan encryption object which is used to encrypt this object or NULL to not encrypt this object

Implements PoDoFo::PdfDataType.