blob: 4471867c668d9d4b0225c2be2ffc6adfe59ef33a [file] [log] [blame]
kumarashishg826308d2023-06-23 13:21:22 +00001// Copyright 2017 The PDFium Authors
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -07002// 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_LIST_H_
8#define FXJS_XFA_CJX_LIST_H_
9
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070010#include "fxjs/xfa/cjx_object.h"
Haibo Huang49cc9302020-04-27 16:14:24 -070011#include "fxjs/xfa/jse_define.h"
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070012
13class CXFA_List;
14
15class CJX_List : public CJX_Object {
16 public:
kumarashishg826308d2023-06-23 13:21:22 +000017 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070018 ~CJX_List() override;
19
Haibo Huang49cc9302020-04-27 16:14:24 -070020 // CJX_Object:
21 bool DynamicTypeIs(TypeTag eType) const override;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070022
Haibo Huang49cc9302020-04-27 16:14:24 -070023 JSE_METHOD(append);
24 JSE_METHOD(insert);
25 JSE_METHOD(item);
26 JSE_METHOD(remove);
27
28 JSE_PROP(length);
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070029
kumarashishg826308d2023-06-23 13:21:22 +000030 protected:
31 explicit CJX_List(CXFA_List* list);
32
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070033 private:
Haibo Huang49cc9302020-04-27 16:14:24 -070034 using Type__ = CJX_List;
35 using ParentType__ = CJX_Object;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070036
Haibo Huang49cc9302020-04-27 16:14:24 -070037 static const TypeTag static_type__ = TypeTag::List;
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070038 static const CJX_MethodSpec MethodSpecs[];
Haibo Huang49cc9302020-04-27 16:14:24 -070039
40 CXFA_List* GetXFAList();
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070041};
42
43#endif // FXJS_XFA_CJX_LIST_H_