/src/qpdf/include/qpdf/QPDFDocumentHelper.hh
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) 2005-2021 Jay Berkenbilt |
2 | | // Copyright (c) 2022-2025 Jay Berkenbilt and Manfred Holger |
3 | | // |
4 | | // This file is part of qpdf. |
5 | | // |
6 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
7 | | // in compliance with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
12 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
13 | | // or implied. See the License for the specific language governing permissions and limitations under |
14 | | // the License. |
15 | | // |
16 | | // Versions of qpdf prior to version 7 were released under the terms of version 2.0 of the Artistic |
17 | | // License. At your option, you may continue to consider qpdf to be licensed under those terms. |
18 | | // Please see the manual for additional information. |
19 | | |
20 | | #ifndef QPDFDOCUMENTHELPER_HH |
21 | | #define QPDFDOCUMENTHELPER_HH |
22 | | |
23 | | #include <qpdf/DLL.h> |
24 | | #include <qpdf/QPDF.hh> |
25 | | |
26 | | // This is a base class for QPDF Document Helper classes. Document helpers are classes that provide |
27 | | // a convenient, higher-level API for accessing document-level structures within a PDF file. |
28 | | // Document helpers are always initialized with a reference to a QPDF object, and the object can |
29 | | // always be retrieved. The intention is that you may freely intermix use of document helpers with |
30 | | // the underlying QPDF object unless there is a specific comment in a specific helper method that |
31 | | // says otherwise. The pattern of using helper objects was introduced to allow creation of higher |
32 | | // level helper functions without polluting the public interface of QPDF. |
33 | | class QPDF_DLL_CLASS QPDFDocumentHelper |
34 | | { |
35 | | public: |
36 | | QPDFDocumentHelper(QPDF& qpdf) : |
37 | 100k | qpdf(qpdf) |
38 | 100k | { |
39 | 100k | } |
40 | | QPDF_DLL |
41 | | virtual ~QPDFDocumentHelper(); |
42 | | QPDF& |
43 | | getQPDF() |
44 | 0 | { |
45 | 0 | return qpdf; |
46 | 0 | } |
47 | | QPDF const& |
48 | | getQPDF() const |
49 | 0 | { |
50 | 0 | return qpdf; |
51 | 0 | } |
52 | | |
53 | | protected: |
54 | | QPDF& qpdf; |
55 | | }; |
56 | | |
57 | | #endif // QPDFDOCUMENTHELPER_HH |