8 #include <system/collections/ilist.h>
9 #include <system/array.h>
12 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
18 namespace Connectivity
22 class PrimaveraDbReader;
29 class HtmlResourceAssignmentTableReader;
34 class MPP12TaskWriter;
38 namespace PrimaveraXml
40 class PrimaveraProjectNodeReader;
48 class ProjectAssignmentsMapper;
54 class XerPrimaveraReader;
55 class XerProjectNormalizer;
64 class ResourceAssignment;
65 class ResourceCollection;
68 class FromFinishScheduler;
69 class FromStartScheduler;
73 namespace Visualization
75 class ApsResourceUsageBuilder;
85 template <
typename,
typename>
class IDictionary;
86 template <
typename>
class IEnumerable;
87 template <
typename>
class IEnumerator;
88 template <
typename>
class List;
101 class ASPOSE_TASKS_SHARED_CLASS
ResourceAssignmentCollection :
public System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::ResourceAssignment>>
104 typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::ResourceAssignment>> BaseType;
106 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
107 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
109 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraProjectNodeReader;
114 friend class Aspose::Tasks::Connectivity::MpdReader;
115 friend class Aspose::Tasks::Connectivity::MspDbReader;
116 friend class Aspose::Tasks::Connectivity::PrimaveraDbReader;
117 friend class Aspose::Tasks::IO::Html::HtmlResourceAssignmentTableReader;
118 friend class Aspose::Tasks::IO::MSProject::MPP12Reader;
119 friend class Aspose::Tasks::IO::MSProject::MPP14Reader;
120 friend class Aspose::Tasks::IO::MSProject::MPP9Reader;
121 friend class Aspose::Tasks::IO::MSProject::MPP12TaskWriter;
122 friend class Aspose::Tasks::IO::Xer::XerPrimaveraReader;
123 friend class Aspose::Tasks::IO::Xer::XerProjectNormalizer;
124 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectAssignmentsMapper;
125 friend class Aspose::Tasks::IO::Xml::XmlReader;
126 friend class Aspose::Tasks::TaskPlanner;
128 friend class Aspose::Tasks::Scheduling::FromFinishScheduler;
129 friend class Aspose::Tasks::Scheduling::FromStartScheduler;
130 friend class Aspose::Tasks::Visualization::ApsResourceUsageBuilder;
145 ASPOSE_TASKS_SHARED_API int32_t
get_Count()
const override;
152 ASPOSE_TASKS_SHARED_API System::SharedPtr<ResourceAssignment>
idx_get(int32_t index)
const override;
158 ASPOSE_TASKS_SHARED_API
void idx_set(int32_t index, System::SharedPtr<ResourceAssignment> value)
override;
164 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<ResourceAssignment>>>
GetEnumerator()
override;
169 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<ResourceAssignment>>>
ToList();
177 ASPOSE_TASKS_SHARED_API System::SharedPtr<ResourceAssignment>
Add(
const System::SharedPtr<Task>& task,
const System::SharedPtr<Resource>& resource,
double units);
185 ASPOSE_TASKS_SHARED_API System::SharedPtr<ResourceAssignment>
Add(
const System::SharedPtr<Task>& task,
const System::SharedPtr<Resource>& resource, System::Decimal cost);
192 ASPOSE_TASKS_SHARED_API System::SharedPtr<ResourceAssignment>
Add(
const System::SharedPtr<Task>& task,
const System::SharedPtr<Resource>& resource);
199 ASPOSE_TASKS_SHARED_API System::SharedPtr<ResourceAssignment>
GetByUid(int32_t uid);
206 ASPOSE_TASKS_SHARED_API
bool Remove(
const System::SharedPtr<ResourceAssignment>& item)
override;
212 ASPOSE_TASKS_SHARED_API
void RemoveAt(int32_t index)
override;
217 ASPOSE_TASKS_SHARED_API
void Add(
const System::SharedPtr<ResourceAssignment>& item)
override;
221 ASPOSE_TASKS_SHARED_API System::SharedPtr<ResourceAssignment> get_First();
225 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
ResourceAssignmentCollection, CODEPORTING_ARGS(
const System::SharedPtr<Project>& parentProject,
bool isReadOnly));
229 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
ResourceAssignmentCollection, CODEPORTING_ARGS(
const System::SharedPtr<Project>& parentProject));
231 ASPOSE_TASKS_SHARED_API
ResourceAssignmentCollection(
const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<ResourceAssignment>>>& assignments,
const System::SharedPtr<Project>& parentProject);
233 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
ResourceAssignmentCollection, CODEPORTING_ARGS(
const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<ResourceAssignment>>>& assignments,
const System::SharedPtr<Project>& parentProject));
235 ASPOSE_TASKS_SHARED_API
ResourceAssignmentCollection(
const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<ResourceAssignment>>>& assignments,
const System::SharedPtr<Project>& parentProject,
bool isReadOnly);
237 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
ResourceAssignmentCollection, CODEPORTING_ARGS(
const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<ResourceAssignment>>>& assignments,
const System::SharedPtr<Project>& parentProject,
bool isReadOnly));
241 ASPOSE_TASKS_SHARED_API
void CalcResourceAssignmentUids();
242 ASPOSE_TASKS_SHARED_API
void AddInternal(
const System::SharedPtr<ResourceAssignment>& assn);
243 ASPOSE_TASKS_SHARED_API
bool RemoveInternal(
const System::SharedPtr<ResourceAssignment>& assn,
bool rebuildIndex =
true);
244 ASPOSE_TASKS_SHARED_API
void RemoveInternal(
const System::SharedPtr<System::Collections::Generic::IList<int32_t>>& indexes);
248 #ifdef ASPOSE_GET_SHARED_MEMBERS
249 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
255 System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<ResourceAssignment>>> assignments;
256 System::SharedPtr<System::Collections::Generic::IDictionary<System::SharedPtr<ResourceAssignment>, System::SharedPtr<ResourceAssignment>>> assnMap;
257 System::SharedPtr<System::Collections::Generic::IDictionary<int32_t, int32_t>> lookupIndex;
258 System::WeakPtr<Project> parentProject;
260 System::SharedPtr<IdGenerator> uidGenerator;
262 void Clear()
override;
263 bool Contains(
const System::SharedPtr<ResourceAssignment>& item)
const override;
264 void CopyTo(System::ArrayPtr<System::SharedPtr<ResourceAssignment>> array, int32_t arrayIndex)
override;
265 int32_t IndexOf(
const System::SharedPtr<ResourceAssignment>& item)
const override;
266 void Insert(int32_t index,
const System::SharedPtr<ResourceAssignment>& item)
override;
267 void RebuildAssnLookupIndex();
268 void Init(
const System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<ResourceAssignment>>>& assignmentCollection);
Represents a project.
Definition: Project.h:552
Represents a collection of ResourceAssignment objects.
Definition: ResourceAssignmentCollection.h:102
void idx_set(int32_t index, System::SharedPtr< ResourceAssignment > value) override
Returns the element at the specified index.
System::SharedPtr< ResourceAssignment > GetByUid(int32_t uid)
Returns an assignment with the specified uid.
System::SharedPtr< ResourceAssignment > Add(const System::SharedPtr< Task > &task, const System::SharedPtr< Resource > &resource, System::Decimal cost)
Adds new assignment to the ResourceAssignmentCollection.
bool Remove(const System::SharedPtr< ResourceAssignment > &item) override
Removes specified assignment from collection, if it is not read-only, otherwise throws NotSupportedEx...
void Add(const System::SharedPtr< ResourceAssignment > &item) override
This is the stub implementation of ICollection's Add method, that only throws NotSupportedException
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< ResourceAssignment > > > ToList()
Converts the ResourceAssignmentCollection object to a list of ResourceAssignment objects.
System::SharedPtr< Project > get_ParentProject() const
Gets the parent project of the ResourceAssignmentCollection object.
bool get_IsReadOnly() const override
Gets a value indicating whether this collection is read only.
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< ResourceAssignment > > > GetEnumerator() override
Returns an enumerator for this collection.
System::SharedPtr< ResourceAssignment > Add(const System::SharedPtr< Task > &task, const System::SharedPtr< Resource > &resource, double units)
Adds new assignment to the ResourceAssignmentCollection.
System::SharedPtr< ResourceAssignment > idx_get(int32_t index) const override
Returns the element at the specified index.
int32_t get_Count() const override
Gets the number of objects contained in the ResourceAssignmentCollection.
System::SharedPtr< ResourceAssignment > Add(const System::SharedPtr< Task > &task, const System::SharedPtr< Resource > &resource)
Adds new assignment to the ResourceAssignmentCollection.
void RemoveAt(int32_t index) override
Removes assignment at specified index, if collection is not read-only, otherwise throws NotSupportedE...
Represents a resource assignment in a project.
Definition: ResourceAssignment.h:222
Represents a collection of Resource objects.
Definition: ResourceCollection.h:102
Represents a resource in a project.
Definition: Resource.h:207
Represents a task in a project.
Definition: Task.h:384