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 XFA_FXFA_PARSER_CXFA_LIST_H_ 8 #define XFA_FXFA_PARSER_CXFA_LIST_H_ 9 10 #include "fxjs/gc/heap.h" 11 #include "xfa/fxfa/parser/cxfa_object.h" 12 13 class CJX_Object; 14 class CXFA_Document; 15 class CXFA_Node; 16 17 class CXFA_List : public CXFA_Object { 18 public: 19 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 20 ~CXFA_List() override; 21 22 virtual size_t GetLength() = 0; 23 virtual bool Append(CXFA_Node* pNode) = 0; 24 virtual bool Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) = 0; 25 virtual void Remove(CXFA_Node* pNode) = 0; 26 virtual CXFA_Node* Item(size_t iIndex) = 0; 27 28 protected: 29 CXFA_List(CXFA_Document* doc, CJX_Object* js_obj); 30 CXFA_List(CXFA_Document* pDocument, 31 XFA_ObjectType objectType, 32 XFA_Element eType, 33 CJX_Object* obj); 34 }; 35 36 #endif // XFA_FXFA_PARSER_CXFA_LIST_H_ 37