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 HtmlResourceTableReader;
43 namespace PrimaveraXml
45 class PrimaveraReader;
53 class ProjectResourcesMapper;
59 class XerPrimaveraReader;
60 class XerProjectNormalizer;
69 class LevelingAlgorithm;
75 class TemplateProjectLoader;
76 class XerResourceTable;
86 template <
typename>
class IComparer;
87 template <
typename,
typename>
class IDictionary;
88 template <
typename>
class IEnumerator;
89 template <
typename>
class List;
101 class ASPOSE_TASKS_SHARED_CLASS
ResourceCollection :
public System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::Resource>>
104 typedef System::Collections::Generic::IList<System::SharedPtr<Aspose::Tasks::Resource>> BaseType;
106 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
107 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
109 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraReader;
110 friend class Aspose::Tasks::Leveling::LevelingAlgorithm;
113 friend class Aspose::Tasks::Saving::TemplateProjectLoader;
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::HtmlResourceTableReader;
118 friend class Aspose::Tasks::IO::MSProject::MPP12Reader;
119 friend class Aspose::Tasks::IO::MSProject::MPPReader;
120 friend class Aspose::Tasks::IO::MSProject::MPP14Reader;
121 friend class Aspose::Tasks::IO::MSProject::MPPWriter;
122 friend class Aspose::Tasks::IO::MSProject::MPP9Reader;
123 friend class Aspose::Tasks::IO::Mpx::MpxReader;
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::ProjectResourcesMapper;
127 friend class Aspose::Tasks::IO::Xml::XmlReader;
128 friend class Aspose::Tasks::Saving::XerResourceTable;
136 ASPOSE_TASKS_SHARED_API int32_t get_Count()
const override;
140 ASPOSE_TASKS_SHARED_API System::SharedPtr<Project> get_ParentProject()
const;
147 ASPOSE_TASKS_SHARED_API System::SharedPtr<Resource> idx_get(int32_t index)
const override;
153 ASPOSE_TASKS_SHARED_API
void idx_set(int32_t index, System::SharedPtr<Resource> value)
override;
159 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<Resource>>> GetEnumerator()
override;
164 ASPOSE_TASKS_SHARED_API System::SharedPtr<Resource> Add();
170 ASPOSE_TASKS_SHARED_API System::SharedPtr<Resource> Add(
const System::String& resourceName);
177 ASPOSE_TASKS_SHARED_API System::SharedPtr<Resource> Add(
const System::String& resourceName, int32_t beforeResourceId);
182 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Resource>>> ToList();
189 ASPOSE_TASKS_SHARED_API System::SharedPtr<Resource> GetById(int32_t
id);
196 ASPOSE_TASKS_SHARED_API System::SharedPtr<Resource> GetByUid(int32_t uid);
200 ASPOSE_TASKS_SHARED_API
void Clear()
override;
207 ASPOSE_TASKS_SHARED_API
bool Remove(
const System::SharedPtr<Resource>& item)
override;
211 ASPOSE_TASKS_SHARED_API
ResourceCollection(
const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Resource>>>& resources,
const System::SharedPtr<Project>& parentProject);
213 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
ResourceCollection, CODEPORTING_ARGS(
const System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Resource>>>& resources,
const System::SharedPtr<Project>& parentProject));
215 ASPOSE_TASKS_SHARED_API
ResourceCollection(
const System::SharedPtr<Project>& parentProject);
217 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
ResourceCollection, CODEPORTING_ARGS(
const System::SharedPtr<Project>& parentProject));
218 ASPOSE_TASKS_SHARED_API
void AddRootResource();
223 ASPOSE_TASKS_SHARED_API
void InitUidAndIdThenAdd(
const System::SharedPtr<Resource>& resource);
224 ASPOSE_TASKS_SHARED_API
bool RemoveInternal(
const System::SharedPtr<Resource>& resource);
228 ASPOSE_TASKS_SHARED_API
void CalcResourceIds();
232 ASPOSE_TASKS_SHARED_API
void CalcResourceUids();
233 ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Resource>>> GetValidResources();
234 ASPOSE_TASKS_SHARED_API
void Sort(
const System::SharedPtr<System::Collections::Generic::IComparer<System::SharedPtr<Resource>>>& comparer);
235 ASPOSE_TASKS_SHARED_API
void ClearInternal();
236 ASPOSE_TASKS_SHARED_API
void ResetCache();
240 #ifdef ASPOSE_GET_SHARED_MEMBERS
241 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
247 System::WeakPtr<Project> parentProject;
248 System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Resource>>> resources;
249 System::SharedPtr<System::Collections::Generic::IDictionary<int32_t, System::SharedPtr<Resource>>> idLookup;
250 System::SharedPtr<System::Collections::Generic::IDictionary<int32_t, System::SharedPtr<Resource>>> uidLookup;
251 System::SharedPtr<IdGenerator> idGenerator;
252 System::SharedPtr<IdGenerator> uidGenerator;
254 bool get_IsReadOnly()
const override;
256 void Add(
const System::SharedPtr<Resource>& item)
override;
257 bool Contains(
const System::SharedPtr<Resource>& item)
const override;
258 void CopyTo(System::ArrayPtr<System::SharedPtr<Resource>> array, int32_t arrayIndex)
override;
259 int32_t IndexOf(
const System::SharedPtr<Resource>& item)
const override;
260 void Insert(int32_t index,
const System::SharedPtr<Resource>& item)
override;
261 void RemoveAt(int32_t index)
override;
262 void AddResourceCalendar(
const System::SharedPtr<Resource>& resource);
263 bool ContainsRootResource();
265 void CalcResourceIds(int32_t startId);
266 void InitParentAndAssignments();
268 void InitUidLookup();