Aspose.Tasks for C++
OutlineMaskCollection.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="OutlineMaskCollection.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/collections/ilist.h>
9 #include <system/array.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
13 
14 namespace Aspose
15 {
16 namespace Tasks
17 {
18 namespace IO
19 {
20 namespace MSProject
21 {
22 class MPP12OutlineCodeDefinitionReader;
23 class MPP14OutlineCodeDefinitionReader;
24 class MPP9OutlineCodeDefinitionReader;
25 } // namespace MSProject
26 namespace Xml
27 {
28 class OutlineCodeDefinitionXml;
29 } // namespace Xml
30 } // namespace IO
31 class OutlineCodeDefinition;
32 class OutlineMask;
33 } // namespace Tasks
34 } // namespace Aspose
35 namespace System
36 {
37 namespace Collections
38 {
39 namespace Generic
40 {
41 template <typename> class IEnumerable;
42 template <typename> class IEnumerator;
43 } // namespace Generic
44 } // namespace Collections
45 } // namespace System
46 
47 namespace Aspose {
48 
49 namespace Tasks {
50 
51 /// <summary>
52 /// Represents a collection of <see cref="OutlineMask"></see> objects.
53 /// </summary>
54 class ASPOSE_TASKS_SHARED_CLASS OutlineMaskCollection : public System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::OutlineMask>>
55 {
57  typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::OutlineMask>> BaseType;
58 
59  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
60  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
61 
62  friend class Aspose::Tasks::IO::MSProject::MPP12OutlineCodeDefinitionReader;
63  friend class Aspose::Tasks::IO::MSProject::MPP14OutlineCodeDefinitionReader;
64  friend class Aspose::Tasks::IO::MSProject::MPP9OutlineCodeDefinitionReader;
65  friend class Aspose::Tasks::IO::Xml::OutlineCodeDefinitionXml;
67 
68 public:
69 
70  /// <summary>
71  /// Gets the number of elements contained in this collection.
72  /// </summary>
73  ASPOSE_TASKS_SHARED_API int32_t get_Count() const override;
74  /// <summary>
75  /// Gets a value indicating whether this collection is read-only; otherwise, false.
76  /// </summary>
77  ASPOSE_TASKS_SHARED_API bool get_IsReadOnly() const override;
78 
79  /// <summary>
80  /// Returns the element at the specified index.
81  /// </summary>
82  /// <param name="index">The zero-based index of the element to get or set.</param>
83  /// <returns>the element at the specified index.</returns>
84  ASPOSE_TASKS_SHARED_API System::SharedPtr<OutlineMask> idx_get(int32_t index) const override;
85  /// <summary>
86  /// Sets the element at the specified index.
87  /// </summary>
88  /// <param name="index">The zero-based index of the element to get or set.</param>
89  /// <param name="value">the element at the specified index.</param>
90  ASPOSE_TASKS_SHARED_API void idx_set(int32_t index, System::SharedPtr<OutlineMask> value) override;
91 
92  /// <summary>
93  /// Returns an enumerator for this collection.
94  /// </summary>
95  /// <returns>an enumerator for this collection.</returns>
96  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<OutlineMask>>> GetEnumerator() override;
97  /// <summary>
98  /// Adds the specified item to this collection.
99  /// </summary>
100  /// <param name="item">the specified item to add to this collection.</param>
101  ASPOSE_TASKS_SHARED_API void Add(const System::SharedPtr<OutlineMask>& item) override;
102  /// <summary>
103  /// Removes all items from this collection.
104  /// </summary>
105  ASPOSE_TASKS_SHARED_API void Clear() override;
106  /// <summary>
107  /// Returns true if the specified item is found in this collection; otherwise, false.
108  /// </summary>
109  /// <param name="item">the specified item to find.</param>
110  /// <returns>true if the specified item is found in this collection; otherwise, false.</returns>
111  ASPOSE_TASKS_SHARED_API bool Contains(const System::SharedPtr<OutlineMask>& item) const override;
112  /// <summary>
113  /// Copies the elements of this collection to the specified array, starting at the specified array index.
114  /// </summary>
115  /// <param name="array">the specified one-dimensional array to copy elements to</param>
116  /// <param name="arrayIndex">the zero-based index of the specified array at which copying begins.</param>
117  ASPOSE_TASKS_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<OutlineMask>> array, int32_t arrayIndex) override;
118  /// <summary>
119  /// Removes the first occurrence of a specific object from this collection.
120  /// </summary>
121  /// <param name="item">the specified object to remove.</param>
122  /// <returns>true if the specified object was successfully removed from this collection; otherwise, false.</returns>
123  ASPOSE_TASKS_SHARED_API bool Remove(const System::SharedPtr<OutlineMask>& item) override;
124  /// <summary>
125  /// Determines the index of the specified item in this collection.
126  /// </summary>
127  /// <param name="item">the specified item to locate in this collection.</param>
128  /// <returns>the index of the specified item if found; otherwise, -1.</returns>
129  ASPOSE_TASKS_SHARED_API int32_t IndexOf(const System::SharedPtr<OutlineMask>& item) const override;
130  /// <summary>
131  /// Inserts the specified item at the specified index.
132  /// </summary>
133  /// <param name="index">the specified zero-based index at which the item should be inserted.</param>
134  /// <param name="item">the specified item to insert to this collection.</param>
135  ASPOSE_TASKS_SHARED_API void Insert(int32_t index, const System::SharedPtr<OutlineMask>& item) override;
136  /// <summary>
137  /// Removes an item at the specified index.
138  /// </summary>
139  /// <param name="index">the specified zero-based index to remove an item at.</param>
140  ASPOSE_TASKS_SHARED_API void RemoveAt(int32_t index) override;
141 
142 protected:
143 
144  ASPOSE_TASKS_SHARED_API OutlineMaskCollection();
145 
146  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(OutlineMaskCollection, CODEPORTING_ARGS());
147 
148  ASPOSE_TASKS_SHARED_API OutlineMaskCollection(const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<OutlineMask>>>& masks);
149 
150  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(OutlineMaskCollection, CODEPORTING_ARGS(const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<OutlineMask>>>& masks));
151  ASPOSE_TASKS_SHARED_API void AddRange(const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<OutlineMask>>>& maskCollection);
152 
153  virtual ASPOSE_TASKS_SHARED_API ~OutlineMaskCollection();
154 
155  #ifdef ASPOSE_GET_SHARED_MEMBERS
156  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
157  #endif
158 
159 
160 private:
161 
162  System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<OutlineMask>>> masks;
163 
164 };
165 
166 } // namespace Tasks
167 } // namespace Aspose
168 
169 
Represents an outline code definition.
Definition: OutlineCodeDefinition.h:84
Represents a collection of OutlineMask objects.
Definition: OutlineMaskCollection.h:55
int32_t IndexOf(const System::SharedPtr< OutlineMask > &item) const override
Determines the index of the specified item in this collection.
void idx_set(int32_t index, System::SharedPtr< OutlineMask > value) override
Sets the element at the specified index.
int32_t get_Count() const override
Gets the number of elements contained in this collection.
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< OutlineMask > > > GetEnumerator() override
Returns an enumerator for this collection.
void CopyTo(System::ArrayPtr< System::SharedPtr< OutlineMask >> array, int32_t arrayIndex) override
Copies the elements of this collection to the specified array, starting at the specified array index.
System::SharedPtr< OutlineMask > idx_get(int32_t index) const override
Returns the element at the specified index.
void Clear() override
Removes all items from this collection.
bool Remove(const System::SharedPtr< OutlineMask > &item) override
Removes the first occurrence of a specific object from this collection.
void Insert(int32_t index, const System::SharedPtr< OutlineMask > &item) override
Inserts the specified item at the specified index.
bool get_IsReadOnly() const override
Gets a value indicating whether this collection is read-only; otherwise, false.
bool Contains(const System::SharedPtr< OutlineMask > &item) const override
Returns true if the specified item is found in this collection; otherwise, false.
void Add(const System::SharedPtr< OutlineMask > &item) override
Adds the specified item to this collection.
void RemoveAt(int32_t index) override
Removes an item at the specified index.
Definition: Asn.h:13