PoDoFo  1.0.0-dev
Public Member Functions | Protected Member Functions | List of all members
PoDoFo::PdfElement Class Reference

PdfElement is a common base class for all elements in a PDF file. More...

#include <PdfElement.h>

Inherited by PoDoFo::PdfArrayElement, and PoDoFo::PdfDictionaryElement.

Public Member Functions

PdfObjectGetObject ()
 Get access to the internal object. More...
 
const PdfObjectGetObject () const
 Get access to the internal object This is an overloaded member function. More...
 
PdfDocumentGetDocument () const
 

Protected Member Functions

 PdfElement (PdfObject &obj)
 
 PdfElement (PdfObject &obj, PdfDataType expectedDataType)
 Create a PdfElement from an existing PdfObject The object might be of any data type, PdfElement will throw an exception if the PdfObject if not of the same datatype as the expected one. More...
 
 PdfElement (const PdfElement &element)=default
 

Detailed Description

PdfElement is a common base class for all elements in a PDF file.

For example pages, action and annotations.

Every PDF element has one PdfObject and provides an easier interface to modify the contents of the dictionary.

A PdfElement base class can be created from an existing PdfObject or created from scratch. In the later case, the PdfElement creates a PdfObject and adds it to a vector of objects.

A PdfElement cannot be created directly. Use one of the subclasses which implement real functionality.

See also
PdfPage
PdfAction
PdfAnnotation

Constructor & Destructor Documentation

◆ PdfElement()

PdfElement::PdfElement ( PdfObject obj,
PdfDataType  expectedDataType 
)
protected

Create a PdfElement from an existing PdfObject The object might be of any data type, PdfElement will throw an exception if the PdfObject if not of the same datatype as the expected one.

This is necessary in rare cases. E.g. in PdfContents.

Parameters
objrefereence to the PdfObject that is modified by this PdfElement
expectedDataTypethe expected datatype of this object

Member Function Documentation

◆ GetObject() [1/2]

PdfObject& PoDoFo::PdfElement::GetObject ( )
inline

Get access to the internal object.

Returns
the internal PdfObject

◆ GetObject() [2/2]

const PdfObject& PoDoFo::PdfElement::GetObject ( ) const
inline

Get access to the internal object This is an overloaded member function.

Returns
the internal PdfObject

The documentation for this class was generated from the following files: