ActionCollection.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/collections/ienumerator.h>
5 #include <system/collections/icollection.h>
6 #include <system/array.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 Annotations
16 {
17 class PdfAction;
18 } // namespace Annotations
19 namespace Engine
20 {
21 namespace Data
22 {
23 class IPdfPrimitive;
24 class ITrailerable;
25 } // namespace Data
26 } // namespace Engine
27 } // namespace Pdf
28 } // namespace Aspose
29 namespace System
30 {
31 namespace Collections
32 {
33 namespace Generic
34 {
35 template <typename> class List;
36 } // namespace Generic
37 } // namespace Collections
38 } // namespace System
39 
40 namespace Aspose {
41 
42 namespace Pdf {
43 
44 namespace Annotations {
45 
49 class ASPOSE_PDF_SHARED_CLASS ActionCollection final : public System::Collections::Generic::ICollection<System::SharedPtr<Aspose::Pdf::Annotations::PdfAction>>
50 {
51  typedef ActionCollection ThisType;
53 
54  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
55  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
56 
58 
59 private:
60 
61  class ActionsEnumerator : public System::Collections::Generic::IEnumerator<System::SharedPtr<Aspose::Pdf::Annotations::PdfAction>>
62  {
63  typedef ActionsEnumerator ThisType;
65 
66  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
67  RTTI_INFO_DECL();
68  CODEPORTING_ENUMERATOR_ITERATOR_METHODS_DECLARATION(CODEPORTING_ARGS(System::SharedPtr<PdfAction>), CODEPORTING_NO_API_KEYWORD);
69 
70  public:
71 
72  const System::SharedPtr<PdfAction>& get_Current() const override;
73 
75 
76  bool MoveNext() override;
77  void Reset() override;
78  void Dispose() override;
79 
80  private:
81 
83  int32_t cursor;
84 
85  bool MoveNextImplementation();
86  System::SharedPtr<PdfAction>* GetCurrentElementPointer();
87 
88  };
89 
90 
91 public:
92 
96  ASPOSE_PDF_SHARED_API int32_t get_Count() const override;
100  ASPOSE_PDF_SHARED_API bool get_IsSynchronized();
104  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Object> get_SyncRoot() const;
108  ASPOSE_PDF_SHARED_API bool get_IsReadOnly() const override;
109 
114  ASPOSE_PDF_SHARED_API void Add(const System::SharedPtr<PdfAction>& action) override;
119  ASPOSE_PDF_SHARED_API void Delete(int32_t index);
123  ASPOSE_PDF_SHARED_API void Delete();
129  ASPOSE_PDF_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<PdfAction>> array, int32_t index) override;
138  ASPOSE_PDF_SHARED_API void Clear() override;
144  ASPOSE_PDF_SHARED_API bool Contains(const System::SharedPtr<PdfAction>& item) const override;
150  ASPOSE_PDF_SHARED_API bool Remove(const System::SharedPtr<PdfAction>& item) override;
151 
157  ASPOSE_PDF_SHARED_API System::SharedPtr<PdfAction> idx_get(int32_t index);
158 
159 protected:
160 
163 
165 
166  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ActionCollection, CODEPORTING_ARGS(System::SharedPtr<PdfAction> owner));
168 
169  virtual ASPOSE_PDF_SHARED_API ~ActionCollection();
170 
171 private:
172 
175 
176  System::SharedPtr<PdfAction> get(int32_t index);
177 
178 };
179 
180 } // namespace Annotations
181 } // namespace Pdf
182 } // namespace Aspose
183 
184 
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
Definition: Artifact.h:67
System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfPrimitive > _actions
Definition: ActionCollection.h:161
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Interface of enumerator which can be used to iterate through some elements. Objects of this class sho...
Definition: BaseOperatorCollection.h:47
Definition: AFRelationship.h:4
Collection of actions
Definition: ActionCollection.h:49
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: TextFragmentState.h:69
Represents Action in PDF document
Definition: PdfAction.h:75
System::WeakPtr< PdfAction > _owner
Definition: ActionCollection.h:162
Interface of collection of elements. Objects of this class should only be allocated using System::Mak...
Definition: Collection.h:41
Whole PDF file will be submitted.