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