Aspose.Tasks for C++
|
Represents a collection of Task objects. More...
#include <TaskCollection.h>
Inherits System::Collections::Generic::IList< typename >.
Public Types | |
using | iterator_holder_type = System::Collections::Generic::List< System::SharedPtr< Task > > |
A collection type whose iterator types is used as iterator types in the current collection. | |
using | iterator = typename iterator_holder_type::iterator |
Iterator type. | |
using | const_iterator = typename iterator_holder_type::const_iterator |
Const iterator type. | |
using | virtualized_iterator_element = typename iterator_holder_type::virtualized_iterator_element |
Virtualized element type. | |
using | virtualized_iterator = typename iterator_holder_type::virtualized_iterator |
Virtualized type. | |
Public Member Functions | |
int32_t | get_Count () const override |
Gets the number of objects contained in the TaskCollection. More... | |
System::SharedPtr< Project > | get_ParentProject () |
Gets the parent project of the TaskCollection object. More... | |
bool | get_IsReadOnly () const override |
Gets a value indicating whether this collection is read only. More... | |
System::SharedPtr< Task > | idx_get (int32_t index) const override |
Returns the element at the specified index. More... | |
void | idx_set (int32_t index, System::SharedPtr< Task > value) override |
Returns the element at the specified index. More... | |
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Task > > > | GetEnumerator () override |
Returns an enumerator for this collection. More... | |
void | Add (const System::SharedPtr< Task > &item) override |
Add the specified task to the instance of the TaskCollection class. If ParentProject.CalculationMode is None user should invoke Project.Recalculate() after using this method (It will reschedule all project tasks (start/finish dates, sets early/late dates) and calculate the dependent fields such as slacks, work and cost fields, ids and outline levels). If ParentProject.CalculationMode is Manual the method will calculate only task id, outline level and outline numbers automatically. If ParentProject.CalculationMode is Automatic the method reschedules all project's tasks automatically (start/finish dates, sets early/late dates, calculates slacks, work and cost fields, recalculates ids and outline levels). More... | |
void | Insert (int32_t index, const System::SharedPtr< Task > &item) override |
This is the stub implementation of IList's Insert method, that only throws NotSupportedException More... | |
bool | Remove (const System::SharedPtr< Task > &item) override |
This is the stub implementation of ICollection's Remove method, that only throws NotSupportedException More... | |
System::SharedPtr< Task > | Add () |
Adds new task to project tasks collection on the same outline level of the last task. More... | |
System::SharedPtr< Task > | Add (const System::String &taskName) |
Adds a new task to children tasks collection. More... | |
System::SharedPtr< Task > | Add (const System::String &taskName, int32_t beforeTaskId) |
Adds a new recurring task to children tasks collection. More... | |
System::SharedPtr< Task > | Add (const System::SharedPtr< RecurringTaskParameters > ¶meters) |
Inserts a new task before a task with the specified id and on the same outline level. More... | |
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Task > > > | ToList () |
Converts the TaskCollection object to a list of Task objects. More... | |
System::SharedPtr< Task > | GetByUid (int32_t uid) |
Returns a task with the specified Uid whose ancestor is parent task of this collection . More... | |
System::SharedPtr< Task > | GetById (int32_t id) |
Returns a task with the specified Id whose ancestor is parent task of this collection . More... | |
bool | Contains (const System::SharedPtr< Task > &item) const override |
Checks if collection contains specified item. More... | |
iterator | begin () noexcept |
iterator | end () noexcept |
const_iterator | begin () const noexcept |
const_iterator | end () const noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
virtualized_iterator * | virtualizeBeginIterator () override |
virtualized_iterator * | virtualizeEndIterator () override |
virtualized_iterator * | virtualizeBeginConstIterator () const override |
virtualized_iterator * | virtualizeEndConstIterator () const override |
Represents a collection of Task objects.
System::SharedPtr<Task> Aspose::Tasks::TaskCollection::Add | ( | ) |
Adds new task to project tasks collection on the same outline level of the last task.
System::SharedPtr<Task> Aspose::Tasks::TaskCollection::Add | ( | const System::SharedPtr< RecurringTaskParameters > & | parameters | ) |
Inserts a new task before a task with the specified id and on the same outline level.
parameters | The parameters the specified parameters for creation of recurring task. |
ArgumentNullException | Thrown if the specified parameters are null. |
ArgumentException | Thrown if the specified parameters are invalid. |
|
override |
Add the specified task to the instance of the TaskCollection class. If ParentProject.CalculationMode is None user should invoke Project.Recalculate() after using this method (It will reschedule all project tasks (start/finish dates, sets early/late dates) and calculate the dependent fields such as slacks, work and cost fields, ids and outline levels). If ParentProject.CalculationMode is Manual the method will calculate only task id, outline level and outline numbers automatically. If ParentProject.CalculationMode is Automatic the method reschedules all project's tasks automatically (start/finish dates, sets early/late dates, calculates slacks, work and cost fields, recalculates ids and outline levels).
item | the specified task which should be added to this task collection. |
System::SharedPtr<Task> Aspose::Tasks::TaskCollection::Add | ( | const System::String & | taskName | ) |
Adds a new task to children tasks collection.
taskName | the specified task name. |
System::SharedPtr<Task> Aspose::Tasks::TaskCollection::Add | ( | const System::String & | taskName, |
int32_t | beforeTaskId | ||
) |
Adds a new recurring task to children tasks collection.
taskName | the specified task name. |
beforeTaskId | The specified id of a task before which a new task will be inserted. |
ArgumentOutOfRangeException | ArgumentOutOfRangeException is thrown if the specified id is not a valid task id. |
|
noexcept |
Gets iterator pointing to the first element (if any) of the const-qualified instance of the collection.
|
noexcept |
Gets iterator pointing to the first element (if any) of the collection.
|
noexcept |
Gets iterator pointing to the first const-qualified element (if any) of the collection.
|
noexcept |
Gets iterator pointing right after the last const-qualified element (if any) of the collection.
|
override |
Checks if collection contains specified item.
item | The item to check. |
|
noexcept |
Gets iterator pointing right after the last element (if any) of the const-qualified instance of the collection.
|
noexcept |
Gets iterator pointing right after the last element (if any) of the collection.
|
override |
Gets the number of objects contained in the TaskCollection.
|
override |
Gets a value indicating whether this collection is read only.
System::SharedPtr<Project> Aspose::Tasks::TaskCollection::get_ParentProject | ( | ) |
Gets the parent project of the TaskCollection object.
System::SharedPtr<Task> Aspose::Tasks::TaskCollection::GetById | ( | int32_t | id | ) |
Returns a task with the specified Id whose ancestor is parent task of this collection .
id | TaskEntity Id |
System::SharedPtr<Task> Aspose::Tasks::TaskCollection::GetByUid | ( | int32_t | uid | ) |
Returns a task with the specified Uid whose ancestor is parent task of this collection .
uid | TaskEntity Uid. |
|
override |
Returns an enumerator for this collection.
|
override |
Returns the element at the specified index.
index | The zero-based index of the element to get. |
|
override |
Returns the element at the specified index.
index | The zero-based index of the element to get. |
value | the element at the specified index. |
|
override |
This is the stub implementation of IList's Insert method, that only throws NotSupportedException
index | The index to insert at. |
item | The item to insert. |
|
override |
This is the stub implementation of ICollection's Remove method, that only throws NotSupportedException
item | The item to remove. |
true
if the item was removed; false
otherwise.System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Task> > > Aspose::Tasks::TaskCollection::ToList | ( | ) |
Converts the TaskCollection object to a list of Task objects.
|
override |
Gets iterator pointing to the first element (if any)of the const-qualified instance of the collection.
|
override |
Gets iterator pointing to the first element (if any) of the collection.
|
override |
Gets iterator pointing right after the last element (if any)of the const-qualified instance of the collection.
|
override |
Gets iterator pointing right after the last element (if any) of the collection.