Aspose.Tasks for C++
Aspose::Tasks::CalendarCollection Class Reference

Represents a collection of Calendar objects. More...

#include <CalendarCollection.h>

Inherits System::Collections::Generic::IList< typename >.

Public Member Functions

int32_t get_Count () const override
 Gets the number of objects contained in this CalendarCollection object. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Calendar > > > GetEnumerator () override
 Returns an enumerator for this collection. More...
 
System::SharedPtr< CalendarAdd (const System::String &name)
 Adds a new base calendar to this CalendarCollection object and returns added calendar. More...
 
System::SharedPtr< CalendarAdd (const System::String &name, const System::SharedPtr< Calendar > &baseCalendar)
 Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar. More...
 
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Calendar > > > ToList ()
 Converts the CalendarCollection object to a list of Calendar objects. More...
 
System::SharedPtr< CalendarGetByUid (int32_t uid)
 Returns a calendar with the specified UID. More...
 
System::SharedPtr< CalendarGetByName (const System::String &name)
 Returns a calendar with the specified name. More...
 
bool Remove (const System::SharedPtr< Calendar > &item) override
 Removes Calendar from Project CalendarCollection. More...
 

Detailed Description

Represents a collection of Calendar objects.

Member Function Documentation

◆ Add() [1/2]

System::SharedPtr<Calendar> Aspose::Tasks::CalendarCollection::Add ( const System::String &  name)

Adds a new base calendar to this CalendarCollection object and returns added calendar.

Parameters
nameCalendar name.
Returns
Added Calendar object.
Exceptions
ArgumentExceptionThrown when calendar name is null.

◆ Add() [2/2]

System::SharedPtr<Calendar> Aspose::Tasks::CalendarCollection::Add ( const System::String &  name,
const System::SharedPtr< Calendar > &  baseCalendar 
)

Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar.

Parameters
nameSpecified name.
baseCalendarSpecified base calendar.
Returns
Added Calendar object.

◆ get_Count()

int32_t Aspose::Tasks::CalendarCollection::get_Count ( ) const
override

Gets the number of objects contained in this CalendarCollection object.

◆ GetByName()

System::SharedPtr<Calendar> Aspose::Tasks::CalendarCollection::GetByName ( const System::String &  name)

Returns a calendar with the specified name.

Parameters
nameName of a calendar.
Returns
If found returns calendar with a specified name else returns null.

◆ GetByUid()

System::SharedPtr<Calendar> Aspose::Tasks::CalendarCollection::GetByUid ( int32_t  uid)

Returns a calendar with the specified UID.

Parameters
uidUID of a calendar.
Returns
Calendar with a specified UID.

◆ GetEnumerator()

System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<Calendar> > > Aspose::Tasks::CalendarCollection::GetEnumerator ( )
override

Returns an enumerator for this collection.

Returns
an enumerator for this collection.

◆ Remove()

bool Aspose::Tasks::CalendarCollection::Remove ( const System::SharedPtr< Calendar > &  item)
override

Removes Calendar from Project CalendarCollection.

Parameters
itemThe calendar to remove.
Exceptions
InvalidOperationExceptionThrown when calendar cannot be removed.
Returns
If removed returns true, else returns false.

◆ ToList()

System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Calendar> > > Aspose::Tasks::CalendarCollection::ToList ( )

Converts the CalendarCollection object to a list of Calendar objects.

Returns
List of Calendar objects.