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_xmltext.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_XMLTEXT_H_
8
#
define
CORE_FXCRT_XML_CFX_XMLTEXT_H_
9
10
#
include
"core/fxcrt/widestring.h"
11
#
include
"core/fxcrt/xml/cfx_xmlnode.h"
12
13
class
CFX_XMLDocument
;
14
15
class
CFX_XMLText
:
public
CFX_XMLNode
{
16
public
:
17
explicit
CFX_XMLText
(
const
WideString
& wsText);
18
~
CFX_XMLText
()
override
;
19
20
// CFX_XMLNode
21
Type
GetType
()
const
override
;
22
CFX_XMLNode
*
Clone
(
CFX_XMLDocument
* doc)
override
;
23
void
Save
(
const
RetainPtr
<
IFX_RetainableWriteStream
>& pXMLStream)
override
;
24
25
const
WideString
&
GetText
()
const
{
return
text_; }
26
void
SetText
(
const
WideString
& wsText) { text_ = wsText; }
27
28
private
:
29
WideString
text_;
30
};
31
32
inline
bool
IsXMLText
(
const
CFX_XMLNode
* pNode) {
33
CFX_XMLNode
::
Type
type = pNode
->
GetType
(
)
;
34
return
type ==
CFX_XMLNode
::
Type
::
kText
||
35
type ==
CFX_XMLNode
::
Type
::
kCharData
;
36
}
37
38
inline
CFX_XMLText
*
ToXMLText
(
CFX_XMLNode
* pNode) {
39
return
pNode && IsXMLText(pNode) ?
static_cast
<CFX_XMLText*>(pNode) :
nullptr
;
40
}
41
42
inline
const
CFX_XMLText
*
ToXMLText
(
const
CFX_XMLNode
* pNode) {
43
return
pNode && IsXMLText(pNode) ?
static_cast
<
const
CFX_XMLText*>(pNode)
44
:
nullptr
;
45
}
46
47
#
endif
// CORE_FXCRT_XML_CFX_XMLTEXT_H_
ToXMLCharData
CFX_XMLCharData * ToXMLCharData(CFX_XMLNode *pNode)
Definition
cfx_xmlchardata.h:26
ToXMLText
const CFX_XMLText * ToXMLText(const CFX_XMLNode *pNode)
Definition
cfx_xmltext.h:42
IsXMLText
bool IsXMLText(const CFX_XMLNode *pNode)
Definition
cfx_xmltext.h:32
ToXMLText
CFX_XMLText * ToXMLText(CFX_XMLNode *pNode)
Definition
cfx_xmltext.h:38
CFX_XMLCharData::GetType
Type GetType() const override
Definition
cfx_xmlchardata.cpp:16
CFX_XMLCharData::CFX_XMLCharData
CFX_XMLCharData(const WideString &wsCData)
Definition
cfx_xmlchardata.cpp:11
CFX_XMLCharData::Save
void Save(const RetainPtr< IFX_RetainableWriteStream > &pXMLStream) override
Definition
cfx_xmlchardata.cpp:24
CFX_XMLCharData::~CFX_XMLCharData
~CFX_XMLCharData() override
CFX_XMLCharData::Clone
CFX_XMLNode * Clone(CFX_XMLDocument *doc) override
Definition
cfx_xmlchardata.cpp:20
CFX_XMLDocument
Definition
cfx_xmldocument.h:17
CFX_XMLNode
Definition
cfx_xmlnode.h:16
CFX_XMLNode::GetType
virtual Type GetType() const =0
CFX_XMLNode::Type
Type
Definition
cfx_xmlnode.h:18
CFX_XMLNode::Type::kText
@ kText
Definition
cfx_xmlnode.h:21
CFX_XMLNode::Type::kCharData
@ kCharData
Definition
cfx_xmlnode.h:22
CFX_XMLText
Definition
cfx_xmltext.h:15
CFX_XMLText::SetText
void SetText(const WideString &wsText)
Definition
cfx_xmltext.h:26
CFX_XMLText::~CFX_XMLText
~CFX_XMLText() override
CFX_XMLText::GetText
const WideString & GetText() const
Definition
cfx_xmltext.h:25
CFX_XMLText::CFX_XMLText
CFX_XMLText(const WideString &wsText)
Definition
cfx_xmltext.cpp:11
CFX_XMLText::Save
void Save(const RetainPtr< IFX_RetainableWriteStream > &pXMLStream) override
Definition
cfx_xmltext.cpp:23
CFX_XMLText::GetType
Type GetType() const override
Definition
cfx_xmltext.cpp:15
CFX_XMLText::Clone
CFX_XMLNode * Clone(CFX_XMLDocument *doc) override
Definition
cfx_xmltext.cpp:19
IFX_RetainableWriteStream
Definition
fx_stream.h:43
fxcrt::RetainPtr
Definition
retain_ptr.h:28
WideString
fxcrt::WideString WideString
Definition
widestring.h:207
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
xml
cfx_xmltext.h
Generated on
for Qt by
1.18.0