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_object_walker.h
Go to the documentation of this file.
1
// Copyright 2017 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
CORE_FPDFAPI_PARSER_CPDF_OBJECT_WALKER_H_
6
#
define
CORE_FPDFAPI_PARSER_CPDF_OBJECT_WALKER_H_
7
8
#
include
<
memory
>
9
#
include
<
stack
>
10
11
#
include
"core/fxcrt/bytestring.h"
12
#
include
"core/fxcrt/retain_ptr.h"
13
14
class
CPDF_Object
;
15
16
// Walk on all non-null sub-objects in an object in depth, include itself,
17
// like in flat list.
18
class
CPDF_ObjectWalker
{
19
public
:
20
class
SubobjectIterator
{
21
public
:
22
virtual
~
SubobjectIterator
();
23
virtual
bool
IsFinished
()
const
= 0;
24
bool
IsStarted
()
const
{
return
is_started_; }
25
RetainPtr
<
const
CPDF_Object
>
Increment
();
26
const
CPDF_Object
*
object
()
const
{
return
object_.Get(); }
27
28
protected
:
29
explicit
SubobjectIterator
(
RetainPtr
<
const
CPDF_Object
> object);
30
31
virtual
RetainPtr
<
const
CPDF_Object
>
IncrementImpl
() = 0;
32
virtual
void
Start
() = 0;
33
34
private
:
35
RetainPtr
<
const
CPDF_Object
> object_;
36
bool
is_started_ =
false
;
37
};
38
39
explicit
CPDF_ObjectWalker
(
RetainPtr
<
const
CPDF_Object
> root);
40
~
CPDF_ObjectWalker
();
41
42
RetainPtr
<
const
CPDF_Object
>
GetNext
();
43
void
SkipWalkIntoCurrentObject
();
44
45
size_t
current_depth
()
const
{
return
current_depth_; }
46
const
CPDF_Object
*
GetParent
()
const
{
return
parent_object_.Get(); }
47
const
ByteString
&
dictionary_key
()
const
{
return
dict_key_; }
48
49
private
:
50
static
std::unique_ptr<SubobjectIterator> MakeIterator(
51
RetainPtr
<
const
CPDF_Object
> object);
52
53
RetainPtr
<
const
CPDF_Object
> next_object_;
54
RetainPtr
<
const
CPDF_Object
> parent_object_;
55
ByteString
dict_key_;
56
size_t current_depth_ = 0;
57
std::stack<std::unique_ptr<SubobjectIterator>> stack_;
58
};
59
60
class
CPDF_NonConstObjectWalker
final
:
public
CPDF_ObjectWalker
{
61
public
:
62
explicit
CPDF_NonConstObjectWalker
(
RetainPtr
<
CPDF_Object
> root);
63
RetainPtr
<
CPDF_Object
>
GetNext
();
64
};
65
66
#
endif
// CORE_FPDFAPI_PARSER_CPDF_OBJECT_WALKER_H_
ByteString
fxcrt::ByteString ByteString
Definition
bytestring.h:180
DCHECK
#define DCHECK
Definition
check.h:33
CPDF_CryptoHandler
Definition
cpdf_crypto_handler.h:27
CPDF_CryptoHandler::CPDF_CryptoHandler
CPDF_CryptoHandler(Cipher cipher, pdfium::span< const uint8_t > key)
Definition
cpdf_crypto_handler.cpp:321
CPDF_CryptoHandler::DecryptObjectTree
bool DecryptObjectTree(RetainPtr< CPDF_Object > object)
Definition
cpdf_crypto_handler.cpp:240
CPDF_CryptoHandler::IsCipherAES
bool IsCipherAES() const
Definition
cpdf_crypto_handler.cpp:236
CPDF_CryptoHandler::IsSignatureDictionary
static bool IsSignatureDictionary(const CPDF_Dictionary *dictionary)
Definition
cpdf_crypto_handler.cpp:39
CPDF_CryptoHandler::Cipher
Cipher
Definition
cpdf_crypto_handler.h:29
CPDF_CryptoHandler::Cipher::kNone
@ kNone
Definition
cpdf_crypto_handler.h:30
CPDF_CryptoHandler::Cipher::kAES
@ kAES
Definition
cpdf_crypto_handler.h:32
CPDF_CryptoHandler::Cipher::kRC4
@ kRC4
Definition
cpdf_crypto_handler.h:31
CPDF_CryptoHandler::~CPDF_CryptoHandler
~CPDF_CryptoHandler()
CPDF_CryptoHandler::EncryptContent
DataVector< uint8_t > EncryptContent(uint32_t objnum, uint32_t gennum, pdfium::span< const uint8_t > source) const
Definition
cpdf_crypto_handler.cpp:50
CPDF_Dictionary::GetDirectObjectFor
RetainPtr< const CPDF_Object > GetDirectObjectFor(const ByteString &key) const
Definition
cpdf_dictionary.cpp:93
CPDF_Dictionary::DictMap
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
Definition
cpdf_dictionary.h:31
CPDF_NonConstObjectWalker::GetNext
RetainPtr< CPDF_Object > GetNext()
Definition
cpdf_object_walker.cpp:175
CPDF_NonConstObjectWalker::CPDF_NonConstObjectWalker
CPDF_NonConstObjectWalker(RetainPtr< CPDF_Object > root)
Definition
cpdf_object_walker.cpp:171
CPDF_ObjectWalker::SubobjectIterator
Definition
cpdf_object_walker.h:20
CPDF_ObjectWalker::SubobjectIterator::IsFinished
virtual bool IsFinished() const =0
CPDF_ObjectWalker::SubobjectIterator::IncrementImpl
virtual RetainPtr< const CPDF_Object > IncrementImpl()=0
CPDF_ObjectWalker::SubobjectIterator::object
const CPDF_Object * object() const
Definition
cpdf_object_walker.h:26
CPDF_ObjectWalker::SubobjectIterator::Start
virtual void Start()=0
CPDF_ObjectWalker::SubobjectIterator::~SubobjectIterator
virtual ~SubobjectIterator()
CPDF_ObjectWalker::SubobjectIterator::SubobjectIterator
SubobjectIterator(RetainPtr< const CPDF_Object > object)
Definition
cpdf_object_walker.cpp:114
CPDF_ObjectWalker::SubobjectIterator::IsStarted
bool IsStarted() const
Definition
cpdf_object_walker.h:24
CPDF_ObjectWalker::SubobjectIterator::Increment
RetainPtr< const CPDF_Object > Increment()
Definition
cpdf_object_walker.cpp:101
CPDF_ObjectWalker
Definition
cpdf_object_walker.h:18
CPDF_ObjectWalker::~CPDF_ObjectWalker
~CPDF_ObjectWalker()
CPDF_ObjectWalker::CPDF_ObjectWalker
CPDF_ObjectWalker(RetainPtr< const CPDF_Object > root)
Definition
cpdf_object_walker.cpp:132
CPDF_ObjectWalker::current_depth
size_t current_depth() const
Definition
cpdf_object_walker.h:45
CPDF_ObjectWalker::GetNext
RetainPtr< const CPDF_Object > GetNext()
Definition
cpdf_object_walker.cpp:137
CPDF_ObjectWalker::GetParent
const CPDF_Object * GetParent() const
Definition
cpdf_object_walker.h:46
CPDF_ObjectWalker::SkipWalkIntoCurrentObject
void SkipWalkIntoCurrentObject()
Definition
cpdf_object_walker.cpp:165
CPDF_ObjectWalker::dictionary_key
const ByteString & dictionary_key() const
Definition
cpdf_object_walker.h:47
CPDF_Object
Definition
cpdf_object.h:50
CPDF_String::SetString
void SetString(const ByteString &str) override
Definition
cpdf_string.cpp:58
CPDF_String::GetString
ByteString GetString() const override
Definition
cpdf_string.cpp:54
fxcrt::BinaryBuffer
Definition
binary_buffer.h:19
fxcrt::RetainPtr
Definition
retain_ptr.h:28
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
UNSAFE_TODO
#define UNSAFE_TODO(...)
Definition
compiler_specific.h:102
fxcrt
Definition
stl_util.h:17
pdfium::form_fields
Definition
form_fields.cpp:7
pdfium::form_fields::kSig
const char kSig[]
Definition
form_fields.cpp:27
pdfium::form_fields::kFT
const char kFT[]
Definition
form_fields.cpp:11
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
ByteStringView
fxcrt::ByteStringView ByteStringView
Definition
string_view_template.h:325
AESCryptContext
Definition
cpdf_crypto_handler.cpp:105
AESCryptContext::m_Context
CRYPT_aes_context m_Context
Definition
cpdf_crypto_handler.cpp:108
AESCryptContext::m_BlockOffset
uint32_t m_BlockOffset
Definition
cpdf_crypto_handler.cpp:107
AESCryptContext::m_bIV
bool m_bIV
Definition
cpdf_crypto_handler.cpp:106
AESCryptContext::m_Block
uint8_t m_Block[16]
Definition
cpdf_crypto_handler.cpp:109
CRYPT_aes_context
Definition
fx_crypt_aes.h:16
CRYPT_rc4_context
Definition
fx_crypt.h:17
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
parser
cpdf_object_walker.h
Generated on
for Qt by
1.18.0