Aspose.Tasks for C++
GroupCriterionCollection.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="GroupCriterionCollection.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 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  /// @deprecated This member is obsolete and will be removed after release 25.6.
63  /// <summary>
64  /// Gets the parent of the GroupCriterion object.
65  /// </summary>
66  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Group>& get_ParentGroup() const;
67 
68  /// <summary>
69  /// Returns an enumerator for this collection.
70  /// </summary>
71  /// <returns>an enumerator for this collection.</returns>
72  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<GroupCriterion>>> GetEnumerator() override;
73  /// <summary>
74  /// Adds the specified item to this collection.
75  /// </summary>
76  /// <param name="item">the specified item to add to this collection.</param>
77  ASPOSE_TASKS_SHARED_API void Add(const System::SharedPtr<GroupCriterion>& item) override;
78  /// <summary>
79  /// Removes all items from this collection.
80  /// </summary>
81  ASPOSE_TASKS_SHARED_API void Clear() override;
82  /// <summary>
83  /// Returns true if the specified item is found in this collection; otherwise, false.
84  /// </summary>
85  /// <param name="item">the specified item to find.</param>
86  /// <returns>true if the specified item is found in this collection; otherwise, false.</returns>
87  ASPOSE_TASKS_SHARED_API bool Contains(const System::SharedPtr<GroupCriterion>& item) const override;
88  /// <summary>
89  /// Copies the elements of this collection to the specified array, starting at the specified array index.
90  /// </summary>
91  /// <param name="array">the specified one-dimensional array to copy elements to</param>
92  /// <param name="arrayIndex">the zero-based index of the specified array at which copying begins.</param>
93  ASPOSE_TASKS_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<GroupCriterion>> array, int32_t arrayIndex) override;
94  /// <summary>
95  /// Removes the first occurrence of a specific object from this collection.
96  /// </summary>
97  /// <param name="item">the specified object to remove.</param>
98  /// <returns>true if the specified object was successfully removed from this collection; otherwise, false.</returns>
99  ASPOSE_TASKS_SHARED_API bool Remove(const System::SharedPtr<GroupCriterion>& item) override;
100  /// <summary>
101  /// Converts a GroupCriterion collection to a list of <see cref="GroupCriterion"></see> objects.
102  /// </summary>
103  /// <returns>Generic list of <see cref="GroupCriterion"></see> objects.</returns>
104  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<GroupCriterion>>> ToList();
105 
106 protected:
107 
108  /// <summary>
109  /// Initializes a new instance of the <see cref="GroupCriterionCollection"></see> class.
110  /// </summary>
111  ASPOSE_TASKS_SHARED_API GroupCriterionCollection(const System::SharedPtr<Group>& parentGroup);
112 
113  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(GroupCriterionCollection, CODEPORTING_ARGS(const System::SharedPtr<Group>& parentGroup));
114 
115  /// <summary>
116  /// Initializes a new instance of the <see cref="GroupCriterionCollection"></see> class.
117  /// </summary>
118  ASPOSE_TASKS_SHARED_API GroupCriterionCollection(const System::SharedPtr<Group>& parentGroup, const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<GroupCriterion>>>& items);
119 
120  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(GroupCriterionCollection, CODEPORTING_ARGS(const System::SharedPtr<Group>& parentGroup, const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<GroupCriterion>>>& items));
121 
122  virtual ASPOSE_TASKS_SHARED_API ~GroupCriterionCollection();
123 
124  #ifdef ASPOSE_GET_SHARED_MEMBERS
125  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
126  #endif
127 
128 
129 private:
130 
131  System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<GroupCriterion>>> items;
132  System::WeakPtr<Group> pr_ParentGroup;
133 
134  /// @deprecated This member is obsolete and will be removed after release 25.6.
135  /// <summary>
136  /// Gets the parent of the GroupCriterion object.
137  /// </summary>
138  ASPOSE_TASKS_SHARED_API void set_ParentGroup(const System::SharedPtr<Group>& value);
139 
140  System::SharedPtr<GroupCriterion> idx_get(int32_t index) const override;
141  void idx_set(int32_t index, System::SharedPtr<GroupCriterion> value) override;
142 
143  int32_t IndexOf(const System::SharedPtr<GroupCriterion>& item) const override;
144  void Insert(int32_t index, const System::SharedPtr<GroupCriterion>& item) override;
145  void RemoveAt(int32_t index) override;
146 
147 };
148 
149 } // namespace Tasks
150 } // namespace Aspose
151 
152 
Represents a group definition. A Group object is a member of the ResourceGroups collection or the Tas...
Definition: Group.h:42
Contains a collection of GroupCriterion objects. Implements ICollection<GroupCriterion> interface...
Definition: GroupCriterionCollection.h:42