PoDoFo
1.0.0-dev
|
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. More...
#include <PdfReference.h>
Public Member Functions | |
PdfReference () | |
Create a PdfReference with object number and generation number initialized to 0. | |
PdfReference (const uint32_t objectNo, const uint16_t generationNo) | |
Create a PdfReference to an object with a given object and generation number. More... | |
PdfReference (const PdfReference &rhs)=default | |
Create a copy of an existing PdfReference. More... | |
PdfReference & | operator= (const PdfReference &rhs)=default |
Assign the value of another object to this PdfReference. More... | |
void | Write (OutputStream &stream, PdfWriteFlags flags, const PdfStatefulEncrypt *encrypt, charbuff &buffer) const |
bool | operator== (const PdfReference &rhs) const |
Compare to PdfReference objects. More... | |
bool | operator!= (const PdfReference &rhs) const |
Compare to PdfReference objects. More... | |
bool | operator< (const PdfReference &rhs) const |
Compare to PdfReference objects. More... | |
bool | IsIndirect () const |
Allows to check if a reference points to an indirect object. More... | |
void | SetObjectNumber (uint32_t o) |
Set the object number of this object. More... | |
uint32_t | ObjectNumber () const |
Get the object number. More... | |
void | SetGenerationNumber (const uint16_t g) |
Set the generation number of this object. More... | |
uint16_t | GenerationNumber () const |
Get the generation number. More... | |
Public Member Functions inherited from PoDoFo::PdfDataProvider< PdfReference > | |
std::string | ToString (PdfWriteFlags flags=PdfWriteFlags::None) const |
Converts the current object into a string representation which can be written directly to a PDF file on disc. More... | |
void | ToString (std::string &str, PdfWriteFlags flags=PdfWriteFlags::None) const |
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 identified this way.
This class is a indirect reference in a PDF file.
PdfReference::PdfReference | ( | const uint32_t | objectNo, |
const uint16_t | generationNo | ||
) |
Create a PdfReference to an object with a given object and generation number.
nObjectNo | the object number |
nGenerationNo | the generation number |
|
default |
Create a copy of an existing PdfReference.
rhs | the object to copy |
|
inline |
Get the generation number.
bool PdfReference::IsIndirect | ( | ) | const |
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.
|
inline |
Get the object number.
bool PdfReference::operator!= | ( | const PdfReference & | rhs | ) | const |
Compare to PdfReference objects.
bool PdfReference::operator< | ( | const PdfReference & | rhs | ) | const |
Compare to PdfReference objects.
|
default |
Assign the value of another object to this PdfReference.
rhs | the object to copy |
bool PdfReference::operator== | ( | const PdfReference & | rhs | ) | const |
Compare to PdfReference objects.
|
inline |
Set the generation number of this object.
g | the new generation number |
|
inline |
Set the object number of this object.
o | the new object number |