Aspose.Tasks for C++
GroupCriterionCollection.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="GroupCriterionCollection.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 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 class Group;
19 class GroupCriterion;
20 } // namespace Tasks
21 } // namespace Aspose
22 namespace System
23 {
24 namespace Collections
25 {
26 namespace Generic
27 {
28 template <typename> class IEnumerator;
29 template <typename> class List;
30 } // namespace Generic
31 } // namespace Collections
32 } // namespace System
33 
34 namespace Aspose {
35 
36 namespace Tasks {
37 
38 /// <summary>
39 /// Contains a collection of <see cref="GroupCriterion"></see> objects.
40 /// Implements ICollection&lt;GroupCriterion&gt; interface.
41 /// </summary>
42 class ASPOSE_TASKS_SHARED_CLASS GroupCriterionCollection : public System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::GroupCriterion>>
43 {
45  typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::GroupCriterion>> BaseType;
46 
47  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
48  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
49 
50  friend class Aspose::Tasks::Group;
51 
52 public:
53 
54  /// <summary>
55  /// Gets the number of elements contained in this collection.
56  /// </summary>
57  ASPOSE_TASKS_SHARED_API int32_t get_Count() const override;
58  /// <summary>
59  /// Gets a value indicating whether this collection is read-only; otherwise, false.
60  /// </summary>
61  ASPOSE_TASKS_SHARED_API bool get_IsReadOnly() const override;
62 
63  /// <summary>
64  /// Returns an enumerator for this collection.
65  /// </summary>
66  /// <returns>an enumerator for this collection.</returns>
67  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<GroupCriterion>>> GetEnumerator() override;
68  /// <summary>
69  /// Adds the specified item to this collection.
70  /// </summary>
71  /// <param name="item">the specified item to add to this collection.</param>
72  ASPOSE_TASKS_SHARED_API void Add(const System::SharedPtr<GroupCriterion>& item) override;
73  /// <summary>
74  /// Removes all items from this collection.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API void Clear() override;
77  /// <summary>
78  /// Returns true if the specified item is found in this collection; otherwise, false.
79  /// </summary>
80  /// <param name="item">the specified item to find.</param>
81  /// <returns>true if the specified item is found in this collection; otherwise, false.</returns>
82  ASPOSE_TASKS_SHARED_API bool Contains(const System::SharedPtr<GroupCriterion>& item) const override;
83  /// <summary>
84  /// Copies the elements of this collection to the specified array, starting at the specified array index.
85  /// </summary>
86  /// <param name="array">the specified one-dimensional array to copy elements to</param>
87  /// <param name="arrayIndex">the zero-based index of the specified array at which copying begins.</param>
88  ASPOSE_TASKS_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<GroupCriterion>> array, int32_t arrayIndex) override;
89  /// <summary>
90  /// Removes the first occurrence of a specific object from this collection.
91  /// </summary>
92  /// <param name="item">the specified object to remove.</param>
93  /// <returns>true if the specified object was successfully removed from this collection; otherwise, false.</returns>
94  ASPOSE_TASKS_SHARED_API bool Remove(const System::SharedPtr<GroupCriterion>& item) override;
95  /// <summary>
96  /// Converts a GroupCriterion collection to a list of <see cref="GroupCriterion"></see> objects.
97  /// </summary>
98  /// <returns>Generic list of <see cref="GroupCriterion"></see> objects.</returns>
99  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<GroupCriterion>>> ToList();
100 
101 protected:
102 
103  /// <summary>
104  /// Initializes a new instance of the <see cref="GroupCriterionCollection"></see> class.
105  /// </summary>
106  ASPOSE_TASKS_SHARED_API GroupCriterionCollection();
107 
108  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(GroupCriterionCollection, CODEPORTING_ARGS());
109 
110  /// <summary>
111  /// Initializes a new instance of the <see cref="GroupCriterionCollection"></see> class.
112  /// </summary>
113  ASPOSE_TASKS_SHARED_API GroupCriterionCollection(const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<GroupCriterion>>>& items);
114 
115  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(GroupCriterionCollection, CODEPORTING_ARGS(const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<GroupCriterion>>>& items));
116 
117  virtual ASPOSE_TASKS_SHARED_API ~GroupCriterionCollection();
118 
119  #ifdef ASPOSE_GET_SHARED_MEMBERS
120  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
121  #endif
122 
123 
124 private:
125 
126  System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<GroupCriterion>>> items;
127 
128  System::SharedPtr<GroupCriterion> idx_get(int32_t index) const override;
129  void idx_set(int32_t index, System::SharedPtr<GroupCriterion> value) override;
130 
131  int32_t IndexOf(const System::SharedPtr<GroupCriterion>& item) const override;
132  void Insert(int32_t index, const System::SharedPtr<GroupCriterion>& item) override;
133  void RemoveAt(int32_t index) override;
134 
135 };
136 
137 } // namespace Tasks
138 } // namespace Aspose
139 
140 
Definition: Asn.h:12
Contains a collection of GroupCriterion objects. Implements ICollection<GroupCriterion> interface.
Definition: GroupCriterionCollection.h:42
Represents a group definition. A Group object is a member of the ResourceGroups collection or the Tas...
Definition: Group.h:42