ElementList.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/weak_ptr.h>
5 #include <system/shared_ptr.h>
6 #include <system/collections/ienumerable.h>
7 #include <cstdint>
8 
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 namespace LogicalStructure
16 {
17 class Element;
18 class StructTreeRootElement;
19 class StructureElement;
20 } // namespace LogicalStructure
21 } // namespace Pdf
22 } // namespace Aspose
23 namespace System
24 {
25 namespace Collections
26 {
27 namespace Generic
28 {
29 template <typename> class IEnumerator;
30 template <typename> class List;
31 } // namespace Generic
32 } // namespace Collections
33 } // namespace System
34 
35 namespace Aspose {
36 
37 namespace Pdf {
38 
39 namespace LogicalStructure {
40 
44 class ASPOSE_PDF_SHARED_CLASS ElementList : public System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Pdf::LogicalStructure::Element>>
45 {
46  typedef ElementList ThisType;
48 
49  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
50  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
51 
55 
56 public:
57 
61  virtual ASPOSE_PDF_SHARED_API int32_t get_Count() = 0;
62 
68  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Element> Item(int32_t index) = 0;
69 
75  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Element> idx_get(int32_t index);
76 
81  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<Element>>> GetEnumerator() override = 0;
82 
83 protected:
84 
85  virtual void AddElement(System::SharedPtr<Element> element, bool updatePdfDictionary = true) = 0;
86  virtual void RemoveElement(System::SharedPtr<Element> element, bool updatePdfDictionary = true) = 0;
87 
88  ElementList();
89 
90  virtual ASPOSE_PDF_SHARED_API ~ElementList();
91 
92 };
93 
95 {
98 
99  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
100  RTTI_INFO_DECL();
101 
102 public:
103 
104  int32_t get_Count() override;
105 
107 
108  System::SharedPtr<Element> Item(int32_t index) override;
110  void AddElement(System::SharedPtr<Element> element, bool updatePdfDictionary = true) override;
111  void RemoveElement(System::SharedPtr<Element> element, bool updatePdfDictionary = true) override;
112 
113 protected:
114 
115  virtual ~ElementListImplementation();
116 
117 private:
118 
121 
122 };
123 
124 } // namespace LogicalStructure
125 } // namespace Pdf
126 } // namespace Aspose
127 
128 
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
Definition: Artifact.h:67
Represents StructTreeRoot object in logical structure.
Definition: StructTreeRootElement.h:69
Represents an ordered collection of elements.
Definition: ElementList.h:44
Represents a base class for structure elements in logical structure.
Definition: StructureElement.h:71
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Definition: AFRelationship.h:4
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: TextFragmentState.h:69
Represents a base class for element in logical structure.
Definition: Element.h:98
Interface of object providing enumerator on contained elements.
Definition: Document.h:588
This value is used for internal purposes and is not intended to be used directly from your code...
Whole PDF file will be submitted.