Aspose.Tasks for C++
Calendar.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="Calendar.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 #include <system/nullable.h>
10 #include <system/iequatable.h>
11 #include <system/guid.h>
12 #include <system/date_time.h>
13 #include <cstdint>
14 
15 #include "aspose.tasks.cpp/NullableBool.h"
16 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
17 
18 namespace Aspose
19 {
20 namespace Tasks
21 {
22 class AssignmentBaseline;
23 class AutoRecalculationState;
24 class BaselineTimephasedDataMaker;
25 namespace Calculations
26 {
27 class RescheduleIncompleteWorkCalculator;
28 class ResourceAssignmentCalculator;
29 class ResourceAssignmentPeakCalculator;
30 class ResourceAssignmentRateByDateEnumerator;
31 class ResourceAssignmentVarianceCalculator;
32 class ResourceAssignmentWorkCalculator;
33 class ResourceCalculator;
34 class ResourceOverAllocationCalculator;
35 class SummaryTaskCalculator;
36 class TaskByAssignmentCalculator;
37 class TaskCalculator;
38 class TaskProgressCalculator;
39 class TaskSlackCalculator;
40 class TaskStatusCalculator;
41 class TaskVarianceCalculator;
42 class TimephasedDataCalculator;
43 class TimephasedIterator;
44 class TimeScaledCalculator;
45 } // namespace Calculations
46 class CalendarCollection;
47 class CalendarDatesCalculator;
48 class CalendarException;
49 class CalendarExceptionCollection;
50 class CalendarExceptionCollectionWithCache;
51 namespace Connectivity
52 {
53 class MpdCalendarMapper;
54 class MspCalendarMapper;
55 class MspDbUtils;
56 class PmCalendarMapper;
57 class PrimaveraDbReader;
58 } // namespace Connectivity
59 class DailyCalendarRepetition;
60 class DailyWorkRepetition;
61 class DatesCalculator;
62 enum class DayType;
63 class Duration;
64 class EVCalculator;
65 namespace Filters
66 {
67 class CalendarRootFilter;
68 } // namespace Filters
69 class FixedDurationEffortDrivenTaskPlanner;
70 class FixedDurationTaskPlanner;
71 template <typename, typename> class IKeyValueCache;
72 namespace IO
73 {
74 namespace Html
75 {
76 class HtmlCalendarTableReader;
77 } // namespace Html
78 namespace Mpx
79 {
80 class MpxReader;
81 } // namespace Mpx
82 namespace MSProject
83 {
84 class Mpp12CalendarReader;
85 class Mpp12CalendarWriter;
86 class MPP12Reader;
87 class Mpp14CalendarReader;
88 class Mpp14CalendarWriter;
89 class MPP14Reader;
90 class MPP14ResourceWriter;
91 class Mpp15CalendarReader;
92 class Mpp15CalendarWriter;
93 class Mpp9CalendarReader;
94 class Mpp9CalendarWriter;
95 class MPP9Reader;
96 class MppCalendarReader;
97 class MPPProjectPropsReader;
98 class MPPProjectPropsWriter;
99 class MPPReader;
100 class MPPResourceReader;
101 class MPPTaskWriter;
102 class MPPTimephasedDataReader;
103 class MppTimephasedDataWriter;
104 class MppWeekDayReader;
105 } // namespace MSProject
106 namespace PrimaveraXml
107 {
108 class P6XmlUtils;
109 class PrimaveraCalendarNodeReader;
110 class PrimaveraReader;
111 class PrimaveraResourceNodeReader;
112 } // namespace PrimaveraXml
113 namespace Pwa
114 {
115 namespace InternalApi
116 {
117 class InternalApiProjectSerializer;
118 namespace Mapping
119 {
120 class CalendarToRawValuesMapper;
121 class ProjectCalendarsMapper;
122 class ProjectRootMapper;
123 } // namespace Mapping
124 } // namespace InternalApi
125 } // namespace Pwa
126 namespace Xer
127 {
128 class XerAssignmentReader;
129 class XerCalendarReader;
130 class XerPrimaveraReader;
131 class XerProjectNormalizer;
132 } // namespace Xer
133 namespace Xml
134 {
135 class CalendarFactory;
136 class CalendarNodeReader;
137 class CalendarNodeWriter;
138 class ResourceNodeReader;
139 class TaskNodeReader;
140 class TimephasedDataNodeReader;
141 class WeekDayNodeReader;
142 class XmlReader;
143 class XmlWriter;
144 } // namespace Xml
145 } // namespace IO
146 class IReadOnlyWorkingTimeCollection;
147 namespace Leveling
148 {
149 class LevelingAlgorithm;
150 } // namespace Leveling
151 class ManualState;
152 class MonthlyRepetitionBase;
153 class NullableBool;
154 class PercentCompleteCalculator;
155 class ProjDateDiff;
156 class ProjDateSub;
157 class Project;
158 class ProjectIntegrityValidator;
159 class ProjectState;
160 class ProjectWorkUpdater;
161 namespace Recalculation
162 {
163 class TaskSplitCalculator;
164 } // namespace Recalculation
165 namespace Recurring
166 {
167 namespace Calculators
168 {
169 class CalendarDayRecurrenceDateCalculator;
170 class DefaultRecurrenceDateCalculator;
171 class RecurrenceDateCalculatorBase;
172 } // namespace Calculators
173 } // namespace Recurring
174 class Resource;
175 class ResourceAssignment;
176 namespace Saving
177 {
178 class HtmlCalendarTable;
179 class MpxWriter;
180 class PrimaveraCalendarNodeWriter;
181 class XerCalendarTable;
182 } // namespace Saving
183 namespace Scheduling
184 {
185 class ConstraintSolver;
186 class FromStartScheduler;
187 class TopsortCriticalPath;
188 } // namespace Scheduling
189 class SplitPart;
190 class SplitsCalculator;
191 class Task;
192 class TaskBaseline;
193 class TaskPlanner;
194 class TaskPlannerAssignmentManager;
195 class TaskWarningCalculator;
196 namespace Timephased
197 {
198 class TimephasedDataByScaledEnumerator;
199 class TimeScaledWorkContourBuilder;
200 } // namespace Timephased
201 class TimephasedDataCalculationUtil;
202 class TimephasedDataMaker;
203 class TimephasedWorkCostSelector;
204 class TimeScaledExceptions;
205 class TimeScaledParentWorkUnit;
206 namespace Util
207 {
208 class CalendarHelper;
209 class PrimaveraSummaryTasksCalculator;
210 class PrimaveraTasksProcessor;
211 } // namespace Util
212 namespace Validators
213 {
214 class RecurringTaskParametersValidator;
215 } // namespace Validators
216 class WeekDay;
217 class WeekDayCollection;
218 class WeeklyRepetitionBase;
219 class WorkingTimeCollection;
220 class WorkUnit;
221 class WorkWeekCollection;
222 class YearlyRepetitionBase;
223 } // namespace Tasks
224 } // namespace Aspose
225 namespace System
226 {
227 class TimeSpan;
228 } // namespace System
229 
230 namespace Aspose {
231 
232 namespace Tasks {
233 
234 /// <summary>
235 /// Represents a calendar used in a project.
236 /// </summary>
237 /// <example>
238 /// How to create simple calendar from scratch.
239 /// <code>
240 /// [C#]
241 /// // create empty calendar
242 /// Calendar calendar = new Calendar("New calendar");
243 /// // adds default working days (8 working hours from 9:00 to 17:00)
244 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Monday));
245 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Tuesday));
246 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Wednesday));
247 /// // create new new working day
248 /// WeekDay myWeekDay = new WeekDay(DayType.Thursday);
249 /// // Sets working time. Only time part of DateTime is important
250 /// WorkingTime wt1 = new WorkingTime();
251 /// wt1.FromTime = new DateTime(1, 1, 1, 6, 0, 0, 0);
252 /// wt1.ToTime = new DateTime(1, 1, 1, 12, 0, 0, 0);
253 /// WorkingTime wt2 = new WorkingTime();
254 /// wt2.FromTime = new DateTime(1, 1, 1, 14, 0, 0, 0);
255 /// wt2.ToTime = new DateTime(1, 1, 1, 18, 0, 0, 0);
256 /// myWeekDay.WorkingTimes.Add(wt1);
257 /// myWeekDay.WorkingTimes.Add(wt2);
258 /// myWeekDay.DayWorking = true;
259 /// calendar.Days.Add(myWeekDay);
260 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Friday));
261 /// // adds weekend
262 /// calendar.Days.Add(new WeekDay(DayType.Saturday));
263 /// calendar.Days.Add(new WeekDay(DayType.Sunday));
264 /// </code>
265 /// <code>
266 /// [VB]
267 /// ' create empty calendar
268 /// Dim calendar As Calendar = New Calendar("New calendar")
269 /// ' adds default working days (8 working hours from 9:00 to 17:00)
270 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Monday))
271 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Tuesday))
272 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Wednesday))
273 /// ' create new new working day
274 /// Dim myWeekDay As WeekDay = New WeekDay(DayType.Thursday)
275 /// ' Sets working time. Only time part of DateTime is important
276 /// Dim wt1 As WorkingTime = New WorkingTime()
277 /// wt1.FromTime = New DateTime(1, 1, 1, 6, 0, 0, 0)
278 /// wt1.ToTime = New DateTime(1, 1, 1, 12, 0, 0, 0)
279 /// Dim wt2 As WorkingTime = New WorkingTime()
280 /// wt2.FromTime = New DateTime(1, 1, 1, 14, 0, 0, 0)
281 /// wt2.ToTime = New DateTime(1, 1, 1, 18, 0, 0, 0)
282 /// myWeekDay.WorkingTimes.Add(wt1)
283 /// myWeekDay.WorkingTimes.Add(wt2)
284 /// myWeekDay.DayWorking = True
285 /// calendar.Days.Add(myWeekDay)
286 /// calendar.Days.Add(WeekDay.CreateDefaultWorkingDay(DayType.Friday))
287 /// ' adds weekend
288 /// calendar.Days.Add(New WeekDay(DayType.Saturday))
289 /// calendar.Days.Add(New WeekDay(DayType.Sunday))
290 /// </code>
291 /// </example>
292 /// <remarks>
293 /// Calendars are used to define standard working and non-working times.
294 /// Projects must have one base calendar. Tasks and resources can have
295 /// their own non-base calendars that are based on a base calendar.
296 /// </remarks>
297 class ASPOSE_TASKS_SHARED_CLASS Calendar : public System::Object
298 {
299  typedef Calendar ThisType;
300  typedef System::Object BaseType;
301 
302  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
303  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
304 
305 protected:
306 
307  class CalendarCacheKey;
308 
309 private:
311  friend class Aspose::Tasks::Calculations::RescheduleIncompleteWorkCalculator;
312  friend class Aspose::Tasks::Calculations::TimephasedIterator;
313  friend class Aspose::Tasks::Calculations::ResourceOverAllocationCalculator;
314  friend class Aspose::Tasks::Calculations::TimeScaledCalculator;
315  friend class Aspose::Tasks::Calculations::ResourceAssignmentRateByDateEnumerator;
316  friend class Aspose::Tasks::Calculations::ResourceAssignmentCalculator;
317  friend class Aspose::Tasks::Calculations::ResourceAssignmentPeakCalculator;
318  friend class Aspose::Tasks::Calculations::ResourceAssignmentWorkCalculator;
319  friend class Aspose::Tasks::Calculations::ResourceCalculator;
320  friend class Aspose::Tasks::Calculations::SummaryTaskCalculator;
321  friend class Aspose::Tasks::Calculations::TaskByAssignmentCalculator;
322  friend class Aspose::Tasks::Calculations::TaskCalculator;
323  friend class Aspose::Tasks::Calculations::TaskProgressCalculator;
324  friend class Aspose::Tasks::Calculations::ResourceAssignmentVarianceCalculator;
325  friend class Aspose::Tasks::Calculations::TaskSlackCalculator;
326  friend class Aspose::Tasks::Calculations::TaskVarianceCalculator;
327  friend class Aspose::Tasks::Calculations::TaskStatusCalculator;
328  friend class Aspose::Tasks::Calculations::TimephasedDataCalculator;
329  friend class Aspose::Tasks::Calculations::TimephasedDataCalculator;
331  friend class Aspose::Tasks::IO::PrimaveraXml::P6XmlUtils;
332  friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraCalendarNodeReader;
333  friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraReader;
334  friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraResourceNodeReader;
335  friend class Aspose::Tasks::Leveling::LevelingAlgorithm;
336  friend class Aspose::Tasks::Project;
338  friend class Aspose::Tasks::Task;
339  friend class Aspose::Tasks::BaselineTimephasedDataMaker;
340  friend class Aspose::Tasks::Timephased::TimeScaledWorkContourBuilder;
341  friend class Aspose::Tasks::Timephased::TimephasedDataByScaledEnumerator;
342  friend class Aspose::Tasks::TimephasedDataCalculationUtil;
343  friend class Aspose::Tasks::TimeScaledParentWorkUnit;
344  friend class Aspose::Tasks::Util::PrimaveraSummaryTasksCalculator;
345  friend class Aspose::Tasks::Filters::CalendarRootFilter;
346  friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::CalendarToRawValuesMapper;
347  friend class Aspose::Tasks::IO::Pwa::InternalApi::InternalApiProjectSerializer;
348  friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectRootMapper;
349  friend class Aspose::Tasks::IO::Xml::CalendarFactory;
350  friend class Aspose::Tasks::EVCalculator;
351  friend class Aspose::Tasks::ProjDateDiff;
352  friend class Aspose::Tasks::ProjDateSub;
353  friend class Aspose::Tasks::Connectivity::MpdCalendarMapper;
354  friend class Aspose::Tasks::Connectivity::MspCalendarMapper;
355  friend class Aspose::Tasks::Connectivity::MspDbUtils;
356  friend class Aspose::Tasks::Connectivity::PmCalendarMapper;
357  friend class Aspose::Tasks::Connectivity::PrimaveraDbReader;
358  friend class Aspose::Tasks::IO::Html::HtmlCalendarTableReader;
359  friend class Aspose::Tasks::IO::MSProject::Mpp12CalendarReader;
360  friend class Aspose::Tasks::IO::MSProject::MppCalendarReader;
361  friend class Aspose::Tasks::IO::MSProject::MPP12Reader;
362  friend class Aspose::Tasks::IO::MSProject::MPPReader;
363  friend class Aspose::Tasks::IO::MSProject::MPPResourceReader;
364  friend class Aspose::Tasks::IO::MSProject::MppWeekDayReader;
365  friend class Aspose::Tasks::IO::MSProject::Mpp14CalendarReader;
366  friend class Aspose::Tasks::IO::MSProject::MPP14Reader;
367  friend class Aspose::Tasks::IO::MSProject::Mpp15CalendarReader;
368  friend class Aspose::Tasks::IO::MSProject::Mpp15CalendarWriter;
369  friend class Aspose::Tasks::IO::MSProject::Mpp14CalendarWriter;
370  friend class Aspose::Tasks::IO::MSProject::MPP14ResourceWriter;
371  friend class Aspose::Tasks::IO::MSProject::Mpp9CalendarReader;
372  friend class Aspose::Tasks::IO::MSProject::MPP9Reader;
373  friend class Aspose::Tasks::IO::MSProject::MPPProjectPropsReader;
374  friend class Aspose::Tasks::IO::MSProject::MPPTimephasedDataReader;
375  friend class Aspose::Tasks::IO::MSProject::Mpp12CalendarWriter;
376  friend class Aspose::Tasks::IO::MSProject::MPPTaskWriter;
377  friend class Aspose::Tasks::IO::MSProject::Mpp9CalendarWriter;
378  friend class Aspose::Tasks::IO::MSProject::MPPProjectPropsWriter;
379  friend class Aspose::Tasks::IO::MSProject::MppTimephasedDataWriter;
380  friend class Aspose::Tasks::IO::Mpx::MpxReader;
381  friend class Aspose::Tasks::IO::Xer::XerPrimaveraReader;
382  friend class Aspose::Tasks::IO::Xer::XerAssignmentReader;
383  friend class Aspose::Tasks::IO::Xer::XerCalendarReader;
384  friend class Aspose::Tasks::IO::Xer::XerProjectNormalizer;
385  friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectCalendarsMapper;
386  friend class Aspose::Tasks::IO::Xml::CalendarNodeReader;
387  friend class Aspose::Tasks::IO::Xml::CalendarNodeWriter;
388  friend class Aspose::Tasks::IO::Xml::ResourceNodeReader;
389  friend class Aspose::Tasks::IO::Xml::TaskNodeReader;
390  friend class Aspose::Tasks::IO::Xml::TimephasedDataNodeReader;
391  friend class Aspose::Tasks::IO::Xml::WeekDayNodeReader;
392  friend class Aspose::Tasks::IO::Xml::XmlReader;
393  friend class Aspose::Tasks::IO::Xml::XmlWriter;
394  friend class Aspose::Tasks::ProjectIntegrityValidator;
395  friend class Aspose::Tasks::AutoRecalculationState;
396  friend class Aspose::Tasks::ProjectState;
397  friend class Aspose::Tasks::CalendarDatesCalculator;
398  friend class Aspose::Tasks::DatesCalculator;
399  friend class Aspose::Tasks::TaskPlannerAssignmentManager;
400  friend class Aspose::Tasks::FixedDurationEffortDrivenTaskPlanner;
401  friend class Aspose::Tasks::TaskPlanner;
402  friend class Aspose::Tasks::FixedDurationTaskPlanner;
403  friend class Aspose::Tasks::ManualState;
404  friend class Aspose::Tasks::PercentCompleteCalculator;
405  friend class Aspose::Tasks::ProjectWorkUpdater;
406  friend class Aspose::Tasks::SplitsCalculator;
407  friend class Aspose::Tasks::Recalculation::TaskSplitCalculator;
408  friend class Aspose::Tasks::TaskWarningCalculator;
409  friend class Aspose::Tasks::Recurring::Calculators::CalendarDayRecurrenceDateCalculator;
410  friend class Aspose::Tasks::Recurring::Calculators::RecurrenceDateCalculatorBase;
413  friend class Aspose::Tasks::Recurring::Calculators::DefaultRecurrenceDateCalculator;
417  friend class Aspose::Tasks::Saving::HtmlCalendarTable;
418  friend class Aspose::Tasks::Saving::MpxWriter;
419  friend class Aspose::Tasks::Saving::XerCalendarTable;
420  friend class Aspose::Tasks::Saving::PrimaveraCalendarNodeWriter;
421  friend class Aspose::Tasks::Scheduling::ConstraintSolver;
422  friend class Aspose::Tasks::Scheduling::TopsortCriticalPath;
423  friend class Aspose::Tasks::Scheduling::FromStartScheduler;
424  friend class Aspose::Tasks::SplitPart;
425  friend class Aspose::Tasks::TaskBaseline;
426  friend class Aspose::Tasks::TimephasedDataMaker;
427  friend class Aspose::Tasks::TimephasedWorkCostSelector;
428  friend class Aspose::Tasks::Util::CalendarHelper;
429  friend class Aspose::Tasks::Util::PrimaveraTasksProcessor;
430  friend class Aspose::Tasks::Validators::RecurringTaskParametersValidator;
431  friend ASPOSE_TASKS_SHARED_API bool operator ==(Calendar::CalendarCacheKey left, Calendar::CalendarCacheKey right);
432  friend ASPOSE_TASKS_SHARED_API bool operator !=(Calendar::CalendarCacheKey left, Calendar::CalendarCacheKey right);
433 
434 protected:
435 
436  class ASPOSE_TASKS_SHARED_CLASS CalendarCacheKey : public System::IEquatable<Aspose::Tasks::Calendar::CalendarCacheKey>, public System::Details::BoxableObjectBase
437  {
438  typedef CalendarCacheKey ThisType;
439  typedef System::IEquatable<Aspose::Tasks::Calendar::CalendarCacheKey> BaseType;
440 
441  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
442  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
443 
444  friend ASPOSE_TASKS_SHARED_API bool operator ==(Calendar::CalendarCacheKey left, Calendar::CalendarCacheKey right);
445  friend ASPOSE_TASKS_SHARED_API bool operator !=(Calendar::CalendarCacheKey left, Calendar::CalendarCacheKey right);
446 
447  public:
448 
449  ASPOSE_TASKS_SHARED_API CalendarCacheKey(int32_t calUid, System::DateTime start, System::DateTime finish, double units);
450 
451  /// <inheritdoc ></inheritdoc>
452  ASPOSE_TASKS_SHARED_API bool Equals(Calendar::CalendarCacheKey other) override;
453  /// <inheritdoc ></inheritdoc>
454  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
455  /// <inheritdoc ></inheritdoc>
456  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
457 
458  ASPOSE_TASKS_SHARED_API CalendarCacheKey();
459 
460  protected:
461 
462  #ifdef ASPOSE_GET_SHARED_MEMBERS
463  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
464  #endif
465 
466 
467  private:
468 
469  double units;
470  int32_t calUid;
471  System::DateTime start;
472  System::DateTime finish;
473  int32_t cachedHashCode;
474 
475  };
476 
477 
478 public:
479 
480  /// <summary>
481  /// Gets the name of the calendar.
482  /// </summary>
483  ASPOSE_TASKS_SHARED_API System::String get_Name() const;
484  /// <summary>
485  /// Sets the name of the calendar.
486  /// </summary>
487  ASPOSE_TASKS_SHARED_API void set_Name(const System::String& value);
488  /// <summary>
489  /// Gets the unique identifier of the calendar.
490  /// </summary>
491  ASPOSE_TASKS_SHARED_API int32_t get_Uid() const;
492  /// <summary>
493  /// Sets the unique identifier of the calendar.
494  /// </summary>
495  ASPOSE_TASKS_SHARED_API void set_Uid(int32_t value);
496  /// <summary>
497  /// Gets WeekDaysCollection for this calendar.
498  /// The collection of weekdays that defines the calendar.
499  /// </summary>
500  ASPOSE_TASKS_SHARED_API const System::SharedPtr<WeekDayCollection>& get_WeekDays() const;
501  /// <summary>
502  /// Gets CalendarExceptionCollection object.
503  /// The collection of exceptions that is associated with the calendar.
504  /// </summary>
505  ASPOSE_TASKS_SHARED_API System::SharedPtr<CalendarExceptionCollection> get_Exceptions() const;
506  /// <summary>
507  /// Gets WorkWeekCollections object.
508  /// The collection of work weeks that is associated with the calendar.
509  /// </summary>
510  ASPOSE_TASKS_SHARED_API const System::SharedPtr<WorkWeekCollection>& get_WorkWeeks() const;
511  /// <summary>
512  /// Gets a value indicating whether the calendar is a base calendar.
513  /// </summary>
514  ASPOSE_TASKS_SHARED_API bool get_IsBaseCalendar();
515  /// <summary>
516  /// Gets the base calendar on which this calendar depends.
517  /// Only applicable if the calendar is not a base calendar.
518  /// </summary>
519  ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> get_BaseCalendar() const;
520  /// <summary>
521  /// Sets the base calendar on which this calendar depends.
522  /// Only applicable if the calendar is not a base calendar.
523  /// </summary>
524  ASPOSE_TASKS_SHARED_API void set_BaseCalendar(const System::SharedPtr<Calendar>& value);
525  /// <summary>
526  /// Gets a value indicating whether the calendar is a baseline calendar.
527  /// </summary>
528  ASPOSE_TASKS_SHARED_API bool get_IsBaselineCalendar();
529  /// <summary>
530  /// Sets a value indicating whether the calendar is a baseline calendar.
531  /// </summary>
532  ASPOSE_TASKS_SHARED_API void set_IsBaselineCalendar(bool value);
533  /// <summary>
534  /// Gets calendar's Guid.
535  /// </summary>
536  ASPOSE_TASKS_SHARED_API System::String get_Guid() const;
537 
538  /// <summary>
539  /// Creates default standard calendar.
540  /// </summary>
541  /// <param name="calendar">Calendar to make standard calendar from.</param>
542  /// <returns>Calendar with 5 working days (Monday-Friday) with working times 8-12 and 13-17.</returns>
543  static ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> MakeStandardCalendar(const System::SharedPtr<Calendar>& calendar);
544  /// <summary>
545  /// Makes a given Calendar to be a 24Hour Calendar.
546  /// 24Hours Calendar is a Calendar in which every day of week is working with Round-the-clock working hours.
547  /// </summary>
548  /// <param name="calendar">Calendar to make 24 Hours Calendar from.</param>
549  /// <returns>24Hour Calendar.</returns>
550  static ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> Make24HourCalendar(const System::SharedPtr<Calendar>& calendar);
551  /// <summary>
552  /// Makes a given Calendar as Night Shift Calendar.
553  /// </summary>
554  /// <param name="calendar">Calendar to make Night Shift Calendar.</param>
555  /// <returns>Night Shift Calendar.</returns>
556  static ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> MakeNightShiftCalendar(const System::SharedPtr<Calendar>& calendar);
557  /// <summary>
558  /// Returns a value indicating whether this instance is equal to a specified object.
559  /// </summary>
560  /// <param name="obj">The object to compare with this instance.</param>
561  /// <returns><b>True</b> if o is a Calendar that has the same Uid value as this instance; otherwise, <b>false</b>.</returns>
562  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
563  /// <summary>
564  /// Returns a hash code for the instance of the class.
565  /// </summary>
566  /// <returns>a hash code for this object.</returns>
567  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
568  /// <summary>
569  /// Removes calendar from project.
570  /// </summary>
571  ASPOSE_TASKS_SHARED_API void Delete();
572  /// <summary>
573  /// Returns StartDate based on specified FinishDate and Duration.
574  /// </summary>
575  /// <param name="finish">The specified finish date.</param>
576  /// <param name="duration">The specified work duration.</param>
577  /// <returns>Calculated StartDate.</returns>
578  ASPOSE_TASKS_SHARED_API System::DateTime GetStartDateFromFinishAndDuration(System::DateTime finish, Duration duration);
579  /// <summary>
580  /// Returns StartDate based on specified FinishDate and Duration.
581  /// </summary>
582  /// <param name="finish">The specified finish date.</param>
583  /// <param name="duration">The specified work duration.</param>
584  /// <returns>Calculated StartDate.</returns>
585  ASPOSE_TASKS_SHARED_API System::DateTime GetStartDateFromFinishAndDuration(System::DateTime finish, System::TimeSpan duration);
586  /// <summary>
587  /// Determines whether the day is working day.
588  /// </summary>
589  /// <param name="dt">The date to check day is working for.</param>
590  /// <returns>True if the day is working day.</returns>
591  ASPOSE_TASKS_SHARED_API bool IsDayWorking(System::DateTime dt);
592  /// <summary>
593  /// Return working hours for the specified dates.
594  /// </summary>
595  /// <param name="start">Start date.</param>
596  /// <param name="finish">Finish date.</param>
597  /// <returns>Working hours.</returns>
598  ASPOSE_TASKS_SHARED_API System::SharedPtr<WorkUnit> GetWorkingHours(System::DateTime start, System::DateTime finish);
599  /// <summary>
600  /// Calculates the date when the specified amount of work time will pass according to the calendar.
601  /// </summary>
602  /// <param name="start">Start date.</param>
603  /// <param name="work">Work duration.</param>
604  /// <returns>Finish date.</returns>
605  ASPOSE_TASKS_SHARED_API System::DateTime GetFinishDateByStartAndWork(System::DateTime start, Duration work);
606  /// <summary>
607  /// Calculates the date when the specified amount of work time will pass according to the calendar.
608  /// </summary>
609  /// <param name="start">Start date.</param>
610  /// <param name="work">Work duration.</param>
611  /// <returns>Finish date.</returns>
612  ASPOSE_TASKS_SHARED_API System::DateTime GetFinishDateByStartAndWork(System::DateTime start, System::TimeSpan work);
613  /// <summary>
614  /// Calculates the task finish date and time from its start date, split parts and the duration.
615  /// </summary>
616  /// <param name="task">The task to get finish date for.</param>
617  /// <param name="duration">The task duration to split on.</param>
618  /// <returns>Task's finish date.</returns>
619  /// <remarks>Returns DateTime.MinValue if task is summary, null or its start date is not set.</remarks>
620  ASPOSE_TASKS_SHARED_API System::DateTime GetTaskFinishDateFromDuration(const System::SharedPtr<Task>& task, System::TimeSpan duration);
621  /// <summary>
622  /// Returns amount of working hours at the date.
623  /// </summary>
624  /// <param name="dt">The date to get working hours for.</param>
625  /// <returns>Working hours.</returns>
626  ASPOSE_TASKS_SHARED_API System::TimeSpan GetWorkingHours(System::DateTime dt);
627  /// <summary>
628  /// Returns <see cref="WorkingTimeCollection"></see> of working times for the specified date.
629  /// </summary>
630  /// <param name="dt">The date to get working times for.</param>
631  /// <returns>List of <see cref="WorkingTime"></see>.</returns>
632  ASPOSE_TASKS_SHARED_API System::SharedPtr<WorkingTimeCollection> GetWorkingTimes(System::DateTime dt);
633  /// <summary>
634  /// Calculates previous working date end from the specified date.
635  /// </summary>
636  /// <param name="date">the specified instance of <see cref="DateTime"></see> struct.</param>
637  /// <returns>Previous working day start <see cref="System::DateTime"></see></returns>
638  ASPOSE_TASKS_SHARED_API System::DateTime GetPreviousWorkingDayEnd(System::DateTime date);
639  /// <summary>
640  /// Calculates next working day start from the date.
641  /// </summary>
642  /// <param name="date">The date to get next working day start for.</param>
643  /// <returns>Next working day start <see cref="System::DateTime"></see>.</returns>
644  ASPOSE_TASKS_SHARED_API System::DateTime GetNextWorkingDayStart(System::DateTime date);
645 
646 protected:
647 
648  /// <summary>
649  /// Gets WeekDaysCollection for this calendar.
650  /// The collection of weekdays that defines the calendar.
651  /// </summary>
652  ASPOSE_TASKS_SHARED_API void set_WeekDays(const System::SharedPtr<WeekDayCollection>& value);
653  /// <summary>
654  /// Gets calendar's Guid.
655  /// </summary>
656  ASPOSE_TASKS_SHARED_API void set_Guid(const System::String& value);
657  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Project>& get_ParentProject() const;
658  ASPOSE_TASKS_SHARED_API void set_ParentProject(const System::SharedPtr<Project>& value);
659  ASPOSE_TASKS_SHARED_API NullableBool get_NullableIsBaselineCalendar() const;
660  ASPOSE_TASKS_SHARED_API void set_NullableIsBaselineCalendar(NullableBool value);
661  ASPOSE_TASKS_SHARED_API int32_t get_ResourceUid() const;
662  ASPOSE_TASKS_SHARED_API void set_ResourceUid(int32_t value);
663  ASPOSE_TASKS_SHARED_API bool get_IsNull() const;
664  ASPOSE_TASKS_SHARED_API void set_IsNull(bool value);
665  ASPOSE_TASKS_SHARED_API bool get_IsZeroResourceCalendar();
666  ASPOSE_TASKS_SHARED_API System::Guid get_UnknownGuid() const;
667  ASPOSE_TASKS_SHARED_API void set_UnknownGuid(System::Guid value);
668  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::Resource> get_Resource() const;
669  ASPOSE_TASKS_SHARED_API void set_Resource(const System::SharedPtr<Aspose::Tasks::Resource>& value);
670  ASPOSE_TASKS_SHARED_API bool get_Is24HourCalendar();
671  ASPOSE_TASKS_SHARED_API int32_t get_NonWorkingDayCount();
672  ASPOSE_TASKS_SHARED_API int32_t get_WorkingDayCount();
673  ASPOSE_TASKS_SHARED_API bool get_IsCacheEnabled();
674  ASPOSE_TASKS_SHARED_API void set_IsCacheEnabled(bool value);
675 
676  /// <summary>
677  /// Initializes a new instance of the <see cref="Calendar"></see> class.
678  /// </summary>
679  ASPOSE_TASKS_SHARED_API Calendar();
680 
681  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Calendar, CODEPORTING_ARGS());
682 
683  /// <summary>
684  /// Initializes a new instance of the <see cref="Calendar"></see> class and sets Id value.
685  /// </summary>
686  /// <param name="uid">Unique identifier.</param>
687  ASPOSE_TASKS_SHARED_API Calendar(int32_t uid);
688 
689  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Calendar, CODEPORTING_ARGS(int32_t uid));
690  ASPOSE_TASKS_SHARED_API System::TimeSpan GetWorkingHoursTimeSpan(System::DateTime start, System::DateTime finish);
691  ASPOSE_TASKS_SHARED_API bool IsDayOff(System::DateTime date);
692  ASPOSE_TASKS_SHARED_API System::DateTime GetFinishDateByStartAndDuration(System::DateTime start, Duration duration, bool isLast, bool daysOff);
693  ASPOSE_TASKS_SHARED_API System::DateTime GetFinishDateByStartAndDuration(System::DateTime start, System::TimeSpan duration, bool isLast, bool daysOff);
694  ASPOSE_TASKS_SHARED_API System::DateTime GetTaskFinishDateFromDuration(const System::SharedPtr<Task>& task, Duration duration);
695  ASPOSE_TASKS_SHARED_API System::DateTime GetFinishDateFromStartAndDuration(const System::SharedPtr<Task>& task, System::DateTime start, Duration duration);
696  ASPOSE_TASKS_SHARED_API System::DateTime GetStartDateFromFinishAndDuration(const System::SharedPtr<Task>& task, System::DateTime finishDate, Duration duration);
697  /// <summary>
698  /// Calculates task finish date, splits included.
699  /// </summary>
700  /// <param name="task">Task to calculate finish for.</param>
701  /// <param name="start">Start date to calculate finish from.</param>
702  /// <param name="duration">Duration</param>
703  /// <returns>Calculated task finish date.</returns>
704  ASPOSE_TASKS_SHARED_API System::DateTime GetFinishDateFromStartAndDuration(const System::SharedPtr<Task>& task, System::DateTime start, System::TimeSpan duration);
705  /// <summary>
706  /// Calculates task start date, splits included.
707  /// </summary>
708  /// <param name="task">Task to calculate start date for.</param>
709  /// <param name="finishDate">Finish date to calculate start from.</param>
710  /// <param name="duration">Duration</param>
711  /// <returns>Calculated task start date.</returns>
712  ASPOSE_TASKS_SHARED_API System::DateTime GetStartDateFromFinishAndDuration(const System::SharedPtr<Task>& task, System::DateTime finishDate, System::TimeSpan duration);
713  ASPOSE_TASKS_SHARED_API System::TimeSpan GetWork(System::DateTime start, System::DateTime end, const System::SharedPtr<Calendar>& anotherCalendar);
714  ASPOSE_TASKS_SHARED_API System::TimeSpan GetWork(System::DateTime start, System::DateTime end, System::SharedPtr<Calendar> anotherCalendar, bool trimSeconds);
715  /// <summary>
716  /// Calculates next working time start beginning from the date and time.
717  /// </summary>
718  /// <param name="date">The date and time.</param>
719  /// <returns>Next working time start.</returns>
720  ASPOSE_TASKS_SHARED_API System::DateTime GetWorkStart(System::DateTime date);
721  ASPOSE_TASKS_SHARED_API System::DateTime GetWorkStartOrDefault(System::DateTime date);
722  ASPOSE_TASKS_SHARED_API System::DateTime GetWorkStart(System::DateTime date, const System::SharedPtr<Calendar>& anotherCalendar);
723  ASPOSE_TASKS_SHARED_API System::DateTime GetPrevWorkingTimeEnd(System::DateTime date);
724  ASPOSE_TASKS_SHARED_API bool IsEmpty();
725  ASPOSE_TASKS_SHARED_API bool IsWorkDayEnd(System::DateTime date);
726  ASPOSE_TASKS_SHARED_API bool IsWorkingTimeEnd(System::DateTime date);
727  ASPOSE_TASKS_SHARED_API bool IsWorkDayStart(System::DateTime date);
728  ASPOSE_TASKS_SHARED_API bool IsNonworkingTime(System::DateTime date);
729  ASPOSE_TASKS_SHARED_API bool IsWorkingTimeStart(System::DateTime date);
730  ASPOSE_TASKS_SHARED_API System::DateTime GetNextDayStart(System::DateTime date);
731  ASPOSE_TASKS_SHARED_API System::DateTime GetNextDayStart(System::DateTime date, System::TimeSpan nonWorkingDayStart);
732  ASPOSE_TASKS_SHARED_API System::DateTime GetDayStart(System::DateTime date);
733  ASPOSE_TASKS_SHARED_API int32_t GetWorkingDaysCount(System::DateTime start, System::DateTime end);
734  /// <summary>
735  /// Calculates the date when the specified amount of work time will pass according to the calendar and another calendar (resource calendar, for example)
736  /// </summary>
737  /// <param name="start">Start date.</param>
738  /// <param name="work">Amount of work.</param>
739  /// <param name="anotherCalendar">Another calendar that must not be ignored.</param>
740  /// <returns>Calculated finish date.</returns>
741  ASPOSE_TASKS_SHARED_API System::DateTime GetFinishDateByStartAndWork(System::DateTime start, System::TimeSpan work, const System::SharedPtr<Calendar>& anotherCalendar);
742  ASPOSE_TASKS_SHARED_API System::DateTime GetStartDateByFinishAndWork(System::DateTime finish, Duration work, const System::SharedPtr<Calendar>& anotherCalendar);
743  /// <summary>
744  /// Calculates the date when the specified amount of work time will pass according to the calendar and another calendar (resource calendar, for example)
745  /// </summary>
746  /// <param name="finish">Finish date.</param>
747  /// <param name="work">Amount of work.</param>
748  /// <param name="anotherCalendar">Another calendar that must not be ignored.</param>
749  /// <returns>Calculated start date.</returns>
750  ASPOSE_TASKS_SHARED_API System::DateTime GetStartDateByFinishAndWork(System::DateTime finish, System::TimeSpan work, const System::SharedPtr<Calendar>& anotherCalendar);
751  /// <summary>
752  /// Calculates the date when the specified amount of work time will pass according to the calendar and another calendar (resource calendar, for example)
753  /// </summary>
754  /// <param name="finish">Finish date.</param>
755  /// <param name="work">Amount of work.</param>
756  /// <returns>Calculated start date.</returns>
757  ASPOSE_TASKS_SHARED_API System::DateTime GetStartDateByFinishAndWork(System::DateTime finish, System::TimeSpan work);
758  /// <summary>
759  /// Gets working times at the specified date "intersected" with the date's TimeOfDay.
760  /// </summary>
761  ASPOSE_TASKS_SHARED_API System::SharedPtr<WorkingTimeCollection> GetWorkingTimesAtDate(System::DateTime date);
762  ASPOSE_TASKS_SHARED_API void StartExceptionsCaching();
763  ASPOSE_TASKS_SHARED_API void StopExceptionsCaching();
764  /// <summary>
765  /// Creates default standard calendar.
766  /// </summary>
767  /// <returns>Created calendar.</returns>
768  static ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> MakeStandardCalendarNoWeekend();
769  ASPOSE_TASKS_SHARED_API void SetWorkingExceptions(const System::SharedPtr<TimeScaledExceptions>& exceptionCollection);
770  /// <summary>
771  /// Creates default standard calendar.
772  /// </summary>
773  /// <returns>Created calendar.</returns>
774  static ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> Get24HoursCalendarInternal();
775  static ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> WrapCalendar(const System::SharedPtr<Calendar>& calendar, const System::SharedPtr<TimeScaledExceptions>& workingExceptions);
776  /// <summary>
777  /// Creates default standard calendar.
778  /// </summary>
779  /// <returns>Created calendar.</returns>
780  static ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> MakeStandardCalendarInternal();
781  ASPOSE_TASKS_SHARED_API System::SharedPtr<WorkingTimeCollection> GetWorkingTimesIgnoreExceptions(DayType dayType);
782  ASPOSE_TASKS_SHARED_API System::SharedPtr<CalendarException> CheckException(System::DateTime dt, bool checkImplicit = true);
783  ASPOSE_TASKS_SHARED_API System::SharedPtr<IReadOnlyWorkingTimeCollection> GetScheduleForImplicitException();
784 
785  virtual ASPOSE_TASKS_SHARED_API ~Calendar();
786 
787  #ifdef ASPOSE_GET_SHARED_MEMBERS
788  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
789  #endif
790 
791 
792 private:
793 
794  System::SharedPtr<CalendarDatesCalculator> calculator;
795  System::SharedPtr<CalendarExceptionCollectionWithCache> exceptions;
796  System::SharedPtr<TimeScaledExceptions> workingExceptions;
797  NullableBool isBaselineCalendar;
798  System::WeakPtr<Aspose::Tasks::Resource> resource;
799  System::Nullable<bool> is24HourCal;
800  System::SharedPtr<Calendar> baseCalendar;
801  System::String guid;
802  int32_t isCacheEnabledNesting;
803  System::SharedPtr<IKeyValueCache<System::DateTime, System::SharedPtr<WorkingTimeCollection>>> calculationsCache;
804 
805  static System::SharedPtr<Calendar>& calendar24Hours();
806 
807  System::String pr_Name;
808  int32_t pr_Uid;
809  System::SharedPtr<WeekDayCollection> pr_WeekDays;
810  System::SharedPtr<WorkWeekCollection> pr_WorkWeeks;
811 
812  /// <summary>
813  /// Gets WorkWeekCollections object.
814  /// The collection of work weeks that is associated with the calendar.
815  /// </summary>
816  ASPOSE_TASKS_SHARED_API void set_WorkWeeks(const System::SharedPtr<WorkWeekCollection>& value);
817 
818  System::WeakPtr<Project> pr_ParentProject;
819  int32_t pr_ResourceUid;
820  bool pr_IsNull;
821  System::Guid pr_UnknownGuid;
822 
823  System::String get_DebuggerDisplay();
824  /// <summary>
825  /// Gets a value indicating whether the calendar is 'uniform' (work times are the same for days with the same DayOfWeek).
826  /// </summary>
827  bool get_IsUniform();
828 
829  void TryToSkipByWeek(System::DateTime& enumeratorStartDate, int64_t& totalSpan, System::DateTime finish);
830  System::TimeSpan GetWorkingHoursInDay(System::DateTime start, System::DateTime finish);
831  void InitScheduleForTimescaledException(const System::SharedPtr<CalendarException>& exception, System::DateTime dt);
832  static void Make24HourWeek(const System::SharedPtr<Calendar>& calendar);
833  System::TimeSpan GetWeekTotalWork();
834  bool CheckWeekHasNoExceptions(System::DateTime start, System::DateTime finish);
835  static void MakeNightShiftWeek(const System::SharedPtr<Calendar>& calendar);
836  System::SharedPtr<WorkingTimeCollection> CalculateWorkingTimes(System::DateTime dt);
837  System::SharedPtr<WorkingTimeCollection> GetWorkingTimesForCalendarException(const System::SharedPtr<CalendarException>& calendarException, System::DateTime dt);
838  System::SharedPtr<WeekDay> GetWeekDay(System::DateTime dt);
839  System::SharedPtr<WeekDay> CheckWeekDay(DayType dayType);
840  System::SharedPtr<WeekDay> CheckDateInWorkWeeks(System::DateTime dt);
841 
842 };
843 
844 ASPOSE_TASKS_SHARED_API bool operator ==(Calendar::CalendarCacheKey left, Calendar::CalendarCacheKey right);
845 ASPOSE_TASKS_SHARED_API bool operator !=(Calendar::CalendarCacheKey left, Calendar::CalendarCacheKey right);
846 
847 } // namespace Tasks
848 } // namespace Aspose
849 
850 
Represents Baseline of a resource assignment.
Definition: AssignmentBaseline.h:84
Represents a collection of Calendar objects.
Definition: CalendarCollection.h:98
Represents a calendar used in a project.
Definition: Calendar.h:298
void Delete()
Removes calendar from project.
int32_t GetHashCode() const override
Returns a hash code for the instance of the class.
void set_IsBaselineCalendar(bool value)
Sets a value indicating whether the calendar is a baseline calendar.
System::String get_Name() const
Gets the name of the calendar.
static System::SharedPtr< Calendar > MakeStandardCalendar(const System::SharedPtr< Calendar > &calendar)
Creates default standard calendar.
System::DateTime GetStartDateFromFinishAndDuration(System::DateTime finish, Duration duration)
Returns StartDate based on specified FinishDate and Duration.
System::DateTime GetFinishDateByStartAndWork(System::DateTime start, System::TimeSpan work)
Calculates the date when the specified amount of work time will pass according to the calendar.
void set_BaseCalendar(const System::SharedPtr< Calendar > &value)
Sets the base calendar on which this calendar depends. Only applicable if the calendar is not a base ...
System::SharedPtr< CalendarExceptionCollection > get_Exceptions() const
Gets CalendarExceptionCollection object. The collection of exceptions that is associated with the cal...
System::SharedPtr< WorkingTimeCollection > GetWorkingTimes(System::DateTime dt)
Returns WorkingTimeCollection of working times for the specified date.
const System::SharedPtr< WorkWeekCollection > & get_WorkWeeks() const
Gets WorkWeekCollections object. The collection of work weeks that is associated with the calendar.
const System::SharedPtr< WeekDayCollection > & get_WeekDays() const
Gets WeekDaysCollection for this calendar. The collection of weekdays that defines the calendar.
System::DateTime GetTaskFinishDateFromDuration(const System::SharedPtr< Task > &task, System::TimeSpan duration)
Calculates the task finish date and time from its start date, split parts and the duration.
static System::SharedPtr< Calendar > MakeNightShiftCalendar(const System::SharedPtr< Calendar > &calendar)
Makes a given Calendar as Night Shift Calendar.
bool IsDayWorking(System::DateTime dt)
Determines whether the day is working day.
System::String get_Guid() const
Gets calendar's Guid.
bool get_IsBaselineCalendar()
Gets a value indicating whether the calendar is a baseline calendar.
static System::SharedPtr< Calendar > Make24HourCalendar(const System::SharedPtr< Calendar > &calendar)
Makes a given Calendar to be a 24Hour Calendar. 24Hours Calendar is a Calendar in which every day of ...
void set_Name(const System::String &value)
Sets the name of the calendar.
int32_t get_Uid() const
Gets the unique identifier of the calendar.
System::SharedPtr< WorkUnit > GetWorkingHours(System::DateTime start, System::DateTime finish)
Return working hours for the specified dates.
System::DateTime GetStartDateFromFinishAndDuration(System::DateTime finish, System::TimeSpan duration)
Returns StartDate based on specified FinishDate and Duration.
System::DateTime GetPreviousWorkingDayEnd(System::DateTime date)
Calculates previous working date end from the specified date.
bool get_IsBaseCalendar()
Gets a value indicating whether the calendar is a base calendar.
System::DateTime GetFinishDateByStartAndWork(System::DateTime start, Duration work)
Calculates the date when the specified amount of work time will pass according to the calendar.
void set_Uid(int32_t value)
Sets the unique identifier of the calendar.
System::TimeSpan GetWorkingHours(System::DateTime dt)
Returns amount of working hours at the date.
System::DateTime GetNextWorkingDayStart(System::DateTime date)
Calculates next working day start from the date.
bool Equals(System::SharedPtr< System::Object > obj) override
Returns a value indicating whether this instance is equal to a specified object.
System::SharedPtr< Calendar > get_BaseCalendar() const
Gets the base calendar on which this calendar depends. Only applicable if the calendar is not a base ...
Represents a class for repetitions in daily recurrence pattern based on calendar days.
Definition: DailyCalendarRepetition.h:36
Represents a class for repetitions in daily recurrence pattern based on work days.
Definition: DailyWorkRepetition.h:36
Represents duration in a project.
Definition: Duration.h:163
Represents a base pattern for monthly day position.
Definition: MonthlyRepetitionBase.h:40
A class for boolean values with possibility to check whether the value was defined or not.
Definition: NullableBool.h:22
Represents a project.
Definition: Project.h:552
Represents a resource assignment in a project.
Definition: ResourceAssignment.h:222
Represents a task portion. The SplitPart is a member of the task's SplitParts collection.
Definition: SplitPart.h:45
Represents Baseline of a Task.
Definition: TaskBaseline.h:53
Represents a task in a project.
Definition: Task.h:384
Represents a base class for repetitions in weekly recurrence pattern.
Definition: WeeklyRepetitionBase.h:40
Represents a base pattern for yearly day position.
Definition: YearlyRepetitionBase.h:38
Definition: Asn.h:13