1 // Copyright 2017 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 FXJS_XFA_CJX_TREE_H_
8 #define FXJS_XFA_CJX_TREE_H_
9 
10 #include "fxjs/xfa/cjx_object.h"
11 #include "fxjs/xfa/jse_define.h"
12 
13 class CXFA_Object;
14 class CXFA_Node;
15 
16 class CJX_Tree : public CJX_Object {
17  public:
18   explicit CJX_Tree(CXFA_Object* obj);
19   ~CJX_Tree() override;
20 
21   // CJX_Object:
22   bool DynamicTypeIs(TypeTag eType) const override;
23 
24   JSE_METHOD(resolveNode);
25   JSE_METHOD(resolveNodes);
26 
27   JSE_PROP(all);
28   JSE_PROP(classAll);
29   JSE_PROP(classIndex);
30   JSE_PROP(index);
31   JSE_PROP(nodes);
32   JSE_PROP(parent);
33   JSE_PROP(somExpression);
34 
35  private:
36   using Type__ = CJX_Tree;
37   using ParentType__ = CJX_Object;
38 
39   static const TypeTag static_type__ = TypeTag::Tree;
40   static const CJX_MethodSpec MethodSpecs[];
41 
42   void ResolveNodeList(CFXJSE_Value* pValue,
43                        WideString wsExpression,
44                        uint32_t dwFlag,
45                        CXFA_Node* refNode);
46 };
47 
48 #endif  // FXJS_XFA_CJX_TREE_H_
49