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"
19 namespace Calculations
21 class SummaryTaskCalculator;
23 namespace Connectivity
32 class HtmlTaskTableReader;
40 class MppTaskTreeBuilder;
42 namespace PrimaveraXml
45 class PrimaveraActivityNodeReader;
46 class PrimaveraProjectNodeReader;
54 class ProjectTasksMapper;
60 class XerPrimaveraReader;
61 class XerProjectNormalizer;
64 class PercentCompleteCalculator;
67 class RecurringTaskBuilder;
68 class RecurringTaskParameters;
69 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<Aspose::Tasks::Task>>
105 typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::Task>> BaseType;
107 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
108 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
110 friend class Aspose::Tasks::Calculations::SummaryTaskCalculator;
111 friend class Aspose::Tasks::IO::PrimaveraXml::P6XmlUtils;
112 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraActivityNodeReader;
113 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraProjectNodeReader;
115 friend class Aspose::Tasks::SummaryTaskTotals;
117 friend class Aspose::Tasks::Connectivity::MspTaskMapper;
118 friend class Aspose::Tasks::Connectivity::PmTaskMapper;
119 friend class Aspose::Tasks::IO::Html::HtmlTaskTableReader;
120 friend class Aspose::Tasks::Visualization::LegendItemsFlowLayoutBuilder;
121 friend class Aspose::Tasks::IO::MSProject::MppTaskTreeBuilder;
122 friend class Aspose::Tasks::IO::Mpx::MpxReader;
123 friend class Aspose::Tasks::TaskTreeBuilder;
124 friend class Aspose::Tasks::IO::Xer::XerPrimaveraReader;
125 friend class Aspose::Tasks::IO::Xer::XerProjectNormalizer;
126 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectTasksMapper;
127 friend class Aspose::Tasks::ProjectState;
128 friend class Aspose::Tasks::PercentCompleteCalculator;
129 friend class Aspose::Tasks::RecurringTaskBuilder;
137 using iterator =
typename iterator_holder_type::iterator;
150 ASPOSE_TASKS_SHARED_API int32_t get_Count()
const override;
154 ASPOSE_TASKS_SHARED_API System::SharedPtr<Project> get_ParentProject();
158 ASPOSE_TASKS_SHARED_API
bool get_IsReadOnly()
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;
253 ASPOSE_TASKS_SHARED_API
iterator begin() noexcept;
256 ASPOSE_TASKS_SHARED_API
iterator end() noexcept;
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));
310 ASPOSE_TASKS_SHARED_API
void AddInternal(const System::SharedPtr<
Task>& task);
311 ASPOSE_TASKS_SHARED_API
bool RemoveInternal(const System::SharedPtr<
Task>& task);
315 ASPOSE_TASKS_SHARED_API
void CalcTaskUids();
316 ASPOSE_TASKS_SHARED_API
void InsertInternal(int32_t index, const System::SharedPtr<
Task>& item);
317 ASPOSE_TASKS_SHARED_API
void Sort(const System::SharedPtr<System::Collections::Generic::IComparer<System::SharedPtr<
Task>>>& comparer);
321 #ifdef ASPOSE_GET_SHARED_MEMBERS
322 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
328 System::WeakPtr<Task> parentTask;
330 System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Task>>> tasks;
332 void RemoveAt(int32_t index)
override;
333 void Clear()
override;
334 void CopyTo(System::ArrayPtr<System::SharedPtr<Task>> array, int32_t arrayIndex)
override;
335 int32_t IndexOf(
const System::SharedPtr<Task>& item)
const override;
336 void SetParentTaskToAutomatic();
337 void Calculate(
const System::SharedPtr<Task>& task);
338 void AssignNewTaskId(
const System::SharedPtr<Task>& addedTask);
339 static bool IsLastTask(
const System::SharedPtr<Task>& task);
340 bool IsLastTaskInCollection(
const System::SharedPtr<Task>& task);
342 void UpdateEstimated(
const System::SharedPtr<Task>& task);