PdfActionCollection.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/ienumerator.h>
7 #include <system/collections/ienumerable.h>
8 #include <cstdint>
9 
10 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
11 
12 namespace Aspose
13 {
14 namespace Pdf
15 {
16 namespace Annotations
17 {
18 class Annotation;
19 class PdfAction;
20 } // namespace Annotations
21 } // namespace Pdf
22 } // namespace Aspose
23 namespace System
24 {
25 namespace Collections
26 {
27 namespace Generic
28 {
29 template <typename> class List;
30 } // namespace Generic
31 } // namespace Collections
32 } // namespace System
33 
34 namespace Aspose {
35 
36 namespace Pdf {
37 
38 namespace Annotations {
39 
43 class ASPOSE_PDF_SHARED_CLASS PdfActionCollection : public System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Pdf::Annotations::PdfAction>>
44 {
47 
48  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
49  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
50 
52 
53 private:
54 
55  class PdfActionsEnumerator : public System::Collections::Generic::IEnumerator<System::SharedPtr<Aspose::Pdf::Annotations::PdfAction>>
56  {
57  typedef PdfActionsEnumerator ThisType;
59 
60  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
61  RTTI_INFO_DECL();
62  CODEPORTING_ENUMERATOR_ITERATOR_METHODS_DECLARATION(CODEPORTING_ARGS(System::SharedPtr<PdfAction>), CODEPORTING_NO_API_KEYWORD);
63 
64  public:
65 
66  const System::SharedPtr<PdfAction>& get_Current() const override;
67 
68  PdfActionsEnumerator(System::SharedPtr<PdfActionCollection> actions);
69 
70  bool MoveNext() override;
71  void Reset() override;
72  void Dispose() override;
73 
74  private:
75 
77  int32_t cursor;
78 
79  bool MoveNextImplementation();
80  System::SharedPtr<PdfAction>* GetCurrentElementPointer();
81 
82  };
83 
84 
85 public:
86 
90  ASPOSE_PDF_SHARED_API int32_t get_Count();
91 
97  ASPOSE_PDF_SHARED_API System::SharedPtr<PdfAction> idx_get(int32_t index);
98 
103  ASPOSE_PDF_SHARED_API void Delete(int32_t index);
108  ASPOSE_PDF_SHARED_API void Add(System::SharedPtr<PdfAction> action);
114 
115 protected:
116 
118 
119  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(PdfActionCollection, CODEPORTING_ARGS(System::SharedPtr<Annotation> annotation));
120 
121  virtual ASPOSE_PDF_SHARED_API ~PdfActionCollection();
122 
123 private:
124 
125  System::WeakPtr<Annotation> _annotation;
127 
128  void ValidateCache();
129  void SaveCache();
130 
131 };
132 
133 } // namespace Annotations
134 } // namespace Pdf
135 } // namespace Aspose
136 
137 
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
Definition: Artifact.h:67
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
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: TextFragmentState.h:69
Class describes list of actions.
Definition: PdfActionCollection.h:43
Interface of object providing enumerator on contained elements.
Definition: Document.h:593
Class representing annotation object.
Definition: Annotation.h:303
Whole PDF file will be submitted.