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