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
cxfa_object.cpp
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
#
include
"xfa/fxfa/parser/cxfa_object.h"
8
9
#
include
"core/fxcrt/fx_extension.h"
10
#
include
"fxjs/xfa/cfxjse_engine.h"
11
#
include
"fxjs/xfa/cfxjse_value.h"
12
#
include
"fxjs/xfa/cjx_object.h"
13
#
include
"xfa/fxfa/cxfa_ffnotify.h"
14
#
include
"xfa/fxfa/parser/cxfa_document.h"
15
#
include
"xfa/fxfa/parser/cxfa_node.h"
16
#
include
"xfa/fxfa/parser/cxfa_thisproxy.h"
17
#
include
"xfa/fxfa/parser/cxfa_treelist.h"
18
#
include
"xfa/fxfa/parser/xfa_basic_data.h"
19
20
CXFA_Object
::
CXFA_Object
(CXFA_Document* pDocument,
21
XFA_ObjectType
objectType,
22
XFA_Element
elementType,
23
CJX_Object
* jsObject)
24
:
m_objectType
(objectType),
25
m_elementType
(elementType),
26
m_elementName
(
XFA_ElementToName
(
elementType
)),
27
m_elementNameHash
(FX_HashCode_GetAsIfW(m_elementName)),
28
m_pDocument
(
pDocument
),
29
m_pJSObject
(
jsObject
) {}
30
31
CXFA_Object
::~
CXFA_Object
() =
default
;
32
33
void
CXFA_Object
::
Trace
(
cppgc
::Visitor* visitor)
const
{
34
visitor->Trace(m_pDocument);
35
visitor->Trace(m_pJSObject);
36
}
37
38
WideString
CXFA_Object
::
GetSOMExpression
() {
39
CXFA_Node
* pNode =
AsNode
(
)
;
40
return
pNode ? pNode
->
GetNameExpression
(
)
:
WideString
(
)
;
41
}
42
43
CXFA_List
*
CXFA_Object
::
AsList
() {
44
return
IsList() ?
static_cast
<CXFA_List*>(
this
) :
nullptr
;
45
}
46
47
CXFA_Node
*
CXFA_Object
::
AsNode
() {
48
return
IsNode() ?
static_cast
<CXFA_Node*>(
this
) :
nullptr
;
49
}
50
51
CXFA_TreeList
*
CXFA_Object
::
AsTreeList
() {
52
return
IsTreeList() ?
static_cast
<CXFA_TreeList*>(
this
) :
nullptr
;
53
}
54
55
CXFA_ThisProxy*
CXFA_Object
::
AsThisProxy
() {
56
return
IsThisProxy() ?
static_cast
<CXFA_ThisProxy*>(
this
) :
nullptr
;
57
}
58
59
CXFA_List
*
ToList
(
CXFA_Object
* pObj) {
60
return
pObj ? pObj
->
AsList
(
)
:
nullptr
;
61
}
62
63
CXFA_Node
*
ToNode
(
CXFA_Object
* pObj) {
64
return
pObj ? pObj
->
AsNode
(
)
:
nullptr
;
65
}
66
67
CXFA_TreeList
*
ToTreeList
(
CXFA_Object
* pObj) {
68
return
pObj ? pObj
->
AsTreeList
(
)
:
nullptr
;
69
}
70
71
CXFA_ThisProxy*
ToThisProxy
(
CXFA_Object
* pObj) {
72
return
pObj ? pObj
->
AsThisProxy
(
)
:
nullptr
;
73
}
CJX_Object
Definition
cjx_object.h:46
CXFA_List
Definition
cxfa_list.h:17
CXFA_Node
Definition
cxfa_node.h:94
CXFA_Node::GetNameExpression
WideString GetNameExpression()
Definition
cxfa_node.cpp:1519
CXFA_Object
Definition
cxfa_object.h:42
CXFA_Object::GetSOMExpression
WideString GetSOMExpression()
Definition
cxfa_object.cpp:38
CXFA_Object::AsNode
CXFA_Node * AsNode()
Definition
cxfa_object.cpp:47
CXFA_Object::~CXFA_Object
virtual ~CXFA_Object()
CXFA_Object::m_elementType
const XFA_Element m_elementType
Definition
cxfa_object.h:104
CXFA_Object::m_objectType
const XFA_ObjectType m_objectType
Definition
cxfa_object.h:103
CXFA_Object::m_elementNameHash
const uint32_t m_elementNameHash
Definition
cxfa_object.h:106
CXFA_Object::AsTreeList
CXFA_TreeList * AsTreeList()
Definition
cxfa_object.cpp:51
CXFA_Object::Trace
virtual void Trace(cppgc::Visitor *visitor) const
Definition
cxfa_object.cpp:33
CXFA_Object::AsList
CXFA_List * AsList()
Definition
cxfa_object.cpp:43
CXFA_Object::CXFA_Object
CXFA_Object(CXFA_Document *pDocument, XFA_ObjectType objectType, XFA_Element eType, CJX_Object *jsObject)
Definition
cxfa_object.cpp:20
CXFA_Object::AsThisProxy
CXFA_ThisProxy * AsThisProxy()
Definition
cxfa_object.cpp:55
CXFA_TreeList
Definition
cxfa_treelist.h:15
fxcrt::WideString::WideString
WideString()=default
ToThisProxy
CXFA_ThisProxy * ToThisProxy(CXFA_Object *pObj)
Definition
cxfa_object.cpp:71
ToTreeList
CXFA_TreeList * ToTreeList(CXFA_Object *pObj)
Definition
cxfa_object.cpp:67
XFA_ObjectType
XFA_ObjectType
Definition
cxfa_object.h:21
ToNode
CXFA_Node * ToNode(CXFA_Object *pObj)
Definition
cxfa_object.cpp:63
ToList
CXFA_List * ToList(CXFA_Object *pObj)
Definition
cxfa_object.cpp:59
XFA_Element
XFA_Element
Definition
fxfa_basic.h:75
cppgc
Definition
heap.h:12
WideString
fxcrt::WideString WideString
Definition
widestring.h:207
qtwebengine
src
3rdparty
chromium
third_party
pdfium
xfa
fxfa
parser
cxfa_object.cpp
Generated on
for Qt by
1.18.0