Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cpdf_nametree.h
Go to the documentation of this file.
1
// Copyright 2016 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
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FPDFDOC_CPDF_NAMETREE_H_
8
#
define
CORE_FPDFDOC_CPDF_NAMETREE_H_
9
10
#
include
<
stddef
.
h
>
11
12
#
include
<
memory
>
13
14
#
include
"core/fxcrt/fx_string.h"
15
#
include
"core/fxcrt/retain_ptr.h"
16
17
class
CPDF_Array
;
18
class
CPDF_Dictionary
;
19
class
CPDF_Document
;
20
class
CPDF_Object
;
21
22
class
CPDF_NameTree
{
23
public
:
24
CPDF_NameTree
(
const
CPDF_NameTree
&) =
delete
;
25
CPDF_NameTree
&
operator
=(
const
CPDF_NameTree
&) =
delete
;
26
~
CPDF_NameTree
();
27
28
static
std
::
unique_ptr
<
CPDF_NameTree
>
Create
(
CPDF_Document
* pDoc,
29
const
ByteString
& category);
30
31
// If necessary, create missing Names dictionary in |pDoc|, and/or missing
32
// Names array in the dictionary that corresponds to |category|, if necessary.
33
// Returns nullptr on failure.
34
static
std
::
unique_ptr
<
CPDF_NameTree
>
CreateWithRootNameArray
(
35
CPDF_Document
* pDoc,
36
const
ByteString
& category);
37
38
static
std
::
unique_ptr
<
CPDF_NameTree
>
CreateForTesting
(
39
CPDF_Dictionary
* pRoot);
40
41
static
RetainPtr
<
const
CPDF_Array
>
LookupNamedDest
(
CPDF_Document
* doc,
42
const
ByteString
& name);
43
44
bool
AddValueAndName
(
RetainPtr
<
CPDF_Object
> pObj,
const
WideString
& name);
45
bool
DeleteValueAndName
(size_t nIndex);
46
47
RetainPtr
<
CPDF_Object
>
LookupValueAndName
(size_t nIndex,
48
WideString
* csName)
const
;
49
RetainPtr
<
const
CPDF_Object
>
LookupValue
(
const
WideString
& csName)
const
;
50
51
size_t
GetCount
()
const
;
52
CPDF_Dictionary
*
GetRootForTesting
()
const
{
return
m_pRoot.Get(); }
53
54
private
:
55
explicit
CPDF_NameTree(
RetainPtr
<
CPDF_Dictionary
> pRoot);
56
57
RetainPtr
<
const
CPDF_Array
> LookupNewStyleNamedDest(
const
ByteString
& name);
58
59
RetainPtr
<
CPDF_Dictionary
>
const
m_pRoot;
60
};
61
62
#
endif
// CORE_FPDFDOC_CPDF_NAMETREE_H_
ByteString
fxcrt::ByteString ByteString
Definition
bytestring.h:180
CPDF_Array::const_iterator
std::vector< RetainPtr< CPDF_Object > >::const_iterator const_iterator
Definition
cpdf_array.h:29
CPDF_Dest
Definition
cpdf_dest.h:18
CPDF_Dest::GetXYZ
bool GetXYZ(bool *pHasX, bool *pHasY, bool *pHasZoom, float *pX, float *pY, float *pZoom) const
Definition
cpdf_dest.cpp:97
CPDF_Dest::GetNumParams
size_t GetNumParams() const
Definition
cpdf_dest.cpp:144
CPDF_Dest::Create
static CPDF_Dest Create(CPDF_Document *pDoc, RetainPtr< const CPDF_Object > pDest)
Definition
cpdf_dest.cpp:41
CPDF_Dest::CPDF_Dest
CPDF_Dest(const CPDF_Dest &that)
CPDF_Dest::GetDestPageIndex
int GetDestPageIndex(CPDF_Document *pDoc) const
Definition
cpdf_dest.cpp:52
CPDF_Dest::GetParam
float GetParam(size_t index) const
Definition
cpdf_dest.cpp:153
CPDF_Dest::GetZoomMode
int GetZoomMode() const
Definition
cpdf_dest.cpp:80
CPDF_Dest::GetScrollPositionArray
std::vector< float > GetScrollPositionArray() const
Definition
cpdf_dest.cpp:69
CPDF_Dest::~CPDF_Dest
~CPDF_Dest()
CPDF_Dest::CPDF_Dest
CPDF_Dest(RetainPtr< const CPDF_Array > pArray)
Definition
cpdf_dest.cpp:33
CPDF_Dictionary::DictMap
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
Definition
cpdf_dictionary.h:31
CPDF_Document
Definition
cpdf_document.h:29
CPDF_Document::GetPageIndex
int GetPageIndex(uint32_t objnum)
Definition
cpdf_document.cpp:398
CPDF_NameTree
Definition
cpdf_nametree.h:22
CPDF_NameTree::AddValueAndName
bool AddValueAndName(RetainPtr< CPDF_Object > pObj, const WideString &name)
Definition
cpdf_nametree.cpp:485
CPDF_NameTree::operator=
CPDF_NameTree & operator=(const CPDF_NameTree &)=delete
CPDF_NameTree::LookupNamedDest
static RetainPtr< const CPDF_Array > LookupNamedDest(CPDF_Document *doc, const ByteString &name)
Definition
cpdf_nametree.cpp:468
CPDF_NameTree::GetRootForTesting
CPDF_Dictionary * GetRootForTesting() const
Definition
cpdf_nametree.h:52
CPDF_NameTree::~CPDF_NameTree
~CPDF_NameTree()
CPDF_NameTree::LookupValue
RetainPtr< const CPDF_Object > LookupValue(const WideString &csName) const
Definition
cpdf_nametree.cpp:574
CPDF_NameTree::Create
static std::unique_ptr< CPDF_NameTree > Create(CPDF_Document *pDoc, const ByteString &category)
Definition
cpdf_nametree.cpp:415
CPDF_NameTree::CPDF_NameTree
CPDF_NameTree(const CPDF_NameTree &)=delete
CPDF_NameTree::LookupValueAndName
RetainPtr< CPDF_Object > LookupValueAndName(size_t nIndex, WideString *csName) const
Definition
cpdf_nametree.cpp:560
CPDF_NameTree::GetCount
size_t GetCount() const
Definition
cpdf_nametree.cpp:480
CPDF_NameTree::DeleteValueAndName
bool DeleteValueAndName(size_t nIndex)
Definition
cpdf_nametree.cpp:541
CPDF_NameTree::CreateWithRootNameArray
static std::unique_ptr< CPDF_NameTree > CreateWithRootNameArray(CPDF_Document *pDoc, const ByteString &category)
Definition
cpdf_nametree.cpp:435
CPDF_NameTree::CreateForTesting
static std::unique_ptr< CPDF_NameTree > CreateForTesting(CPDF_Dictionary *pRoot)
Definition
cpdf_nametree.cpp:461
CPDF_Object
Definition
cpdf_object.h:50
fxcrt::RetainPtr
Definition
retain_ptr.h:28
fxcrt
Definition
stl_util.h:17
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
WideString
fxcrt::WideString WideString
Definition
widestring.h:207
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfdoc
cpdf_nametree.h
Generated on
for Qt by
1.18.0