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
cfx_xmlelement.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
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FXCRT_XML_CFX_XMLELEMENT_H_
8
#
define
CORE_FXCRT_XML_CFX_XMLELEMENT_H_
9
10
#
include
<
map
>
11
12
#
include
"core/fxcrt/widestring.h"
13
#
include
"core/fxcrt/xml/cfx_xmlnode.h"
14
15
class
CFX_XMLDocument
;
16
17
class
CFX_XMLElement
final
:
public
CFX_XMLNode
{
18
public
:
19
explicit
CFX_XMLElement
(
const
WideString
& wsTag);
20
~
CFX_XMLElement
()
override
;
21
22
// CFX_XMLNode
23
Type
GetType
()
const
override
;
24
CFX_XMLNode
*
Clone
(
CFX_XMLDocument
* doc)
override
;
25
void
Save
(
const
RetainPtr
<
IFX_RetainableWriteStream
>& pXMLStream)
override
;
26
27
const
WideString
&
GetName
()
const
{
return
name_; }
28
29
const
std
::
map
<
WideString
,
WideString
>&
GetAttributes
()
const
{
30
return
attrs_;
31
}
32
bool
HasAttribute
(
const
WideString
& name)
const
;
33
void
SetAttribute
(
const
WideString
& name,
const
WideString
& value);
34
WideString
GetAttribute
(
const
WideString
& name)
const
;
35
void
RemoveAttribute
(
const
WideString
& name);
36
37
CFX_XMLElement*
GetFirstChildNamed
(
WideStringView
name)
const
;
38
CFX_XMLElement*
GetNthChildNamed
(
WideStringView
name, size_t idx)
const
;
39
40
WideString
GetLocalTagName
()
const
;
41
WideString
GetNamespacePrefix
()
const
;
42
WideString
GetNamespaceURI
()
const
;
43
44
WideString
GetTextData
()
const
;
45
46
private
:
47
WideString
AttributeToString(
const
WideString
& name,
const
WideString
& value);
48
49
const
WideString
name_;
50
std::map<WideString, WideString> attrs_;
51
};
52
53
inline
CFX_XMLElement*
ToXMLElement
(
CFX_XMLNode
* pNode) {
54
return
pNode && pNode->GetType() == CFX_XMLNode::Type::kElement
55
?
static_cast
<CFX_XMLElement*>(pNode)
56
:
nullptr
;
57
}
58
59
inline
const
CFX_XMLElement*
ToXMLElement
(
const
CFX_XMLNode
* pNode) {
60
return
pNode && pNode->GetType() == CFX_XMLNode::Type::kElement
61
?
static_cast
<
const
CFX_XMLElement*>(pNode)
62
:
nullptr
;
63
}
64
65
#
endif
// CORE_FXCRT_XML_CFX_XMLELEMENT_H_
ToXMLElement
CFX_XMLElement * ToXMLElement(CFX_XMLNode *pNode)
Definition
cfx_xmlelement.h:53
ToXMLElement
const CFX_XMLElement * ToXMLElement(const CFX_XMLNode *pNode)
Definition
cfx_xmlelement.h:59
DCHECK
#define DCHECK
Definition
check.h:33
CFX_XMLDocument
Definition
cfx_xmldocument.h:17
CFX_XMLDocument::GetRoot
CFX_XMLElement * GetRoot() const
Definition
cfx_xmldocument.h:22
CFX_XMLDocument::CreateNode
T * CreateNode(Args &&... args)
Definition
cfx_xmldocument.h:25
CFX_XMLDocument::CFX_XMLDocument
CFX_XMLDocument()
Definition
cfx_xmldocument.cpp:11
CFX_XMLDocument::AppendNodesFrom
void AppendNodesFrom(CFX_XMLDocument *other)
Definition
cfx_xmldocument.cpp:16
CFX_XMLDocument::~CFX_XMLDocument
~CFX_XMLDocument()
CFX_XMLElement::Save
void Save(const RetainPtr< IFX_RetainableWriteStream > &pXMLStream) override
Definition
cfx_xmlelement.cpp:80
CFX_XMLElement::GetNamespacePrefix
WideString GetNamespacePrefix() const
Definition
cfx_xmlelement.cpp:45
CFX_XMLElement::GetTextData
WideString GetTextData() const
Definition
cfx_xmlelement.cpp:69
CFX_XMLElement::GetName
const WideString & GetName() const
Definition
cfx_xmlelement.h:27
CFX_XMLElement::Clone
CFX_XMLNode * Clone(CFX_XMLDocument *doc) override
Definition
cfx_xmlelement.cpp:25
CFX_XMLElement::~CFX_XMLElement
~CFX_XMLElement() override
CFX_XMLElement::CFX_XMLElement
CFX_XMLElement(const WideString &wsTag)
Definition
cfx_xmlelement.cpp:15
CFX_XMLElement::HasAttribute
bool HasAttribute(const WideString &name) const
Definition
cfx_xmlelement.cpp:128
CFX_XMLElement::GetLocalTagName
WideString GetLocalTagName() const
Definition
cfx_xmlelement.cpp:39
CFX_XMLElement::GetType
Type GetType() const override
Definition
cfx_xmlelement.cpp:21
CFX_XMLElement::GetAttribute
WideString GetAttribute(const WideString &name) const
Definition
cfx_xmlelement.cpp:132
CFX_XMLElement::GetNamespaceURI
WideString GetNamespaceURI() const
Definition
cfx_xmlelement.cpp:50
CFX_XMLElement::SetAttribute
void SetAttribute(const WideString &name, const WideString &value)
Definition
cfx_xmlelement.cpp:137
CFX_XMLElement::GetFirstChildNamed
CFX_XMLElement * GetFirstChildNamed(WideStringView name) const
Definition
cfx_xmlelement.cpp:110
CFX_XMLElement::RemoveAttribute
void RemoveAttribute(const WideString &name)
Definition
cfx_xmlelement.cpp:142
CFX_XMLElement::GetAttributes
const std::map< WideString, WideString > & GetAttributes() const
Definition
cfx_xmlelement.h:29
CFX_XMLElement::GetNthChildNamed
CFX_XMLElement * GetNthChildNamed(WideStringView name, size_t idx) const
Definition
cfx_xmlelement.cpp:114
CFX_XMLNode
Definition
cfx_xmlnode.h:16
CFX_XMLNode::Type
Type
Definition
cfx_xmlnode.h:18
CFX_XMLNode::Type::kElement
@ kElement
Definition
cfx_xmlnode.h:20
CPDF_Metadata
Definition
cpdf_metadata.h:35
CPDF_Metadata::~CPDF_Metadata
~CPDF_Metadata()
CPDF_Metadata::CheckForSharedForm
std::vector< UnsupportedFeature > CheckForSharedForm() const
Definition
cpdf_metadata.cpp:82
CPDF_Metadata::CPDF_Metadata
CPDF_Metadata(RetainPtr< const CPDF_Stream > pStream)
Definition
cpdf_metadata.cpp:75
IFX_RetainableWriteStream
Definition
fx_stream.h:43
fxcrt::RetainPtr
Definition
retain_ptr.h:28
fxcrt::UnownedPtr
Definition
unowned_ptr.h:76
fxcrt::WideString::FromASCII
static WideString FromASCII(ByteStringView str)
Definition
widestring.cpp:704
fxcrt::WideString::EqualsASCII
bool EqualsASCII(ByteStringView that) const
Definition
widestring.h:111
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
UnsupportedFeature
UnsupportedFeature
Definition
cpdf_metadata.h:16
UnsupportedFeature::kAnnotationSignature
@ kAnnotationSignature
Definition
cpdf_metadata.h:32
UnsupportedFeature::kDocumentAttachment
@ kDocumentAttachment
Definition
cpdf_metadata.h:19
UnsupportedFeature::kDocumentSharedFormFilesystem
@ kDocumentSharedFormFilesystem
Definition
cpdf_metadata.h:23
UnsupportedFeature::kAnnotationScreenMedia
@ kAnnotationScreenMedia
Definition
cpdf_metadata.h:29
UnsupportedFeature::kAnnotationSound
@ kAnnotationSound
Definition
cpdf_metadata.h:28
UnsupportedFeature::kDocumentXFAForm
@ kDocumentXFAForm
Definition
cpdf_metadata.h:17
UnsupportedFeature::kDocumentSharedFormAcrobat
@ kDocumentSharedFormAcrobat
Definition
cpdf_metadata.h:22
UnsupportedFeature::kDocumentSecurity
@ kDocumentSecurity
Definition
cpdf_metadata.h:20
UnsupportedFeature::kAnnotationAttachment
@ kAnnotationAttachment
Definition
cpdf_metadata.h:31
UnsupportedFeature::kAnnotation3d
@ kAnnotation3d
Definition
cpdf_metadata.h:26
UnsupportedFeature::kDocumentSharedReview
@ kDocumentSharedReview
Definition
cpdf_metadata.h:21
UnsupportedFeature::kDocumentPortableCollection
@ kDocumentPortableCollection
Definition
cpdf_metadata.h:18
UnsupportedFeature::kDocumentSharedFormEmail
@ kDocumentSharedFormEmail
Definition
cpdf_metadata.h:24
UnsupportedFeature::kAnnotationScreenRichMedia
@ kAnnotationScreenRichMedia
Definition
cpdf_metadata.h:30
UnsupportedFeature::kAnnotationMovie
@ kAnnotationMovie
Definition
cpdf_metadata.h:27
WideStringView
fxcrt::WideStringView WideStringView
Definition
string_view_template.h:326
WideString
fxcrt::WideString WideString
Definition
widestring.h:207
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
xml
cfx_xmlelement.h
Generated on
for Qt by
1.18.0