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_ARRAYNODELIST_H_ 8 #define XFA_FXFA_PARSER_CXFA_ARRAYNODELIST_H_ 9 10 #include <vector> 11 12 #include "xfa/fxfa/parser/cxfa_treelist.h" 13 14 class CXFA_Document; 15 class CXFA_Node; 16 17 class CXFA_ArrayNodeList final : public CXFA_TreeList { 18 public: 19 explicit CXFA_ArrayNodeList(CXFA_Document* pDocument); 20 ~CXFA_ArrayNodeList() override; 21 22 // CXFA_TreeList: 23 size_t GetLength() override; 24 void Append(CXFA_Node* pNode) override; 25 bool Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) override; 26 void Remove(CXFA_Node* pNode) override; 27 CXFA_Node* Item(size_t iIndex) override; 28 29 void SetArrayNodeList(std::vector<CXFA_Node*> srcArray); 30 31 private: 32 std::vector<CXFA_Node*> m_array; 33 }; 34 35 #endif // XFA_FXFA_PARSER_CXFA_ARRAYNODELIST_H_ 36