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