1 // Copyright 2017 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_CJX_NODE_H_ 8 #define FXJS_XFA_CJX_NODE_H_ 9 10 #include "fxjs/xfa/cjx_tree.h" 11 #include "fxjs/xfa/jse_define.h" 12 #include "xfa/fxfa/fxfa.h" 13 #include "xfa/fxfa/fxfa_basic.h" 14 15 class CXFA_Node; 16 17 class CJX_Node : public CJX_Tree { 18 public: 19 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 20 ~CJX_Node() override; 21 22 // CJX_Object: 23 bool DynamicTypeIs(TypeTag eType) const override; 24 25 JSE_METHOD(applyXSL); 26 JSE_METHOD(assignNode); 27 JSE_METHOD(clone); 28 JSE_METHOD(getAttribute); 29 JSE_METHOD(getElement); 30 JSE_METHOD(isPropertySpecified); 31 JSE_METHOD(loadXML); 32 JSE_METHOD(saveFilteredXML); 33 JSE_METHOD(saveXML); 34 JSE_METHOD(setAttribute); 35 JSE_METHOD(setElement); 36 37 JSE_PROP(isContainer); 38 JSE_PROP(isNull); 39 JSE_PROP(model); 40 JSE_PROP(ns); 41 JSE_PROP(oneOfChild); 42 43 protected: 44 explicit CJX_Node(CXFA_Node* node); 45 46 XFA_EventError execSingleEventByName(WideStringView wsEventName, 47 XFA_Element eType); 48 49 private: 50 using Type__ = CJX_Node; 51 using ParentType__ = CJX_Tree; 52 53 static const TypeTag static_type__ = TypeTag::Node; 54 static const CJX_MethodSpec MethodSpecs[]; 55 }; 56 57 #endif // FXJS_XFA_CJX_NODE_H_ 58