xref: /aosp_15_r20/external/pdfium/xfa/fxfa/parser/cxfa_attachnodelist.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
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_ATTACHNODELIST_H_
8 #define XFA_FXFA_PARSER_CXFA_ATTACHNODELIST_H_
9 
10 #include "v8/include/cppgc/member.h"
11 #include "v8/include/cppgc/visitor.h"
12 #include "xfa/fxfa/parser/cxfa_treelist.h"
13 
14 class CXFA_Document;
15 class CXFA_Node;
16 
17 class CXFA_AttachNodeList final : public CXFA_TreeList {
18  public:
19   CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED;
20   ~CXFA_AttachNodeList() override;
21 
22   void Trace(cppgc::Visitor* visitor) const override;
23 
24   // CXFA_TreeList:
25   size_t GetLength() override;
26   bool Append(CXFA_Node* pNode) override;
27   bool Insert(CXFA_Node* pNewNode, CXFA_Node* pBeforeNode) override;
28   void Remove(CXFA_Node* pNode) override;
29   CXFA_Node* Item(size_t iIndex) override;
30 
31  private:
32   CXFA_AttachNodeList(CXFA_Document* pDocument, CXFA_Node* pAttachNode);
33 
34   cppgc::Member<CXFA_Node> const m_pAttachNode;
35 };
36 
37 #endif  // XFA_FXFA_PARSER_CXFA_ATTACHNODELIST_H_
38