Aspose.Tasks for C++
|
Represents a calendar used in a project. More...
#include <Calendar.h>
Inherits System::Object.
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) |
Returns StartDate based on specified FinishDate and Duration. More... | |
System::DateTime | GetStartDateFromFinishAndDuration (System::DateTime finish, System::TimeSpan duration) |
Returns StartDate based on specified FinishDate and Duration. More... | |
bool | IsDayWorking (System::DateTime dt) |
Determines whether the day is working day. More... | |
System::SharedPtr< WorkUnit > | GetWorkingHours (System::DateTime start, System::DateTime finish) |
Return working hours for the specified dates. More... | |
System::DateTime | GetFinishDateByStartAndWork (System::DateTime start, Duration work) |
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) |
Calculates the date when the specified amount of work time will pass according to the calendar. More... | |
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. More... | |
System::TimeSpan | GetWorkingHours (System::DateTime dt) |
Returns amount of working hours at the date. More... | |
System::SharedPtr< WorkingTimeCollection > | GetWorkingTimes (System::DateTime dt) |
Returns WorkingTimeCollection of working times for the specified date. More... | |
System::DateTime | GetPreviousWorkingDayEnd (System::DateTime date) |
Calculates previous working date end from the specified date. More... | |
System::DateTime | GetNextWorkingDayStart (System::DateTime date) |
Calculates next working day start from the date. More... | |
Static Public Member Functions | |
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.
System::DateTime Aspose::Tasks::Calendar::GetFinishDateByStartAndWork | ( | System::DateTime | start, |
Duration | work | ||
) |
Calculates the date when the specified amount of work time will pass according to the calendar.
start | Start date. |
work | Work duration. |
System::DateTime Aspose::Tasks::Calendar::GetFinishDateByStartAndWork | ( | System::DateTime | start, |
System::TimeSpan | work | ||
) |
Calculates the date when the specified amount of work time will pass according to the calendar.
start | Start date. |
work | Work duration. |
|
override |
Returns a hash code for the instance of the class.
System::DateTime Aspose::Tasks::Calendar::GetNextWorkingDayStart | ( | System::DateTime | date | ) |
Calculates next working day start from the date.
date | The date to get next working day start for. |
System::DateTime Aspose::Tasks::Calendar::GetPreviousWorkingDayEnd | ( | System::DateTime | date | ) |
Calculates previous working date end from the specified date.
date | the specified instance of DateTime struct. |
System::DateTime Aspose::Tasks::Calendar::GetStartDateFromFinishAndDuration | ( | System::DateTime | finish, |
Duration | duration | ||
) |
Returns StartDate based on specified FinishDate and Duration.
finish | The specified finish date. |
duration | The specified work duration. |
System::DateTime Aspose::Tasks::Calendar::GetStartDateFromFinishAndDuration | ( | System::DateTime | finish, |
System::TimeSpan | duration | ||
) |
Returns StartDate based on specified FinishDate and Duration.
finish | The specified finish date. |
duration | The specified work duration. |
System::DateTime Aspose::Tasks::Calendar::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.
task | The task to get finish date for. |
duration | The task duration to split on. |
Returns DateTime.MinValue if task is summary, null or its start date is not set.
System::TimeSpan Aspose::Tasks::Calendar::GetWorkingHours | ( | System::DateTime | dt | ) |
Returns amount of working hours at the date.
dt | The date to get working hours for. |
System::SharedPtr<WorkUnit> Aspose::Tasks::Calendar::GetWorkingHours | ( | System::DateTime | start, |
System::DateTime | finish | ||
) |
Return working hours for the specified dates.
start | Start date. |
finish | Finish date. |
System::SharedPtr<WorkingTimeCollection> Aspose::Tasks::Calendar::GetWorkingTimes | ( | System::DateTime | dt | ) |
Returns WorkingTimeCollection of working times for the specified date.
dt | The date to get working times for. |
bool Aspose::Tasks::Calendar::IsDayWorking | ( | System::DateTime | dt | ) |
Determines whether the day is working day.
dt | The date to check day is working for. |
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.