8 #include <system/timespan.h>
9 #include <system/eventhandler.h>
10 #include <system/collections/list.h>
11 #include <system/collections/ilist.h>
12 #include <system/array.h>
14 #include "aspose.tasks.cpp/IReadOnlyWorkingTimeCollection.h"
15 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
22 class CalendarDatesCalculator;
23 class CalendarException;
24 class CalendarWorkingTimesBackwardsEnumerator;
25 class CalendarWorkingTimesForwardEnumerator;
30 class HtmlCalendarExceptionsReader;
31 class HtmlCalendarTableReader;
35 class MPPTimephasedDataReader;
39 class WeekDayNodeWriter;
42 class TimephasedDataCalculationUtil;
53 template <
typename>
class IEnumerable;
54 template <
typename>
class IEnumerator;
71 class ASPOSE_TASKS_SHARED_CLASS
WorkingTimeCollection :
public System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::WorkingTime>>,
public Aspose::Tasks::IReadOnlyWorkingTimeCollection
74 typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::WorkingTime>> BaseType;
75 typedef Aspose::Tasks::IReadOnlyWorkingTimeCollection BaseType1;
77 typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
78 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
82 friend class Aspose::Tasks::CalendarWorkingTimesForwardEnumerator;
83 friend class Aspose::Tasks::TimephasedDataCalculationUtil;
84 friend class Aspose::Tasks::IO::Html::HtmlCalendarExceptionsReader;
85 friend class Aspose::Tasks::IO::Html::HtmlCalendarTableReader;
86 friend class Aspose::Tasks::IO::MSProject::MPPTimephasedDataReader;
87 friend class Aspose::Tasks::IO::Xml::WeekDayNodeWriter;
88 friend class Aspose::Tasks::CalendarDatesCalculator;
89 friend class Aspose::Tasks::CalendarWorkingTimesBackwardsEnumerator;
96 using iterator =
typename iterator_holder_type::iterator;
109 ASPOSE_TASKS_SHARED_API int32_t get_Count()
const override;
116 ASPOSE_TASKS_SHARED_API System::SharedPtr<WorkingTime> idx_get(int32_t index)
const override;
122 ASPOSE_TASKS_SHARED_API
void idx_set(int32_t index, System::SharedPtr<WorkingTime> value)
override;
128 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<WorkingTime>>> GetEnumerator()
override;
134 ASPOSE_TASKS_SHARED_API
bool Remove(
const System::SharedPtr<WorkingTime>& item)
override;
139 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<WorkingTime>>> ToList();
140 ASPOSE_TASKS_SHARED_API
void Add(
const System::SharedPtr<WorkingTime>& item)
override;
147 ASPOSE_TASKS_SHARED_API
bool Contains(
const System::SharedPtr<WorkingTime>& item)
const override;
153 ASPOSE_TASKS_SHARED_API
void CopyTo(System::ArrayPtr<System::SharedPtr<WorkingTime>> array, int32_t arrayIndex)
override;
157 ASPOSE_TASKS_SHARED_API
void Clear()
override;
160 ASPOSE_TASKS_SHARED_API
iterator begin() noexcept;
163 ASPOSE_TASKS_SHARED_API
iterator end() noexcept;
200 ASPOSE_TASKS_SHARED_API System::SharedPtr<
WorkingTime> get_First();
201 ASPOSE_TASKS_SHARED_API System::SharedPtr<
WorkingTime> get_Last();
202 ASPOSE_TASKS_SHARED_API System::TimeSpan get_TotalFrom();
203 ASPOSE_TASKS_SHARED_API System::TimeSpan get_TotalTo();
204 ASPOSE_TASKS_SHARED_API System::TimeSpan get_TotalSpan();
205 ASPOSE_TASKS_SHARED_API System::String get_DebuggerDisplay();
207 System::EventHandler<> CollectionChanged;
211 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(WorkingTimeCollection, CODEPORTING_ARGS());
213 ASPOSE_TASKS_SHARED_API WorkingTimeCollection(const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<
WorkingTime>>>& workingTimes);
215 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(WorkingTimeCollection, CODEPORTING_ARGS(const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<
WorkingTime>>>& workingTimes));
216 ASPOSE_TASKS_SHARED_API
void Sort();
217 ASPOSE_TASKS_SHARED_API
void UpdateWorkingTimes(const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<
WorkingTime>>>& times);
218 ASPOSE_TASKS_SHARED_API System::TimeSpan GetIntersectSpan(const System::SharedPtr<
WorkingTime>& wt);
219 ASPOSE_TASKS_SHARED_API System::DateTime GetDayStart(System::DateTime date, System::TimeSpan nonWorkingDayStart);
220 ASPOSE_TASKS_SHARED_API System::TimeSpan GetWorkingHours();
221 ASPOSE_TASKS_SHARED_API System::TimeSpan GetDifferenceFromWorkStart(System::DateTime start);
222 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Text::StringBuilder> Dump(const System::SharedPtr<System::Text::StringBuilder>& sb);
224 virtual ASPOSE_TASKS_SHARED_API ~WorkingTimeCollection();
226 #ifdef ASPOSE_GET_SHARED_MEMBERS
227 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
233 static System::SharedPtr<WorkingTimeCollection>& EmptyInstance();
235 System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<WorkingTime>>> workingTimes;
237 bool get_IsReadOnly()
const override;
241 System::TimeSpan totalFrom;
242 System::TimeSpan totalTo;
243 System::TimeSpan totalSpan;
250 int32_t IndexOf(
const System::SharedPtr<WorkingTime>& item)
const override;
256 void Insert(int32_t index,
const System::SharedPtr<WorkingTime>& item)
override;
261 void RemoveAt(int32_t index)
override;
262 bool AddInternal(
const System::SharedPtr<WorkingTime>& item);
263 bool InvalidateSpans();
typename iterator_holder_type::iterator iterator
Iterator type.
Definition: WorkingTimeCollection.h:96
typename iterator_holder_type::virtualized_iterator_element virtualized_iterator_element
Virtualized element type.
Definition: WorkingTimeCollection.h:100
System::Collections::Generic::List< System::SharedPtr< WorkingTime >> iterator_holder_type
A collection type whose iterator types is used as iterator types in the current collection.
Definition: WorkingTimeCollection.h:94
Represents a collection of WorkingTimeCollection objects.
Definition: WorkingTimeCollection.h:71
Represents a weekday which either defines regular days of a week or exception days in a calendar...
Definition: WeekDay.h:61
Represents a calendar used in a project.
Definition: Calendar.h:297
Represents a working time during a weekday.
Definition: WorkingTime.h:40
typename iterator_holder_type::const_iterator const_iterator
Const iterator type.
Definition: WorkingTimeCollection.h:98
typename iterator_holder_type::virtualized_iterator virtualized_iterator
Virtualized type.
Definition: WorkingTimeCollection.h:102
Represent exceptional time periods in a calendar.
Definition: CalendarException.h:72