Aspose.Tasks for C++
OutlineCodeDefinitionCollection.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="OutlineCodeDefinitionCollection.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/collections/list.h>
9 #include <system/collections/ilist.h>
10 #include <system/array.h>
11 #include <cstdint>
12 
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
14 
15 namespace Aspose
16 {
17 namespace Tasks
18 {
19 namespace Connectivity
20 {
21 class MpdOutlineCodeDefinitionMapper;
22 } // namespace Connectivity
23 namespace IO
24 {
25 namespace MSProject
26 {
27 class MPP12Reader;
28 class MPP14Reader;
29 class MPP9OutlineCodeDefinitionWriter;
30 class MPP9Reader;
31 } // namespace MSProject
32 namespace Xer
33 {
34 class PrimaveraExtendedAttributeLookupBuilder;
35 } // namespace Xer
36 namespace Xml
37 {
38 class XmlReader;
39 } // namespace Xml
40 } // namespace IO
41 class OutlineCodeDefinition;
42 class Project;
43 namespace Visualization
44 {
45 template <typename> class FieldToColumnText;
46 } // namespace Visualization
47 } // namespace Tasks
48 } // namespace Aspose
49 namespace System
50 {
51 namespace Collections
52 {
53 namespace Generic
54 {
55 template <typename> class IComparer;
56 template <typename> class IEnumerator;
57 } // namespace Generic
58 } // namespace Collections
59 } // namespace System
60 
61 namespace Aspose {
62 
63 namespace Tasks {
64 
65 /// <summary>
66 /// Represents a collection of <see cref="OutlineCodeDefinition"></see> objects.
67 /// </summary>
68 class ASPOSE_TASKS_SHARED_CLASS OutlineCodeDefinitionCollection : public System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::OutlineCodeDefinition>>
69 {
71  typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::OutlineCodeDefinition>> BaseType;
72 
73  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
74  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
75 
76  friend class Aspose::Tasks::IO::Xer::PrimaveraExtendedAttributeLookupBuilder;
77  friend class Aspose::Tasks::Project;
78  friend class Aspose::Tasks::Connectivity::MpdOutlineCodeDefinitionMapper;
79  friend class Aspose::Tasks::IO::MSProject::MPP12Reader;
80  friend class Aspose::Tasks::IO::MSProject::MPP14Reader;
81  friend class Aspose::Tasks::IO::MSProject::MPP9Reader;
82  friend class Aspose::Tasks::IO::MSProject::MPP9OutlineCodeDefinitionWriter;
83  friend class Aspose::Tasks::IO::Xml::XmlReader;
84  template<typename FT0> friend class Aspose::Tasks::Visualization::FieldToColumnText;
85 
86 public:
87  /// A collection type whose iterator types is used as iterator types in the current collection.
88  using iterator_holder_type = System::Collections::Generic::List<System::SharedPtr<OutlineCodeDefinition>>;
89  /// Iterator type.
90  using iterator = typename iterator_holder_type::iterator;
91  /// Const iterator type.
92  using const_iterator = typename iterator_holder_type::const_iterator;
93  /// Virtualized element type.
94  using virtualized_iterator_element = typename iterator_holder_type::virtualized_iterator_element;
95  /// Virtualized type.
96  using virtualized_iterator = typename iterator_holder_type::virtualized_iterator;
97 
98 public:
99 
100  /// <summary>
101  /// Gets the number of elements contained in this collection.
102  /// </summary>
103  ASPOSE_TASKS_SHARED_API int32_t get_Count() const override;
104  /// <summary>
105  /// Gets a value indicating whether this collection is read-only; otherwise, false.
106  /// </summary>
107  ASPOSE_TASKS_SHARED_API bool get_IsReadOnly() const override;
108 
109  /// <summary>
110  /// Returns the element at the specified index.
111  /// </summary>
112  /// <param name="index">The zero-based index of the element to get or set.</param>
113  /// <returns>the element at the specified index.</returns>
114  ASPOSE_TASKS_SHARED_API System::SharedPtr<OutlineCodeDefinition> idx_get(int32_t index) const override;
115  /// <summary>
116  /// Sets the element at the specified index.
117  /// </summary>
118  /// <param name="index">The zero-based index of the element to get or set.</param>
119  /// <param name="value">the element at the specified index.</param>
120  ASPOSE_TASKS_SHARED_API void idx_set(int32_t index, System::SharedPtr<OutlineCodeDefinition> value) override;
121 
122  /// <summary>
123  /// Returns an enumerator for this collection.
124  /// </summary>
125  /// <returns>an enumerator for this collection.</returns>
126  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<OutlineCodeDefinition>>> GetEnumerator() override;
127  /// <summary>
128  /// Adds the specified item to this collection.
129  /// </summary>
130  /// <param name="item">the specified item to add to this collection.</param>
131  ASPOSE_TASKS_SHARED_API void Add(const System::SharedPtr<OutlineCodeDefinition>& item) override;
132  /// <summary>
133  /// Removes all items from this collection.
134  /// </summary>
135  ASPOSE_TASKS_SHARED_API void Clear() override;
136  /// <summary>
137  /// Returns true if the specified item is found in this collection; otherwise, false.
138  /// </summary>
139  /// <param name="item">the specified item to find.</param>
140  /// <returns>true if the specified item is found in this collection; otherwise, false.</returns>
141  ASPOSE_TASKS_SHARED_API bool Contains(const System::SharedPtr<OutlineCodeDefinition>& item) const override;
142  /// <summary>
143  /// Copies the elements of this collection to the specified array, starting at the specified array index.
144  /// </summary>
145  /// <param name="array">the specified one-dimensional array to copy elements to</param>
146  /// <param name="arrayIndex">the zero-based index of the specified array at which copying begins.</param>
147  ASPOSE_TASKS_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<OutlineCodeDefinition>> array, int32_t arrayIndex) override;
148  /// <summary>
149  /// Removes the first occurrence of a specific object from this collection.
150  /// </summary>
151  /// <param name="item">the specified object to remove.</param>
152  /// <returns>true if the specified object was successfully removed from this collection; otherwise, false.</returns>
153  ASPOSE_TASKS_SHARED_API bool Remove(const System::SharedPtr<OutlineCodeDefinition>& item) override;
154  /// <summary>
155  /// Determines the index of the specified item in this collection.
156  /// </summary>
157  /// <param name="item">the specified item to locate in this collection.</param>
158  /// <returns>the index of the specified item if found; otherwise, -1.</returns>
159  ASPOSE_TASKS_SHARED_API int32_t IndexOf(const System::SharedPtr<OutlineCodeDefinition>& item) const override;
160  /// <summary>
161  /// Inserts the specified item at the specified index.
162  /// </summary>
163  /// <param name="index">the specified zero-based index at which the item should be inserted.</param>
164  /// <param name="item">the specified item to insert to this collection.</param>
165  ASPOSE_TASKS_SHARED_API void Insert(int32_t index, const System::SharedPtr<OutlineCodeDefinition>& item) override;
166  /// <summary>
167  /// Removes an item at the specified index.
168  /// </summary>
169  /// <param name="index">the specified zero-based index to remove an item at.</param>
170  ASPOSE_TASKS_SHARED_API void RemoveAt(int32_t index) override;
171  /// <summary>
172  /// Converts this OutlineCodeDefinitionCollection object to a list of <see cref="OutlineCodeDefinition"></see> objects.
173  /// </summary>
174  /// <returns>List of <see cref="OutlineCodeDefinition"></see> objects.</returns>
175  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<OutlineCodeDefinition>>> ToList();
176  /// Gets iterator pointing to the first element (if any) of the collection.
177  /// @return An iterator pointing to the first element (if any) of the collection
178  ASPOSE_TASKS_SHARED_API iterator begin() noexcept;
179  /// Gets iterator pointing right after the last element (if any) of the collection.
180  /// @return An iterator pointing right after the last element (if any) of the collection
181  ASPOSE_TASKS_SHARED_API iterator end() noexcept;
182  /// Gets iterator pointing to the first element (if any) of the const-qualified instance of the collection.
183  /// @return An iterator pointing to the first element (if any) of the const-qualified instance of the collection
184  ASPOSE_TASKS_SHARED_API const_iterator begin() const noexcept;
185  /// Gets iterator pointing right after the last element (if any) of the const-qualified instance of the collection.
186  /// @return An iterator pointing right after the last element (if any) of the const-qualified instance of the collection
187  ASPOSE_TASKS_SHARED_API const_iterator end() const noexcept;
188  /// Gets iterator pointing to the first const-qualified element (if any) of the collection.
189  /// @return An iterator pointing to the first const-qualified element (if any) of the collection
190  ASPOSE_TASKS_SHARED_API const_iterator cbegin() const noexcept;
191  /// Gets iterator pointing right after the last const-qualified element (if any) of the collection.
192  /// @return An iterator pointing right after the last const-qualified element (if any) of the collection
193  ASPOSE_TASKS_SHARED_API const_iterator cend() const noexcept;
194  /// Gets iterator pointing to the first element (if any) of the collection.
195  /// @return An iterator pointing to the first element (if any) of the collection
196  /// Provides iterator implementation to container's first element.
197  /// @return Newly-created iterator object.
198  ASPOSE_TASKS_SHARED_API virtualized_iterator* virtualizeBeginIterator() override;
199  /// Gets iterator pointing right after the last element (if any) of the collection.
200  /// @return An iterator pointing right after the last element (if any) of the collection
201  /// Provides iterator implementation to container's end.
202  /// @return Newly-created iterator object.
203  ASPOSE_TASKS_SHARED_API virtualized_iterator* virtualizeEndIterator() override;
204  /// Gets iterator pointing to the first element (if any)of the const-qualified instance of the collection.
205  /// @return An iterator pointing to the first element (if any)of the const-qualified instance of the collection
206  /// Provides const iterator implementation to container's first element.
207  /// @return Newly-created iterator object.
208  ASPOSE_TASKS_SHARED_API virtualized_iterator* virtualizeBeginConstIterator() const override;
209  /// Gets iterator pointing right after the last element (if any)of the const-qualified instance of the collection.
210  /// @return An iterator pointing right after the last element (if any)of the const-qualified instance of the collection
211  /// Provides const iterator implementation to container's end.
212  /// @return Newly-created iterator object.
213  ASPOSE_TASKS_SHARED_API virtualized_iterator* virtualizeEndConstIterator() const override;
214 
215 protected:
216 
217  ASPOSE_TASKS_SHARED_API OutlineCodeDefinitionCollection();
218 
219  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(OutlineCodeDefinitionCollection, CODEPORTING_ARGS());
220 
221  ASPOSE_TASKS_SHARED_API OutlineCodeDefinitionCollection(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<OutlineCodeDefinition>>>& definitions);
222 
223  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(OutlineCodeDefinitionCollection, CODEPORTING_ARGS(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<OutlineCodeDefinition>>>& definitions));
224  ASPOSE_TASKS_SHARED_API void Sort(const System::SharedPtr<System::Collections::Generic::IComparer<System::SharedPtr<OutlineCodeDefinition>>>& comparer);
225  ASPOSE_TASKS_SHARED_API System::SharedPtr<OutlineCodeDefinition> GetByFieldId(int32_t fieldId);
226 
227  virtual ASPOSE_TASKS_SHARED_API ~OutlineCodeDefinitionCollection();
228 
229  #ifdef ASPOSE_GET_SHARED_MEMBERS
230  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
231  #endif
232 
233 
234 private:
235 
236  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<OutlineCodeDefinition>>> definitions;
237 
238 };
239 
240 } // namespace Tasks
241 } // namespace Aspose
242 
243 
Represents a collection of OutlineCodeDefinition objects.
Definition: OutlineCodeDefinitionCollection.h:69
void idx_set(int32_t index, System::SharedPtr< OutlineCodeDefinition > value) override
Sets the element at the specified index.
void RemoveAt(int32_t index) override
Removes an item at the specified index.
System::SharedPtr< OutlineCodeDefinition > idx_get(int32_t index) const override
Returns the element at the specified index.
typename iterator_holder_type::iterator iterator
Iterator type.
Definition: OutlineCodeDefinitionCollection.h:90
bool Remove(const System::SharedPtr< OutlineCodeDefinition > &item) override
Removes the first occurrence of a specific object from this collection.
void Clear() override
Removes all items from this collection.
void CopyTo(System::ArrayPtr< System::SharedPtr< OutlineCodeDefinition >> array, int32_t arrayIndex) override
Copies the elements of this collection to the specified array, starting at the specified array index.
typename iterator_holder_type::virtualized_iterator_element virtualized_iterator_element
Virtualized element type.
Definition: OutlineCodeDefinitionCollection.h:94
bool Contains(const System::SharedPtr< OutlineCodeDefinition > &item) const override
Returns true if the specified item is found in this collection; otherwise, false.
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< OutlineCodeDefinition > > > ToList()
Converts this OutlineCodeDefinitionCollection object to a list of OutlineCodeDefinition objects.
void Insert(int32_t index, const System::SharedPtr< OutlineCodeDefinition > &item) override
Inserts the specified item at the specified index.
void Add(const System::SharedPtr< OutlineCodeDefinition > &item) override
Adds the specified item to this collection.
int32_t IndexOf(const System::SharedPtr< OutlineCodeDefinition > &item) const override
Determines the index of the specified item in this collection.
System::Collections::Generic::List< System::SharedPtr< OutlineCodeDefinition > > iterator_holder_type
A collection type whose iterator types is used as iterator types in the current collection.
Definition: OutlineCodeDefinitionCollection.h:88
typename iterator_holder_type::virtualized_iterator virtualized_iterator
Virtualized type.
Definition: OutlineCodeDefinitionCollection.h:96
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< OutlineCodeDefinition > > > GetEnumerator() override
Returns an enumerator for this collection.
int32_t get_Count() const override
Gets the number of elements contained in this collection.
typename iterator_holder_type::const_iterator const_iterator
Const iterator type.
Definition: OutlineCodeDefinitionCollection.h:92
bool get_IsReadOnly() const override
Gets a value indicating whether this collection is read-only; otherwise, false.
Represents an outline code definition.
Definition: OutlineCodeDefinition.h:84
Represents a project.
Definition: Project.h:552
Definition: Asn.h:13