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_XFA_RESOLVENODE_RS_H_ 8 #define XFA_FXFA_PARSER_XFA_RESOLVENODE_RS_H_ 9 10 #include <memory> 11 #include <utility> 12 #include <vector> 13 14 #include "fxjs/cfxjse_value.h" 15 #include "third_party/base/ptr_util.h" 16 #include "xfa/fxfa/fxfa.h" 17 #include "xfa/fxfa/parser/cxfa_object.h" 18 19 #define XFA_RESOLVENODE_Children 0x0001 20 #define XFA_RESOLVENODE_Attributes 0x0004 21 #define XFA_RESOLVENODE_Properties 0x0008 22 #define XFA_RESOLVENODE_Siblings 0x0020 23 #define XFA_RESOLVENODE_Parent 0x0040 24 #define XFA_RESOLVENODE_AnyChild 0x0080 25 #define XFA_RESOLVENODE_ALL 0x0100 26 #define XFA_RESOLVENODE_CreateNode 0x0400 27 #define XFA_RESOLVENODE_Bind 0x0800 28 #define XFA_RESOLVENODE_BindNew 0x1000 29 30 enum XFA_ResolveNode_RSType { 31 XFA_ResolveNode_RSType_Nodes, 32 XFA_ResolveNode_RSType_Attribute, 33 XFA_ResolveNode_RSType_CreateNodeOne, 34 XFA_ResolveNode_RSType_CreateNodeAll, 35 XFA_ResolveNode_RSType_CreateNodeMidAll, 36 XFA_ResolveNode_RSType_ExistNodes, 37 }; 38 39 struct XFA_RESOLVENODE_RS { 40 XFA_RESOLVENODE_RS(); 41 ~XFA_RESOLVENODE_RS(); 42 43 std::vector<CXFA_Object*> objects; // Not owned. 44 XFA_ResolveNode_RSType dwFlags; 45 const XFA_SCRIPTATTRIBUTEINFO* pScriptAttribute; 46 }; 47 XFA_RESOLVENODE_RS()48inline XFA_RESOLVENODE_RS::XFA_RESOLVENODE_RS() 49 : dwFlags(XFA_ResolveNode_RSType_Nodes), pScriptAttribute(nullptr) {} 50 ~XFA_RESOLVENODE_RS()51inline XFA_RESOLVENODE_RS::~XFA_RESOLVENODE_RS() {} 52 53 #endif // XFA_FXFA_PARSER_XFA_RESOLVENODE_RS_H_ 54