• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
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 XFA_FXFA_PARSER_CXFA_NODEHELPER_H_
8 #define XFA_FXFA_PARSER_CXFA_NODEHELPER_H_
9 
10 #include <vector>
11 
12 #include "core/fxcrt/fx_string.h"
13 #include "xfa/fxfa/fxfa_basic.h"
14 #include "xfa/fxfa/parser/xfa_resolvenode_rs.h"
15 
16 class CFXJSE_Engine;
17 class CXFA_Node;
18 
19 class CXFA_NodeHelper {
20  public:
21   CXFA_NodeHelper();
22   ~CXFA_NodeHelper();
23 
24   bool CreateNode(const WideString& wsName,
25                   const WideString& wsCondition,
26                   bool bLastNode,
27                   CFXJSE_Engine* pScriptContext);
28   bool CreateNodeForCondition(const WideString& wsCondition);
29   void SetCreateNodeType(CXFA_Node* refNode);
30 
31   XFA_Element m_eLastCreateType = XFA_Element::DataValue;
32   XFA_ResolveNode_RSType m_iCreateFlag = XFA_ResolveNode_RSType_CreateNodeOne;
33   size_t m_iCreateCount = 0;
34   int32_t m_iCurAllStart = -1;
35   UnownedPtr<CXFA_Node> m_pCreateParent;
36   UnownedPtr<CXFA_Node> m_pAllStartParent;
37 };
38 
39 #endif  // XFA_FXFA_PARSER_CXFA_NODEHELPER_H_
40