Aspose.Tasks for C++
|
Represents a calendar used in a project. More...
#include <Calendar.h>
Inherits Aspose::Tasks::ICalendar.
Public Member Functions | |
System::String | get_Name () const |
Gets the name of the calendar. More... | |
void | set_Name (const System::String &value) |
Sets the name of the calendar. More... | |
int32_t | get_Uid () const |
Gets the unique identifier of the calendar. More... | |
void | set_Uid (int32_t value) |
Sets the unique identifier of the calendar. More... | |
const System::SharedPtr< WeekDayCollection > & | get_WeekDays () const |
Gets WeekDaysCollection for this calendar. The collection of weekdays that defines the calendar. More... | |
System::SharedPtr< CalendarExceptionCollection > | get_Exceptions () const |
Gets CalendarExceptionCollection object. The collection of exceptions that is associated with the calendar. More... | |
const System::SharedPtr< WorkWeekCollection > & | get_WorkWeeks () const |
Gets WorkWeekCollections object. The collection of work weeks that is associated with the calendar. More... | |
bool | get_IsBaseCalendar () |
Gets a value indicating whether the calendar is a base calendar. More... | |
System::SharedPtr< Calendar > | get_BaseCalendar () const |
Gets the base calendar on which this calendar depends. Only applicable if the calendar is not a base calendar. More... | |
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 calendar. More... | |
bool | get_IsBaselineCalendar () |
Gets a value indicating whether the calendar is a baseline calendar. More... | |
void | set_IsBaselineCalendar (bool value) |
Sets a value indicating whether the calendar is a baseline calendar. More... | |
System::String | get_Guid () const |
Gets calendar's Guid. More... | |
bool | Equals (System::SharedPtr< System::Object > obj) override |
Returns a value indicating whether this instance is equal to a specified object. More... | |
int32_t | GetHashCode () const override |
Returns a hash code for the instance of the class. More... | |
void | Delete () |
Removes calendar from project. More... | |
System::DateTime | GetStartDateFromFinishAndDuration (System::DateTime finish, Duration duration) override |
Returns start date based on the specified finish date and duration. More... | |
System::DateTime | GetStartDateFromFinishAndDuration (System::DateTime finish, System::TimeSpan duration) override |
Returns start date based on specified finish date and duration. More... | |
bool | IsDayWorking (System::DateTime dt) override |
Determines whether the specified day is a working day according to the calendar. More... | |
System::SharedPtr< WorkUnit > | GetWorkingHours (System::DateTime start, System::DateTime finish) override |
Return WorkUnit - Start, Finish and Duration of working hours for the specified date time interval. More... | |
System::TimeSpan | GetWorkingHours (System::DateTime dt) override |
Returns the amount of working hours at the specified date. More... | |
System::TimeSpan | GetWorkingHoursTimeSpan (System::DateTime start, System::DateTime finish) override |
Returns amount of working hours between the specified dates. More... | |
System::DateTime | GetFinishDateByStartAndWork (System::DateTime start, Duration work) override |
Calculates the date when the specified amount of work time will pass according to the calendar. More... | |
System::DateTime | GetFinishDateByStartAndWork (System::DateTime start, System::TimeSpan work) override |
Calculates the date when the specified amount of work time will pass according to the calendar. More... | |
System::DateTime | GetTaskFinishDateFromDuration (System::SharedPtr< Task > task, System::TimeSpan duration) override |
Calculates the task finish date and time from its start date, split parts and the work duration. More... | |
System::SharedPtr< WorkingTimeCollection > | GetWorkingTimes (System::DateTime dt) override |
Returns WorkingTimeCollection of working times for the specified date. More... | |
System::DateTime | GetPreviousWorkingDayEnd (System::DateTime date) override |
Calculates the end of the previous working date from the specified date. More... | |
System::DateTime | GetNextWorkingDayStart (System::DateTime date) override |
Calculates next working day start for the specified date. More... | |
System::DateTime | GetWorkStart (System::DateTime date) override |
Calculates next working time start beginning from the specified date and time. More... | |
bool | IsEmpty () override |
Returns whether the calendar doesn't have working hours defined. More... | |
Static Public Member Functions | |
static System::SharedPtr< ICalendar > | GetIntersectionCalendar (const System::SharedPtr< Calendar > &calendar1, const System::SharedPtr< Calendar > &calendar2) |
Gets ICalendar instance which can be used to perform calculations on the intersection of work schedules of 2 calendars. More... | |
static System::SharedPtr< Calendar > | MakeStandardCalendar (const System::SharedPtr< Calendar > &calendar) |
Creates default standard calendar. More... | |
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 week is working with Round-the-clock working hours. More... | |
static System::SharedPtr< Calendar > | MakeNightShiftCalendar (const System::SharedPtr< Calendar > &calendar) |
Makes a given Calendar as Night Shift Calendar. More... | |
Represents a calendar used in a project.
How to create simple calendar from scratch.
Calendars are used to define standard working and non-working times. Projects must have one base calendar. Tasks and resources can have their own non-base calendars that are based on a base calendar.
void Aspose::Tasks::Calendar::Delete | ( | ) |
Removes calendar from project.
|
override |
Returns a value indicating whether this instance is equal to a specified object.
obj | The object to compare with this instance. |
System::SharedPtr<Calendar> Aspose::Tasks::Calendar::get_BaseCalendar | ( | ) | const |
Gets the base calendar on which this calendar depends. Only applicable if the calendar is not a base calendar.
System::SharedPtr<CalendarExceptionCollection> Aspose::Tasks::Calendar::get_Exceptions | ( | ) | const |
Gets CalendarExceptionCollection object. The collection of exceptions that is associated with the calendar.
System::String Aspose::Tasks::Calendar::get_Guid | ( | ) | const |
Gets calendar's Guid.
bool Aspose::Tasks::Calendar::get_IsBaseCalendar | ( | ) |
Gets a value indicating whether the calendar is a base calendar.
bool Aspose::Tasks::Calendar::get_IsBaselineCalendar | ( | ) |
Gets a value indicating whether the calendar is a baseline calendar.
System::String Aspose::Tasks::Calendar::get_Name | ( | ) | const |
Gets the name of the calendar.
int32_t Aspose::Tasks::Calendar::get_Uid | ( | ) | const |
Gets the unique identifier of the calendar.
const System::SharedPtr<WeekDayCollection>& Aspose::Tasks::Calendar::get_WeekDays | ( | ) | const |
Gets WeekDaysCollection for this calendar. The collection of weekdays that defines the calendar.
const System::SharedPtr<WorkWeekCollection>& Aspose::Tasks::Calendar::get_WorkWeeks | ( | ) | const |
Gets WorkWeekCollections object. The collection of work weeks that is associated with the calendar.
|
overridevirtual |
Calculates the date when the specified amount of work time will pass according to the calendar.
start | Start date. |
work | Work duration. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Calculates the date when the specified amount of work time will pass according to the calendar.
start | Start date. |
work | Work duration. |
Implements Aspose::Tasks::ICalendar.
|
override |
Returns a hash code for the instance of the class.
|
overridevirtual |
Calculates next working day start for the specified date.
date | The date to get next working day start for. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Calculates the end of the previous working date from the specified date.
date | the date to calculate the previous working day end. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Returns start date based on the specified finish date and duration.
finish | The specified finish date. |
duration | The specified duration. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Returns start date based on specified finish date and duration.
finish | The specified finish date. |
duration | The specified duration. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Calculates the task finish date and time from its start date, split parts and the work duration.
task | The task to calculate finish date for. |
duration | The duration to calculate. |
Returns DateTime.MinValue if task is summary, null or its start date is not set.
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Returns the amount of working hours at the specified date.
dt | The date to get working hours for. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Return WorkUnit - Start, Finish and Duration of working hours for the specified date time interval.
start | Start date of the interval. |
finish | Finish date of the interval. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Returns amount of working hours between the specified dates.
start | Start date of the interval. |
finish | Finish date of the interval. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Returns WorkingTimeCollection of working times for the specified date.
dt | The date to get working times for. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Calculates next working time start beginning from the specified date and time.
date | The date and time. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Determines whether the specified day is a working day according to the calendar.
dt | The date to check whether the day is working. |
Implements Aspose::Tasks::ICalendar.
|
overridevirtual |
Returns whether the calendar doesn't have working hours defined.
Implements Aspose::Tasks::ICalendar.
void Aspose::Tasks::Calendar::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 calendar.
void Aspose::Tasks::Calendar::set_IsBaselineCalendar | ( | bool | value | ) |
Sets a value indicating whether the calendar is a baseline calendar.
void Aspose::Tasks::Calendar::set_Name | ( | const System::String & | value | ) |
Sets the name of the calendar.
void Aspose::Tasks::Calendar::set_Uid | ( | int32_t | value | ) |
Sets the unique identifier of the calendar.