summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa/parser/xfa_script_nodehelper.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-08 13:49:22 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-08 13:49:22 -0500
commit6cdf084fa40a62eb33185171622ad12d95c6009e (patch)
treedaeea24a81365ed27582f280b7f19add0cb7b0d7 /xfa/src/fxfa/parser/xfa_script_nodehelper.h
parent653e0797debddb4e9aecbc6cde65748d43b18b79 (diff)
downloadpdfium-6cdf084fa40a62eb33185171622ad12d95c6009e.tar.xz
Remove xfa/src/fxfa/src/common and xfa/src/fxfa/src
This Cl moves the code in xfa/src/fxfa/src/common to the diretory which contains the respective implementations and removes the xfa/src/fxfa/src/common directory. It them moves all of the code in xfa/src/fxfa/src up one level and removes the xfa/src/fxfa/src directory. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1770073003 .
Diffstat (limited to 'xfa/src/fxfa/parser/xfa_script_nodehelper.h')
-rw-r--r--xfa/src/fxfa/parser/xfa_script_nodehelper.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/xfa/src/fxfa/parser/xfa_script_nodehelper.h b/xfa/src/fxfa/parser/xfa_script_nodehelper.h
new file mode 100644
index 0000000000..318a5a1ab3
--- /dev/null
+++ b/xfa/src/fxfa/parser/xfa_script_nodehelper.h
@@ -0,0 +1,72 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef XFA_SRC_FXFA_PARSER_XFA_SCRIPT_NODEHELPER_H_
+#define XFA_SRC_FXFA_PARSER_XFA_SCRIPT_NODEHELPER_H_
+
+#include "xfa/src/fxfa/parser/xfa_object.h"
+#include "xfa/src/fxfa/parser/xfa_script.h"
+
+class CXFA_ScriptContext;
+
+enum XFA_LOGIC_TYPE {
+ XFA_LOGIC_NoTransparent,
+ XFA_LOGIC_Transparent,
+};
+
+class CXFA_NodeHelper {
+ public:
+ CXFA_NodeHelper(void);
+ ~CXFA_NodeHelper(void);
+ CXFA_Node* XFA_ResolveNodes_GetOneChild(CXFA_Node* parent,
+ const FX_WCHAR* pwsName,
+ FX_BOOL bIsClassName = FALSE);
+ CXFA_Node* XFA_ResolveNodes_GetParent(
+ CXFA_Node* pNode,
+ XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
+
+ int32_t XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent,
+ FX_DWORD dNameHash,
+ CXFA_NodeArray* pSiblings,
+ XFA_LOGIC_TYPE eLogicType,
+ FX_BOOL bIsClassName = FALSE,
+ FX_BOOL bIsFindProperty = TRUE);
+ int32_t XFA_NodeAcc_TraverseAnySiblings(CXFA_Node* parent,
+ FX_DWORD dNameHash,
+ CXFA_NodeArray* pSiblings,
+ FX_BOOL bIsClassName = FALSE);
+ int32_t XFA_CountSiblings(CXFA_Node* pNode,
+ XFA_LOGIC_TYPE eLogicType,
+ CXFA_NodeArray* pSiblings,
+ FX_BOOL bIsClassName = FALSE);
+ int32_t XFA_GetIndex(CXFA_Node* pNode,
+ XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent,
+ FX_BOOL bIsProperty = FALSE,
+ FX_BOOL bIsClassIndex = FALSE);
+ void XFA_GetNameExpression(
+ CXFA_Node* refNode,
+ CFX_WideString& wsName,
+ FX_BOOL bIsAllPath,
+ XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
+ FX_BOOL XFA_NodeIsTransparent(CXFA_Node* refNode);
+ FX_BOOL XFA_ResolveNodes_CreateNode(CFX_WideString wsName,
+ CFX_WideString wsCondition,
+ FX_BOOL bLastNode,
+ CXFA_ScriptContext* pScriptContext);
+ FX_BOOL XFA_CreateNode_ForCondition(CFX_WideString& wsCondition);
+ void XFA_SetCreateNodeType(CXFA_Node* refNode);
+ FX_BOOL XFA_NodeIsProperty(CXFA_Node* refNode);
+
+ public:
+ XFA_ELEMENT m_eLastCreateType;
+ CXFA_Node* m_pCreateParent;
+ int32_t m_iCreateCount;
+ XFA_RESOVENODE_RSTYPE m_iCreateFlag;
+ int32_t m_iCurAllStart;
+ CXFA_Node* m_pAllStartParent;
+};
+
+#endif // XFA_SRC_FXFA_PARSER_XFA_SCRIPT_NODEHELPER_H_