8 #include <system/collections/list.h>
9 #include <system/collections/ilist.h>
10 #include <system/array.h>
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
19 class AvailabilityPeriod;
20 namespace Calculations
22 class ResourceOverAllocationCalculator;
28 class MppAvailabilityWriter;
32 class ResourceNodeReader;
44 template <
typename>
class IEnumerator;
57 class ASPOSE_TASKS_SHARED_CLASS
AvailabilityPeriodCollection :
public System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::AvailabilityPeriod>>
60 typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::AvailabilityPeriod>> BaseType;
62 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
63 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
65 friend class Aspose::Tasks::Calculations::ResourceOverAllocationCalculator;
66 friend class Aspose::Tasks::IO::MSProject::MppAvailabilityWriter;
68 friend class Aspose::Tasks::IO::Xml::ResourceNodeReader;
74 using iterator =
typename iterator_holder_type::iterator;
88 ASPOSE_TASKS_SHARED_API System::SharedPtr<Resource> get_ParentResource()
const;
92 ASPOSE_TASKS_SHARED_API int32_t get_Count()
const override;
96 ASPOSE_TASKS_SHARED_API
bool get_IsReadOnly()
const override;
103 ASPOSE_TASKS_SHARED_API System::SharedPtr<AvailabilityPeriod> idx_get(int32_t index)
const override;
109 ASPOSE_TASKS_SHARED_API
void idx_set(int32_t index, System::SharedPtr<AvailabilityPeriod> value)
override;
115 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<AvailabilityPeriod>>> GetEnumerator()
override;
120 ASPOSE_TASKS_SHARED_API
void Add(
const System::SharedPtr<AvailabilityPeriod>& item)
override;
124 ASPOSE_TASKS_SHARED_API
void Clear()
override;
130 ASPOSE_TASKS_SHARED_API
bool Contains(
const System::SharedPtr<AvailabilityPeriod>& item)
const override;
136 ASPOSE_TASKS_SHARED_API
void CopyTo(System::ArrayPtr<System::SharedPtr<AvailabilityPeriod>> array, int32_t arrayIndex)
override;
142 ASPOSE_TASKS_SHARED_API
bool Remove(
const System::SharedPtr<AvailabilityPeriod>& item)
override;
148 ASPOSE_TASKS_SHARED_API int32_t IndexOf(
const System::SharedPtr<AvailabilityPeriod>& item)
const override;
154 ASPOSE_TASKS_SHARED_API
void Insert(int32_t index,
const System::SharedPtr<AvailabilityPeriod>& item)
override;
159 ASPOSE_TASKS_SHARED_API
void RemoveAt(int32_t index)
override;
162 ASPOSE_TASKS_SHARED_API
iterator begin() noexcept;
165 ASPOSE_TASKS_SHARED_API
iterator end() noexcept;
205 ASPOSE_TASKS_SHARED_API AvailabilityPeriodCollection(const System::SharedPtr<
Resource>& parentRsc, const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<
AvailabilityPeriod>>>& periods);
207 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(AvailabilityPeriodCollection, CODEPORTING_ARGS(const System::SharedPtr<
Resource>& parentRsc, const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<
AvailabilityPeriod>>>& periods));
208 ASPOSE_TASKS_SHARED_API
double GetMinAvailability(System::DateTime intervalStart, System::DateTime intervalEnd);
209 ASPOSE_TASKS_SHARED_API
void Sort();
211 virtual ASPOSE_TASKS_SHARED_API ~AvailabilityPeriodCollection();
213 #ifdef ASPOSE_GET_SHARED_MEMBERS
214 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
220 System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<AvailabilityPeriod>>> periods;
221 System::WeakPtr<Resource> resource;
223 static int32_t Compare(
const System::SharedPtr<AvailabilityPeriod>& period1,
const System::SharedPtr<AvailabilityPeriod>& period2);
typename iterator_holder_type::virtualized_iterator_element virtualized_iterator_element
Virtualized element type.
Definition: AvailabilityPeriodCollection.h:78
Represents a period when a resource is available.
Definition: AvailabilityPeriod.h:38
typename iterator_holder_type::iterator iterator
Iterator type.
Definition: AvailabilityPeriodCollection.h:74
typename iterator_holder_type::virtualized_iterator virtualized_iterator
Virtualized type.
Definition: AvailabilityPeriodCollection.h:80
Represents a collection which contains AvailabilityPeriod objects.
Definition: AvailabilityPeriodCollection.h:57
System::Collections::Generic::List< System::SharedPtr< AvailabilityPeriod >> iterator_holder_type
A collection type whose iterator types is used as iterator types in the current collection.
Definition: AvailabilityPeriodCollection.h:72
typename iterator_holder_type::const_iterator const_iterator
Const iterator type.
Definition: AvailabilityPeriodCollection.h:76
Represents a resource in a project.
Definition: Resource.h:206