• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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 FXJS_XFA_CFXJSE_NODEHELPER_H_
8 #define FXJS_XFA_CFXJSE_NODEHELPER_H_
9 
10 #include "core/fxcrt/widestring.h"
11 #include "fxjs/xfa/cfxjse_engine.h"
12 #include "v8/include/cppgc/persistent.h"
13 #include "xfa/fxfa/fxfa_basic.h"
14 
15 class CXFA_Node;
16 
17 class CFXJSE_NodeHelper {
18  public:
19   CFXJSE_NodeHelper();
20   ~CFXJSE_NodeHelper();
21 
22   bool CreateNode(const WideString& wsName,
23                   const WideString& wsCondition,
24                   bool bLastNode,
25                   CFXJSE_Engine* pScriptContext);
26   bool CreateNodeForCondition(const WideString& wsCondition);
27   void SetCreateNodeType(CXFA_Node* refNode);
28 
29   XFA_Element m_eLastCreateType = XFA_Element::DataValue;
30   CFXJSE_Engine::ResolveResult::Type m_iCreateFlag =
31       CFXJSE_Engine::ResolveResult::Type::kCreateNodeOne;
32   size_t m_iCreateCount = 0;
33   int32_t m_iCurAllStart = -1;
34   cppgc::Persistent<CXFA_Node> m_pCreateParent;
35   cppgc::Persistent<CXFA_Node> m_pAllStartParent;
36 };
37 
38 #endif  // FXJS_XFA_CFXJSE_NODEHELPER_H_
39