PoDoFo 1.0.0-dev
Loading...
Searching...
No Matches
PdfElement.h
1
7#ifndef PDF_ELEMENT_H
8#define PDF_ELEMENT_H
9
10#include "PdfObject.h"
11
12namespace PoDoFo {
13
29class PODOFO_API PdfElement
30{
31public:
32
33 virtual ~PdfElement();
34
38 inline PdfObject& GetObject() { return *m_Object; }
39
45 inline const PdfObject& GetObject() const { return *m_Object; }
46
47 PdfDocument& GetDocument() const;
48
49protected:
51
63
64 PdfElement(const PdfElement& element) = default;
65
66private:
67 PdfElement& operator=(const PdfElement& element) = delete;
68
69private:
70 PdfObject* m_Object;
71};
72
73class PODOFO_API PdfDictionaryElement : public PdfElement
74{
75protected:
81 PdfDictionaryElement(PdfDocument& parent,
82 const PdfName& type = PdfName::Null,
83 const PdfName& subtype = PdfName::Null);
84
91 PdfDictionaryElement(PdfObject& obj);
92
93 PdfDictionaryElement(const PdfDictionaryElement& element) = default;
94
95public:
96 PdfDictionary& GetDictionary();
97 const PdfDictionary& GetDictionary() const;
98};
99
100class PODOFO_API PdfArrayElement : public PdfElement
101{
102protected:
106 PdfArrayElement(PdfDocument& parent);
107
114 PdfArrayElement(PdfObject& obj);
115
116 PdfArrayElement(const PdfArrayElement& element) = default;
117
118public:
119 PdfArray& GetArray();
120 const PdfArray& GetArray() const;
121};
122
123};
124
125#endif // PDF_ELEMENT_H
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:111
PdfElement is a common base class for all elements in a PDF file.
Definition PdfElement.h:30
PdfObject & GetObject()
Get access to the internal object.
Definition PdfElement.h:38
const PdfObject & GetObject() const
Get access to the internal object This is an overloaded member function.
Definition PdfElement.h:45
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:35
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:38
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition basetypes.h:16
PdfDataType
Every PDF datatype that can occur in a PDF file is referenced by an own enum (e.g.
Definition PdfDeclarations.h:167