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