8 #include <system/collections/list.h>
9 #include <system/collections/ilist.h>
10 #include <system/array.h>
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
14 #include "aspose.tasks.cpp/Task.h"
20 namespace Calculations
22 class SummaryTaskCalculator;
24 namespace Connectivity
33 class HtmlTaskTableReader;
41 class MppTaskTreeBuilder;
43 namespace PrimaveraXml
46 class PrimaveraActivityNodeReader;
47 class PrimaveraProjectNodeReader;
55 class ProjectTasksMapper;
61 class XerPrimaveraReader;
62 class XerProjectNormalizer;
65 class PercentCompleteCalculator;
68 class RecurringTaskBuilder;
69 class RecurringTaskParameters;
70 class SummaryTaskTotals;
71 class TaskTreeBuilder;
77 namespace Visualization
79 class LegendItemsFlowLayoutBuilder;
89 template <
typename>
class IComparer;
90 template <
typename>
class IEnumerator;
102 class ASPOSE_TASKS_SHARED_CLASS
TaskCollection :
public System::Collections::Generic::IList<System::SharedPtr<Task>>
105 typedef System::Collections::Generic::IList<System::SharedPtr<Task>> BaseType;
107 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
108 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
111 friend class Aspose::Tasks::IO::Xer::XerPrimaveraReader;
112 friend class Aspose::Tasks::IO::Xer::XerProjectNormalizer;
113 friend class Aspose::Tasks::IO::Html::HtmlTaskTableReader;
114 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraActivityNodeReader;
115 friend class TaskTreeBuilder;
117 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectTasksMapper;
118 friend class Aspose::Tasks::Visualization::LegendItemsFlowLayoutBuilder;
120 friend class Aspose::Tasks::Connectivity::MspTaskMapper;
121 friend class Aspose::Tasks::Connectivity::PmTaskMapper;
122 friend class Aspose::Tasks::IO::Mpx::MpxReader;
123 friend class Aspose::Tasks::IO::PrimaveraXml::P6XmlUtils;
124 friend class Aspose::Tasks::IO::MSProject::MppTaskTreeBuilder;
125 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraProjectNodeReader;
126 friend class SummaryTaskTotals;
128 friend class RecurringTaskBuilder;
129 friend class PercentCompleteCalculator;
130 friend class Aspose::Tasks::Calculations::SummaryTaskCalculator;
131 friend class ProjectState;
137 using iterator =
typename iterator_holder_type::iterator;
150 ASPOSE_TASKS_SHARED_API int32_t
get_Count()
const override;
165 ASPOSE_TASKS_SHARED_API System::SharedPtr<Task>
idx_get(int32_t index)
const override;
171 ASPOSE_TASKS_SHARED_API
void idx_set(int32_t index, System::SharedPtr<Task> value)
override;
177 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<Task>>>
GetEnumerator()
override;
186 ASPOSE_TASKS_SHARED_API
void Add(
const System::SharedPtr<Task>& item)
override;
193 ASPOSE_TASKS_SHARED_API
void Insert(int32_t index,
const System::SharedPtr<Task>& item)
override;
200 ASPOSE_TASKS_SHARED_API
bool Remove(
const System::SharedPtr<Task>& item)
override;
205 ASPOSE_TASKS_SHARED_API System::SharedPtr<Task>
Add();
211 ASPOSE_TASKS_SHARED_API System::SharedPtr<Task>
Add(
const System::String& taskName);
219 ASPOSE_TASKS_SHARED_API System::SharedPtr<Task>
Add(
const System::String& taskName, int32_t beforeTaskId);
227 ASPOSE_TASKS_SHARED_API System::SharedPtr<Task>
Add(
const System::SharedPtr<RecurringTaskParameters>& parameters);
232 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Task>>>
ToList();
238 ASPOSE_TASKS_SHARED_API System::SharedPtr<Task>
GetByUid(int32_t uid);
244 ASPOSE_TASKS_SHARED_API System::SharedPtr<Task>
GetById(int32_t
id);
250 ASPOSE_TASKS_SHARED_API
bool Contains(
const System::SharedPtr<Task>& item)
const override;
292 System::SharedPtr<SummaryTaskTotals> Totals;
297 ASPOSE_TASKS_SHARED_API System::SharedPtr<
Task> get_ParentTask() const;
299 ASPOSE_TASKS_SHARED_API
TaskCollection(const System::SharedPtr<
Task>& parentTask,
bool isReadOnly, const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<
Task>>>& tasks);
301 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
TaskCollection, CODEPORTING_ARGS(const System::SharedPtr<
Task>& parentTask,
bool isReadOnly, const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<
Task>>>& tasks));
305 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
TaskCollection, CODEPORTING_ARGS(const System::SharedPtr<
Task>& parentTask));
307 ASPOSE_TASKS_SHARED_API
TaskCollection(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<
Task>>>& tasks, const System::SharedPtr<
Task>& parentTask);
309 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
TaskCollection, CODEPORTING_ARGS(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<
Task>>>& tasks, const System::SharedPtr<
Task>& parentTask));
311 ASPOSE_TASKS_SHARED_API
void AddInternal(const System::SharedPtr<
Task>& task);
312 ASPOSE_TASKS_SHARED_API
bool RemoveInternal(const System::SharedPtr<
Task>& task);
316 ASPOSE_TASKS_SHARED_API
void CalcTaskUids();
317 ASPOSE_TASKS_SHARED_API
void InsertInternal(int32_t index, const System::SharedPtr<
Task>& item);
318 ASPOSE_TASKS_SHARED_API
void Sort(const System::SharedPtr<System::Collections::Generic::IComparer<System::SharedPtr<
Task>>>& comparer);
322 #ifdef ASPOSE_GET_SHARED_MEMBERS
323 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
329 System::WeakPtr<Task> parentTask;
331 System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Task>>> tasks;
333 ASPOSE_TASKS_SHARED_API
void RemoveAt(int32_t index)
override;
334 ASPOSE_TASKS_SHARED_API
void Clear()
override;
335 ASPOSE_TASKS_SHARED_API
void CopyTo(System::ArrayPtr<System::SharedPtr<Task>> array, int32_t arrayIndex)
override;
336 ASPOSE_TASKS_SHARED_API int32_t IndexOf(
const System::SharedPtr<Task>& item)
const override;
337 void SetParentTaskToAutomatic();
338 void Calculate(
const System::SharedPtr<Task>& task);
339 void AssignNewTaskId(
const System::SharedPtr<Task>& addedTask);
340 static bool IsLastTask(
const System::SharedPtr<Task>& task);
341 bool IsLastTaskInCollection(
const System::SharedPtr<Task>& task);
343 void UpdateEstimated(
const System::SharedPtr<Task>& task);
Represents a project.
Definition: Project.h:550
Represents a collection of Task objects.
Definition: TaskCollection.h:103
System::SharedPtr< Task > GetByUid(int32_t uid)
Returns a task with the specified Uid whose ancestor is parent task of this collection .
bool Contains(const System::SharedPtr< Task > &item) const override
Checks if collection contains specified item.
typename iterator_holder_type::iterator iterator
Iterator type.
Definition: TaskCollection.h:137
System::SharedPtr< Task > Add()
Adds new task to project tasks collection on the same outline level of the last task.
void Add(const System::SharedPtr< Task > &item) override
Add the specified task to the instance of the TaskCollection class. If ParentProject....
int32_t get_Count() const override
Gets the number of objects contained in the TaskCollection.
System::SharedPtr< Task > Add(const System::String &taskName)
Adds a new task to children tasks collection.
typename iterator_holder_type::const_iterator const_iterator
Const iterator type.
Definition: TaskCollection.h:139
typename iterator_holder_type::virtualized_iterator_element virtualized_iterator_element
Virtualized element type.
Definition: TaskCollection.h:141
System::SharedPtr< Task > Add(const System::String &taskName, int32_t beforeTaskId)
Adds a new recurring task to children tasks collection.
System::Collections::Generic::List< System::SharedPtr< Task > > iterator_holder_type
A collection type whose iterator types is used as iterator types in the current collection.
Definition: TaskCollection.h:135
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Task > > > GetEnumerator() override
Returns an enumerator for this collection.
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
System::SharedPtr< Task > idx_get(int32_t index) const override
Returns the element at the specified index.
iterator begin() noexcept
typename iterator_holder_type::virtualized_iterator virtualized_iterator
Virtualized type.
Definition: TaskCollection.h:143
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Task > > > ToList()
Converts the TaskCollection object to a list of Task objects.
bool get_IsReadOnly() const override
Gets a value indicating whether this collection is read only.
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.
System::SharedPtr< Project > get_ParentProject()
Gets the parent project of the TaskCollection object.
void idx_set(int32_t index, System::SharedPtr< Task > value) override
Returns the element at the specified index.
System::SharedPtr< Task > GetById(int32_t id)
Returns a task with the specified Id whose ancestor is parent task of this collection .
bool Remove(const System::SharedPtr< Task > &item) override
This is the stub implementation of ICollection's Remove method, that only throws NotSupportedExceptio...
Represents a task in a project.
Definition: Task.h:391
Removes the specified task from a tree of tasks.
Definition: RemoveTask.h:33
Helper class which provides useful operations with tasks.
Definition: TaskUtils.h:40
Aspose.
Definition: Asn.h:13