9 #include <system/timespan.h>
10 #include <system/object_ext.h>
11 #include <system/iequatable.h>
12 #include <system/array.h>
15 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
21 namespace Calculations
23 class ResourceAssignmentCalculator;
24 class ResourceAssignmentPeakCalculator;
25 class TaskEarlyLateDatesCalculator;
26 class TaskProgressCalculator;
27 class TaskStatusCalculator;
28 class TaskWorkCalculator;
30 namespace Connectivity
32 class DbTypeConverter;
33 class MpdAssignmentMapper;
35 class MspAssignmentMapper;
36 class MspDbTypeConverter;
37 class MspTaskBaseLineMapper;
39 class PmDbTypeConverter;
41 class ExtendedAttribute;
46 class HtmlReadingUtils;
47 class HtmlResourceAssignmentTableReader;
48 class HtmlTaskBaseLineTableReader;
49 class HtmlTaskTableReader;
57 class CustomFieldTypeReader;
58 class ExtendedAttributeValueConverter;
59 template <
typename,
typename>
class FieldItem;
60 class GanttBarStyleCalculator;
61 class MPP12OutlineCodeDefinitionReader;
62 class MPP14OutlineCodeDefinitionReader;
63 class MPP14ResourceAssignmentWriter;
64 class MPP14TaskReader;
65 class MPP9ExtendedAttributeDefinitionReader;
66 class MPPRecurringInfoReader;
68 namespace PrimaveraXml
71 class PrimaveraActivityNodeReader;
72 class PrimaveraAssignmentsNodeReader;
78 class ExtendedAttributeValueReader;
81 class AssignmentDurationPropertyMapper;
82 class BaseDurationPropertyMapper;
83 template <
typename>
class ProjectCoreEntityMapperBase;
84 class ProjectTasksMapper;
85 class TaskDurationPropertyMapper;
86 class TaskLinkEntityMapper;
88 class PropertyValueReader;
93 class XerAssignmentReader;
94 class XerRecordValueReader;
98 class ExtendedAttributeNodeReader;
99 class OutlineCodeDefinitionReader;
100 class ResourceAssignmentNodeReader;
101 class ResourceAssignmentNodeWriter;
102 class TaskNodeReader;
103 class TaskNodeWriter;
108 class ResourceLeveler;
111 class PercentCompleteCalculator;
115 class ProjectWorkUpdater;
116 class ResourceAssignment;
117 namespace RiskAnalysis
119 class RndDurationAlgorithm;
123 class DurationExtendedAttributeComparer;
127 class MpxSavingUtils;
132 class TaskPlannerAssignmentManager;
133 enum class TimeUnitType : int8_t;
138 class RscFieldToValue;
139 class TaskFieldToValue;
141 class PrimaveraTasksProcessor;
147 namespace Globalization
151 class IFormatProvider;
161 class ASPOSE_TASKS_SHARED_CLASS
Duration :
public System::IEquatable<Aspose::Tasks::Duration>,
public System::Details::BoxableObjectBase
164 typedef System::IEquatable<Aspose::Tasks::Duration> BaseType;
166 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
167 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
169 friend class Aspose::Tasks::Calculations::TaskEarlyLateDatesCalculator;
170 friend class Aspose::Tasks::Calculations::ResourceAssignmentCalculator;
171 friend class Aspose::Tasks::Calculations::ResourceAssignmentPeakCalculator;
172 friend class Aspose::Tasks::Calculations::TaskProgressCalculator;
173 friend class Aspose::Tasks::Calculations::TaskStatusCalculator;
174 friend class Aspose::Tasks::Calculations::TaskWorkCalculator;
175 friend class Aspose::Tasks::IO::MSProject::GanttBarStyleCalculator;
176 friend class Aspose::Tasks::IO::PrimaveraXml::P6XmlUtils;
177 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraActivityNodeReader;
178 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraAssignmentsNodeReader;
179 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::BaseDurationPropertyMapper;
180 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::AssignmentDurationPropertyMapper;
181 friend class Aspose::Tasks::IO::Xer::XerRecordValueReader;
186 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::TaskDurationPropertyMapper;
188 friend class Aspose::Tasks::ProjDurValue;
189 friend class Aspose::Tasks::Connectivity::DbTypeConverter;
190 friend class Aspose::Tasks::Connectivity::MpdAssignmentMapper;
191 friend class Aspose::Tasks::Connectivity::MspDbTypeConverter;
192 friend class Aspose::Tasks::Connectivity::MpdTaskMapper;
193 friend class Aspose::Tasks::Connectivity::MspAssignmentMapper;
194 friend class Aspose::Tasks::Connectivity::MspTaskBaseLineMapper;
195 friend class Aspose::Tasks::Connectivity::MspTaskMapper;
196 friend class Aspose::Tasks::Connectivity::PmDbTypeConverter;
197 friend class Aspose::Tasks::IO::Html::HtmlReadingUtils;
198 friend class Aspose::Tasks::IO::Html::HtmlResourceAssignmentTableReader;
199 friend class Aspose::Tasks::IO::Html::HtmlTaskBaseLineTableReader;
200 friend class Aspose::Tasks::IO::Html::HtmlTaskTableReader;
201 friend class Aspose::Tasks::IO::MSProject::CustomFieldTypeReader;
202 friend class Aspose::Tasks::IO::MSProject::ExtendedAttributeValueConverter;
203 template<
typename FT0,
typename FT1>
friend class Aspose::Tasks::IO::MSProject::FieldItem;
204 template<
typename FT0,
typename FT1>
friend class Aspose::Tasks::IO::MSProject::FieldItem;
205 friend class Aspose::Tasks::IO::MSProject::MPP12OutlineCodeDefinitionReader;
206 friend class Aspose::Tasks::IO::MSProject::MPP14OutlineCodeDefinitionReader;
207 friend class Aspose::Tasks::IO::MSProject::MPP14TaskReader;
208 friend class Aspose::Tasks::IO::MSProject::MPP14ResourceAssignmentWriter;
209 friend class Aspose::Tasks::IO::MSProject::MPP9ExtendedAttributeDefinitionReader;
210 friend class Aspose::Tasks::IO::MSProject::MPPRecurringInfoReader;
211 friend class Aspose::Tasks::IO::Mpx::MpxUtils;
212 friend class Aspose::Tasks::IO::Xer::XerAssignmentReader;
213 friend class Aspose::Tasks::IO::Pwa::InternalApi::ExtendedAttributeValueReader;
214 template<
typename FT0>
friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectCoreEntityMapperBase;
215 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectTasksMapper;
216 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::TaskLinkEntityMapper;
217 friend class Aspose::Tasks::IO::Pwa::InternalApi::PropertyValueReader;
218 friend class Aspose::Tasks::IO::Xml::ExtendedAttributeNodeReader;
219 friend class Aspose::Tasks::IO::Xml::OutlineCodeDefinitionReader;
220 friend class Aspose::Tasks::IO::Xml::ResourceAssignmentNodeReader;
221 friend class Aspose::Tasks::IO::Xml::ResourceAssignmentNodeWriter;
222 friend class Aspose::Tasks::IO::Xml::TaskNodeReader;
223 friend class Aspose::Tasks::IO::Xml::TaskNodeWriter;
225 friend class Aspose::Tasks::ProjectState;
226 friend class Aspose::Tasks::TaskPlannerAssignmentManager;
227 friend class Aspose::Tasks::TaskPlanner;
228 friend class Aspose::Tasks::PercentCompleteCalculator;
229 friend class Aspose::Tasks::ProjectWorkUpdater;
230 friend class Aspose::Tasks::RiskAnalysis::RndDurationAlgorithm;
231 friend class Aspose::Tasks::Rollup::DurationExtendedAttributeComparer;
232 friend class Aspose::Tasks::Saving::MpxSavingUtils;
233 friend class Aspose::Tasks::Saving::MpxWriter;
234 friend class Aspose::Tasks::Util::Fields::RscFieldToValue;
235 friend class Aspose::Tasks::Util::Fields::TaskFieldToValue;
236 friend class Aspose::Tasks::Util::PrimaveraTasksProcessor;
246 ASPOSE_TASKS_SHARED_API System::TimeSpan get_TimeSpan()
const;
251 ASPOSE_TASKS_SHARED_API TimeUnitType get_TimeUnit()
const;
256 ASPOSE_TASKS_SHARED_API
bool get_IsEstimated()
const;
261 ASPOSE_TASKS_SHARED_API
bool get_IsElapsed()
const;
269 static ASPOSE_TASKS_SHARED_API
Duration Parse(
const System::SharedPtr<Project>& p,
const System::String& value);
275 static ASPOSE_TASKS_SHARED_API System::TimeSpan ParseTimeSpan(
const System::String& value);
280 ASPOSE_TASKS_SHARED_API
double ToDouble();
286 ASPOSE_TASKS_SHARED_API
Duration Convert(TimeUnitType timeUnitType);
298 ASPOSE_TASKS_SHARED_API
Duration Add(
double val);
310 ASPOSE_TASKS_SHARED_API
Duration Subtract(
double val);
316 ASPOSE_TASKS_SHARED_API
bool Equals(
Duration other)
override;
322 ASPOSE_TASKS_SHARED_API
bool Equals(System::SharedPtr<System::Object> obj)
override;
327 ASPOSE_TASKS_SHARED_API int32_t GetHashCode()
const override;
335 ASPOSE_TASKS_SHARED_API System::String ToString()
const override;
339 ASPOSE_TASKS_SHARED_API
double get_TotalMinutes();
340 ASPOSE_TASKS_SHARED_API
bool get_IsZeroDuration();
348 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit);
350 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit));
359 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit,
bool setUndefinedTimeUnit);
361 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit,
bool setUndefinedTimeUnit));
369 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit);
371 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit));
372 ASPOSE_TASKS_SHARED_API System::String ToString(
const System::SharedPtr<System::Globalization::CultureInfo>& cultureInfo);
380 static ASPOSE_TASKS_SHARED_API
Duration Parse(
const System::SharedPtr<Project>& p, System::String value,
const System::SharedPtr<System::IFormatProvider>& formatProvider);
385 ASPOSE_TASKS_SHARED_API int32_t ToInt();
392 static ASPOSE_TASKS_SHARED_API
Duration FromInt(
const System::SharedPtr<Project>& project, int32_t i);
400 static ASPOSE_TASKS_SHARED_API
Duration FromInt(
const System::SharedPtr<Project>& project, int32_t i, TimeUnitType timeUnit);
405 ASPOSE_TASKS_SHARED_API
double ToVariance();
412 static ASPOSE_TASKS_SHARED_API
Duration FromVariance(
const System::SharedPtr<Project>& project,
double variance);
420 static ASPOSE_TASKS_SHARED_API
Duration FromTimeSpan(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType type);
421 static ASPOSE_TASKS_SHARED_API
Duration ChangeTimeUnit(
Duration duration, TimeUnitType timeUnit);
422 static ASPOSE_TASKS_SHARED_API
Duration ChangeTimeSpan(
Duration duration, System::TimeSpan timeSpan);
423 static ASPOSE_TASKS_SHARED_API
Duration ChangeIsEstimated(
Duration duration,
bool isEstimated);
424 static ASPOSE_TASKS_SHARED_API
Duration Add(
Duration duration, System::TimeSpan timeSpan);
425 #ifdef ASPOSE_GET_SHARED_MEMBERS
426 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
432 System::WeakPtr<Project> project;
433 System::TimeSpan pr_TimeSpan;
439 ASPOSE_TASKS_SHARED_API
void set_TimeSpan(System::TimeSpan value);
441 TimeUnitType pr_TimeUnit;
447 ASPOSE_TASKS_SHARED_API
void set_TimeUnit(TimeUnitType value);
449 static System::ArrayPtr<System::String>& DurationLabels();
450 System::String ToString_NonConst();
451 static TimeUnitType GetTimeUnitType(
const System::String& str);
452 static TimeUnitType ParseAsPercent(
const System::String& s);
453 static bool TryParseAsDate(
const System::String& s, TimeUnitType& type);
454 static TimeUnitType SelectWithModifier(
bool isEstimated,
bool isElapsed, TimeUnitType both, TimeUnitType estimated, TimeUnitType elapsed, TimeUnitType withoutModifiers);
455 static System::String GetUnit(System::String s,
bool& isEstimated,
bool& isElapsed);
456 static bool IsMinute(
const System::String& unit);
457 static bool IsHour(
const System::String& unit);
458 static bool IsDay(
const System::String& s);
459 static bool IsWeek(
const System::String& s);
460 static bool IsMonth(
const System::String& unit);
461 static bool IsYear(
const System::String& unit);
462 System::String GetDurationUnit(
const System::String& dur,
const System::String& abbr,
bool addSpaceBeforeLabel)
const;
463 bool GetAddSpaceBeforeLabel();
473 namespace System {
template<>
struct IsBoxable<
Aspose::Tasks::Duration> : std::true_type {}; }