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