Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fpdf_scopers.h
Go to the documentation of this file.
1// Copyright 2018 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PUBLIC_CPP_FPDF_SCOPERS_H_
6#define PUBLIC_CPP_FPDF_SCOPERS_H_
7
8#include <memory>
9#include <type_traits>
10
11#include "public/cpp/fpdf_deleters.h"
12
13// Versions of FPDF types that clean up the object at scope exit.
14
15using ScopedFPDFAnnotation =
16 std::unique_ptr<std::remove_pointer<FPDF_ANNOTATION>::type,
17 FPDFAnnotationDeleter>;
18
19using ScopedFPDFAvail =
20 std::unique_ptr<std::remove_pointer<FPDF_AVAIL>::type, FPDFAvailDeleter>;
21
22using ScopedFPDFBitmap =
23 std::unique_ptr<std::remove_pointer<FPDF_BITMAP>::type, FPDFBitmapDeleter>;
24
25using ScopedFPDFClipPath =
26 std::unique_ptr<std::remove_pointer<FPDF_CLIPPATH>::type,
27 FPDFClipPathDeleter>;
28
29using ScopedFPDFDocument =
30 std::unique_ptr<std::remove_pointer<FPDF_DOCUMENT>::type,
31 FPDFDocumentDeleter>;
32
33using ScopedFPDFFont =
34 std::unique_ptr<std::remove_pointer<FPDF_FONT>::type, FPDFFontDeleter>;
35
36using ScopedFPDFFormHandle =
37 std::unique_ptr<std::remove_pointer<FPDF_FORMHANDLE>::type,
38 FPDFFormHandleDeleter>;
39
40using ScopedFPDFJavaScriptAction =
41 std::unique_ptr<std::remove_pointer<FPDF_JAVASCRIPT_ACTION>::type,
42 FPDFJavaScriptActionDeleter>;
43
44using ScopedFPDFPage =
45 std::unique_ptr<std::remove_pointer<FPDF_PAGE>::type, FPDFPageDeleter>;
46
47using ScopedFPDFPageLink =
48 std::unique_ptr<std::remove_pointer<FPDF_PAGELINK>::type,
49 FPDFPageLinkDeleter>;
50
51using ScopedFPDFPageObject =
52 std::unique_ptr<std::remove_pointer<FPDF_PAGEOBJECT>::type,
53 FPDFPageObjectDeleter>;
54
55using ScopedFPDFStructTree =
56 std::unique_ptr<std::remove_pointer<FPDF_STRUCTTREE>::type,
57 FPDFStructTreeDeleter>;
58
59using ScopedFPDFTextFind =
60 std::unique_ptr<std::remove_pointer<FPDF_SCHHANDLE>::type,
61 FPDFTextFindDeleter>;
62
63using ScopedFPDFTextPage =
64 std::unique_ptr<std::remove_pointer<FPDF_TEXTPAGE>::type,
65 FPDFTextPageDeleter>;
66
67#endif // PUBLIC_CPP_FPDF_SCOPERS_H_
FX_DOWNLOADHINTS * GetDownloadHints() const
FX_FILEAVAIL * GetFileAvail() const
FPDF_FILEACCESS * GetFileAccess() const
TEST_F(CPDF_CreatorEmbedderTest, SavedDocsAreEqualAfterParse)
#define PDF_DATA_AVAIL
#define FPDF_ANNOT
Definition fpdfview.h:790