9 #include <system/timespan.h>
10 #include <system/iequatable.h>
11 #include <system/array.h>
14 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
20 namespace Calculations
22 class ResourceAssignmentCalculator;
23 class ResourceAssignmentPeakCalculator;
24 class TaskEarlyLateDatesCalculator;
25 class TaskProgressCalculator;
26 class TaskStatusCalculator;
27 class TaskWorkCalculator;
29 namespace Connectivity
31 class DbTypeConverter;
32 class MpdAssignmentMapper;
34 class MspAssignmentMapper;
35 class MspDbTypeConverter;
36 class MspTaskBaseLineMapper;
38 class PmDbTypeConverter;
40 class ExtendedAttribute;
45 class HtmlReadingUtils;
46 class HtmlResourceAssignmentTableReader;
47 class HtmlTaskBaseLineTableReader;
48 class HtmlTaskTableReader;
56 class CustomFieldTypeReader;
57 class ExtendedAttributeValueConverter;
58 template <
typename,
typename>
class FieldItem;
59 class GanttBarStyleCalculator;
60 class MPP12OutlineCodeDefinitionReader;
61 class MPP14OutlineCodeDefinitionReader;
62 class MPP14ResourceAssignmentWriter;
63 class MPP14TaskReader;
64 class MPP9ExtendedAttributeDefinitionReader;
65 class MPPRecurringInfoReader;
67 namespace PrimaveraXml
70 class PrimaveraActivityNodeReader;
71 class PrimaveraAssignmentsNodeReader;
77 class ExtendedAttributeValueReader;
80 class AssignmentDurationPropertyMapper;
81 class BaseDurationPropertyMapper;
82 template <
typename>
class ProjectCoreEntityMapperBase;
83 class ProjectTasksMapper;
84 class TaskDurationPropertyMapper;
85 class TaskLinkEntityMapper;
87 class PropertyValueReader;
92 class XerAssignmentReader;
93 class XerRecordValueReader;
97 class ExtendedAttributeNodeReader;
98 class OutlineCodeDefinitionReader;
99 class ResourceAssignmentNodeReader;
100 class ResourceAssignmentNodeWriter;
101 class TaskNodeReader;
102 class TaskNodeWriter;
107 class ResourceLeveler;
110 class PercentCompleteCalculator;
114 class ProjectWorkUpdater;
115 class ResourceAssignment;
116 namespace RiskAnalysis
118 class RndDurationAlgorithm;
122 class DurationExtendedAttributeComparer;
126 class MpxSavingUtils;
131 class TaskPlannerAssignmentManager;
132 enum class TimeUnitType : int8_t;
137 class RscFieldToValue;
138 class TaskFieldToValue;
140 class PrimaveraTasksProcessor;
146 namespace Globalization
150 class IFormatProvider;
160 class ASPOSE_TASKS_SHARED_CLASS
Duration :
public System::IEquatable<Duration>,
public System::Details::BoxableObjectBase
163 typedef System::IEquatable<Duration> BaseType;
165 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
166 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
168 friend class Aspose::Tasks::Calculations::ResourceAssignmentCalculator;
170 template<
typename FT0,
typename FT1>
friend class Aspose::Tasks::IO::MSProject::FieldItem;
171 friend class Aspose::Tasks::IO::Pwa::InternalApi::ExtendedAttributeValueReader;
172 friend class Aspose::Tasks::IO::Html::HtmlTaskTableReader;
173 friend class Aspose::Tasks::Connectivity::MspDbTypeConverter;
174 friend class Aspose::Tasks::Connectivity::DbTypeConverter;
175 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::TaskDurationPropertyMapper;
176 friend class Aspose::Tasks::IO::MSProject::MPPRecurringInfoReader;
177 friend class Aspose::Tasks::Rollup::DurationExtendedAttributeComparer;
178 friend class Aspose::Tasks::IO::MSProject::MPP9ExtendedAttributeDefinitionReader;
179 friend class Aspose::Tasks::Util::Fields::RscFieldToValue;
180 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraActivityNodeReader;
181 friend class Aspose::Tasks::Calculations::TaskEarlyLateDatesCalculator;
182 friend class Aspose::Tasks::IO::Html::HtmlReadingUtils;
183 friend class Aspose::Tasks::Util::Fields::TaskFieldToValue;
184 friend class ProjectWorkUpdater;
185 friend class Aspose::Tasks::Connectivity::MpdTaskMapper;
186 template<
typename FT0>
friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectCoreEntityMapperBase;
187 friend class Aspose::Tasks::IO::Xml::OutlineCodeDefinitionReader;
189 friend class Aspose::Tasks::Util::PrimaveraTasksProcessor;
190 friend class Aspose::Tasks::IO::Xml::TaskNodeWriter;
191 friend class Aspose::Tasks::IO::MSProject::CustomFieldTypeReader;
192 friend class Aspose::Tasks::Saving::MpxSavingUtils;
193 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::AssignmentDurationPropertyMapper;
194 friend class Aspose::Tasks::Connectivity::MpdAssignmentMapper;
195 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectTasksMapper;
196 friend class Aspose::Tasks::IO::Pwa::InternalApi::PropertyValueReader;
197 friend class Aspose::Tasks::IO::Html::HtmlResourceAssignmentTableReader;
198 friend class Aspose::Tasks::IO::Xml::ExtendedAttributeNodeReader;
200 friend class Aspose::Tasks::IO::Mpx::MpxUtils;
201 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::BaseDurationPropertyMapper;
202 friend class Aspose::Tasks::IO::MSProject::MPP12OutlineCodeDefinitionReader;
203 template<
typename FT0,
typename FT1>
friend class Aspose::Tasks::IO::MSProject::FieldItem;
204 friend class Aspose::Tasks::IO::Xml::TaskNodeReader;
205 friend class TaskPlannerAssignmentManager;
206 friend class Aspose::Tasks::Calculations::TaskProgressCalculator;
207 friend class Aspose::Tasks::Connectivity::MspTaskMapper;
208 friend class Aspose::Tasks::Calculations::TaskStatusCalculator;
209 friend class TaskPlanner;
210 friend class Aspose::Tasks::Calculations::TaskWorkCalculator;
211 friend class Aspose::Tasks::IO::Xml::ResourceAssignmentNodeReader;
212 friend class Aspose::Tasks::IO::MSProject::MPP14TaskReader;
213 friend class Aspose::Tasks::IO::MSProject::MPP14ResourceAssignmentWriter;
214 friend class Aspose::Tasks::IO::PrimaveraXml::P6XmlUtils;
215 friend class Aspose::Tasks::IO::MSProject::GanttBarStyleCalculator;
218 friend class Aspose::Tasks::Connectivity::PmDbTypeConverter;
219 friend class Aspose::Tasks::RiskAnalysis::RndDurationAlgorithm;
220 friend class Aspose::Tasks::IO::Xml::ResourceAssignmentNodeWriter;
221 friend class Aspose::Tasks::IO::MSProject::ExtendedAttributeValueConverter;
222 friend class Aspose::Tasks::Connectivity::MspAssignmentMapper;
223 friend class Aspose::Tasks::IO::Xer::XerRecordValueReader;
224 friend class Aspose::Tasks::IO::Xer::XerAssignmentReader;
225 friend class Aspose::Tasks::Saving::MpxWriter;
226 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::TaskLinkEntityMapper;
227 friend class Aspose::Tasks::Calculations::ResourceAssignmentPeakCalculator;
228 friend class Aspose::Tasks::IO::Html::HtmlTaskBaseLineTableReader;
229 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraAssignmentsNodeReader;
230 friend class PercentCompleteCalculator;
231 friend class ProjDurValue;
232 friend class Aspose::Tasks::IO::MSProject::MPP14OutlineCodeDefinitionReader;
233 friend class ProjectState;
234 friend class Aspose::Tasks::Connectivity::MspTaskBaseLineMapper;
280 ASPOSE_TASKS_SHARED_API
static Duration Parse(
const System::SharedPtr<Project>& p,
const System::String& value);
286 ASPOSE_TASKS_SHARED_API
static System::TimeSpan
ParseTimeSpan(
const System::String& value);
333 ASPOSE_TASKS_SHARED_API
bool Equals(System::SharedPtr<System::Object> obj)
override;
346 ASPOSE_TASKS_SHARED_API System::String
ToString()
const override;
350 ASPOSE_TASKS_SHARED_API
double get_TotalMinutes();
351 ASPOSE_TASKS_SHARED_API
bool get_IsZeroDuration();
359 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit);
361 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit));
370 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit,
bool setUndefinedTimeUnit);
372 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit,
bool setUndefinedTimeUnit));
380 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit);
382 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit));
384 ASPOSE_TASKS_SHARED_API System::String ToString(
const System::SharedPtr<System::Globalization::CultureInfo>& cultureInfo);
392 ASPOSE_TASKS_SHARED_API
static Duration Parse(
const System::SharedPtr<Project>& p, System::String value,
const System::SharedPtr<System::IFormatProvider>& formatProvider);
397 ASPOSE_TASKS_SHARED_API int32_t ToInt();
404 ASPOSE_TASKS_SHARED_API
static Duration FromInt(
const System::SharedPtr<Project>& project, int32_t i);
412 ASPOSE_TASKS_SHARED_API
static Duration FromInt(
const System::SharedPtr<Project>& project, int32_t i, TimeUnitType timeUnit);
417 ASPOSE_TASKS_SHARED_API
double ToVariance();
424 ASPOSE_TASKS_SHARED_API
static Duration FromVariance(
const System::SharedPtr<Project>& project,
double variance);
432 ASPOSE_TASKS_SHARED_API
static Duration FromTimeSpan(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType type);
433 ASPOSE_TASKS_SHARED_API
static Duration ChangeTimeUnit(
Duration duration, TimeUnitType timeUnit);
434 ASPOSE_TASKS_SHARED_API
static Duration ChangeTimeSpan(
Duration duration, System::TimeSpan timeSpan);
435 ASPOSE_TASKS_SHARED_API
static Duration Add(
Duration duration, System::TimeSpan timeSpan);
436 #ifdef ASPOSE_GET_SHARED_MEMBERS
437 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
443 System::WeakPtr<Project> project;
444 System::TimeSpan pr_TimeSpan;
450 ASPOSE_TASKS_SHARED_API
void set_TimeSpan(System::TimeSpan value);
452 TimeUnitType pr_TimeUnit;
458 ASPOSE_TASKS_SHARED_API
void set_TimeUnit(TimeUnitType value);
460 static System::ArrayPtr<System::String>& DurationLabels();
462 System::String ToString_NonConst();
463 static TimeUnitType GetTimeUnitType(
const System::String& str);
464 static TimeUnitType ParseAsPercent(
const System::String& s);
465 static bool TryParseAsDate(
const System::String& s, TimeUnitType& type);
466 static TimeUnitType SelectWithModifier(
bool isEstimated,
bool isElapsed, TimeUnitType both, TimeUnitType estimated, TimeUnitType elapsed, TimeUnitType withoutModifiers);
467 static System::String GetUnit(System::String s,
bool& isEstimated,
bool& isElapsed);
468 static bool IsMinute(
const System::String& unit);
469 static bool IsHour(
const System::String& unit);
470 static bool IsDay(
const System::String& s);
471 static bool IsWeek(
const System::String& s);
472 static bool IsMonth(
const System::String& unit);
473 static bool IsYear(
const System::String& unit);
474 System::String GetDurationUnit(
const System::String& dur,
const System::String& abbr,
bool addSpaceBeforeLabel)
const;
475 bool GetAddSpaceBeforeLabel();
Represents duration in a project.
Definition: Duration.h:161
int32_t GetHashCode() const override
Returns a hash code value for this object.
Duration Add(double val)
Adds specified double value to this duration.
static System::TimeSpan ParseTimeSpan(const System::String &value)
Parses duration string in format "PT--H--M--S--".
System::String ToString() const override
Returns a string representation of this instance.
bool get_IsEstimated() const
Gets a value indicating whether time unit is estimated. The flag which determines whether this Durati...
bool get_IsElapsed() const
Gets a value indicating whether time unit is elapsed. The flag which determines whether this Duration...
Duration Subtract(double val)
Subtracts specified double value from this duration instance.
static Duration Parse(const System::SharedPtr< Project > &p, const System::String &value)
Converts the specified string to the instance of Duration struct.
Duration Subtract(Duration d)
Subtracts specified duration from this duration instance.
System::TimeSpan get_TimeSpan() const
Gets TimeSpan instance of this Duration object. The TimeSpan instance of this Duration object.
Duration Add(Duration d)
Adds specified duration to this duration.
TimeUnitType get_TimeUnit() const
Gets time unit type for this object. The time unit type of this Duration instance.
bool Equals(Duration other) override
Returns a value indicating whether this instance is equal to a specified object.
double ToDouble()
Converts Duration object to double value.
Duration Convert(TimeUnitType timeUnitType)
Converts Duration object to another duration with specified time units.
bool Equals(System::SharedPtr< System::Object > obj) override
Returns a value indicating whether this instance is equal to a specified object.
Represents extended attributes.
Definition: ExtendedAttribute.h:139
Contains resource leveling methods.
Definition: ResourceLeveler.h:46
Represents an outline value.
Definition: OutlineValue.h:80
Represents a project.
Definition: Project.h:551
Represents a resource assignment in a project.
Definition: ResourceAssignment.h:230
Represents a task in a project.
Definition: Task.h:394
Aspose.
Definition: Asn.h:13