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 class TimephasedDataMaker;
134 enum class TimeUnitType : int8_t;
139 class RscFieldToValue;
140 class TaskFieldToValue;
142 class PrimaveraTasksProcessor;
148 namespace Globalization
152 class IFormatProvider;
162 class ASPOSE_TASKS_SHARED_CLASS
Duration :
public System::IEquatable<Aspose::Tasks::Duration>,
public System::Details::BoxableObjectBase
165 typedef System::IEquatable<Aspose::Tasks::Duration> BaseType;
167 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
168 ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
170 friend class Aspose::Tasks::Calculations::TaskEarlyLateDatesCalculator;
171 friend class Aspose::Tasks::Calculations::ResourceAssignmentCalculator;
172 friend class Aspose::Tasks::Calculations::ResourceAssignmentPeakCalculator;
173 friend class Aspose::Tasks::Calculations::TaskProgressCalculator;
174 friend class Aspose::Tasks::Calculations::TaskStatusCalculator;
175 friend class Aspose::Tasks::Calculations::TaskWorkCalculator;
176 friend class Aspose::Tasks::IO::MSProject::GanttBarStyleCalculator;
177 friend class Aspose::Tasks::IO::PrimaveraXml::P6XmlUtils;
178 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraActivityNodeReader;
179 friend class Aspose::Tasks::IO::PrimaveraXml::PrimaveraAssignmentsNodeReader;
180 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::BaseDurationPropertyMapper;
181 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::AssignmentDurationPropertyMapper;
182 friend class Aspose::Tasks::IO::Xer::XerRecordValueReader;
187 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::TaskDurationPropertyMapper;
189 friend class Aspose::Tasks::ProjDurValue;
190 friend class Aspose::Tasks::Connectivity::DbTypeConverter;
191 friend class Aspose::Tasks::Connectivity::MpdAssignmentMapper;
192 friend class Aspose::Tasks::Connectivity::MspDbTypeConverter;
193 friend class Aspose::Tasks::Connectivity::MpdTaskMapper;
194 friend class Aspose::Tasks::Connectivity::MspAssignmentMapper;
195 friend class Aspose::Tasks::Connectivity::MspTaskBaseLineMapper;
196 friend class Aspose::Tasks::Connectivity::MspTaskMapper;
197 friend class Aspose::Tasks::Connectivity::PmDbTypeConverter;
198 friend class Aspose::Tasks::IO::Html::HtmlReadingUtils;
199 friend class Aspose::Tasks::IO::Html::HtmlResourceAssignmentTableReader;
200 friend class Aspose::Tasks::IO::Html::HtmlTaskBaseLineTableReader;
201 friend class Aspose::Tasks::IO::Html::HtmlTaskTableReader;
202 friend class Aspose::Tasks::IO::MSProject::CustomFieldTypeReader;
203 friend class Aspose::Tasks::IO::MSProject::ExtendedAttributeValueConverter;
204 template<
typename FT0,
typename FT1>
friend class Aspose::Tasks::IO::MSProject::FieldItem;
205 template<
typename FT0,
typename FT1>
friend class Aspose::Tasks::IO::MSProject::FieldItem;
206 friend class Aspose::Tasks::IO::MSProject::MPP12OutlineCodeDefinitionReader;
207 friend class Aspose::Tasks::IO::MSProject::MPP14OutlineCodeDefinitionReader;
208 friend class Aspose::Tasks::IO::MSProject::MPP14TaskReader;
209 friend class Aspose::Tasks::IO::MSProject::MPP14ResourceAssignmentWriter;
210 friend class Aspose::Tasks::IO::MSProject::MPP9ExtendedAttributeDefinitionReader;
211 friend class Aspose::Tasks::IO::MSProject::MPPRecurringInfoReader;
212 friend class Aspose::Tasks::IO::Mpx::MpxUtils;
213 friend class Aspose::Tasks::IO::Xer::XerAssignmentReader;
214 friend class Aspose::Tasks::IO::Pwa::InternalApi::ExtendedAttributeValueReader;
215 template<
typename FT0>
friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectCoreEntityMapperBase;
216 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::ProjectTasksMapper;
217 friend class Aspose::Tasks::IO::Pwa::InternalApi::Mapping::TaskLinkEntityMapper;
218 friend class Aspose::Tasks::IO::Pwa::InternalApi::PropertyValueReader;
219 friend class Aspose::Tasks::IO::Xml::ExtendedAttributeNodeReader;
220 friend class Aspose::Tasks::IO::Xml::OutlineCodeDefinitionReader;
221 friend class Aspose::Tasks::IO::Xml::ResourceAssignmentNodeReader;
222 friend class Aspose::Tasks::IO::Xml::ResourceAssignmentNodeWriter;
223 friend class Aspose::Tasks::IO::Xml::TaskNodeReader;
224 friend class Aspose::Tasks::IO::Xml::TaskNodeWriter;
226 friend class Aspose::Tasks::ProjectState;
227 friend class Aspose::Tasks::TaskPlannerAssignmentManager;
228 friend class Aspose::Tasks::TaskPlanner;
229 friend class Aspose::Tasks::PercentCompleteCalculator;
230 friend class Aspose::Tasks::ProjectWorkUpdater;
231 friend class Aspose::Tasks::RiskAnalysis::RndDurationAlgorithm;
232 friend class Aspose::Tasks::Rollup::DurationExtendedAttributeComparer;
233 friend class Aspose::Tasks::Saving::MpxSavingUtils;
234 friend class Aspose::Tasks::Saving::MpxWriter;
235 friend class Aspose::Tasks::TimephasedDataMaker;
236 friend class Aspose::Tasks::Util::Fields::RscFieldToValue;
237 friend class Aspose::Tasks::Util::Fields::TaskFieldToValue;
238 friend class Aspose::Tasks::Util::PrimaveraTasksProcessor;
271 static ASPOSE_TASKS_SHARED_API
Duration Parse(
const System::SharedPtr<Project>& p,
const System::String& value);
277 static ASPOSE_TASKS_SHARED_API System::TimeSpan
ParseTimeSpan(
const System::String& value);
324 ASPOSE_TASKS_SHARED_API
bool Equals(System::SharedPtr<System::Object> obj)
override;
337 ASPOSE_TASKS_SHARED_API System::String
ToString()
const override;
341 ASPOSE_TASKS_SHARED_API
double get_TotalMinutes();
342 ASPOSE_TASKS_SHARED_API
bool get_IsZeroDuration();
350 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit);
352 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit));
361 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit,
bool setUndefinedTimeUnit);
363 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit,
bool setUndefinedTimeUnit));
371 ASPOSE_TASKS_SHARED_API
Duration(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit);
373 ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(
Duration, CODEPORTING_ARGS(
const System::SharedPtr<Project>& project,
double d, TimeUnitType timeUnit));
374 ASPOSE_TASKS_SHARED_API System::String ToString(
const System::SharedPtr<System::Globalization::CultureInfo>& cultureInfo);
382 static ASPOSE_TASKS_SHARED_API
Duration Parse(
const System::SharedPtr<Project>& p, System::String value,
const System::SharedPtr<System::IFormatProvider>& formatProvider);
387 ASPOSE_TASKS_SHARED_API int32_t ToInt();
394 static ASPOSE_TASKS_SHARED_API
Duration FromInt(
const System::SharedPtr<Project>& project, int32_t i);
402 static ASPOSE_TASKS_SHARED_API
Duration FromInt(
const System::SharedPtr<Project>& project, int32_t i, TimeUnitType timeUnit);
407 ASPOSE_TASKS_SHARED_API
double ToVariance();
414 static ASPOSE_TASKS_SHARED_API
Duration FromVariance(
const System::SharedPtr<Project>& project,
double variance);
422 static ASPOSE_TASKS_SHARED_API
Duration FromTimeSpan(
const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType type);
423 static ASPOSE_TASKS_SHARED_API
Duration ChangeTimeUnit(
Duration duration, TimeUnitType timeUnit);
424 static ASPOSE_TASKS_SHARED_API
Duration ChangeTimeSpan(
Duration duration, System::TimeSpan timeSpan);
425 static ASPOSE_TASKS_SHARED_API
Duration Add(
Duration duration, System::TimeSpan timeSpan);
426 #ifdef ASPOSE_GET_SHARED_MEMBERS
427 ASPOSE_TASKS_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
433 System::WeakPtr<Project> project;
434 System::TimeSpan pr_TimeSpan;
440 ASPOSE_TASKS_SHARED_API
void set_TimeSpan(System::TimeSpan value);
442 TimeUnitType pr_TimeUnit;
448 ASPOSE_TASKS_SHARED_API
void set_TimeUnit(TimeUnitType value);
450 static System::ArrayPtr<System::String>& DurationLabels();
451 System::String ToString_NonConst();
452 static TimeUnitType GetTimeUnitType(
const System::String& str);
453 static TimeUnitType ParseAsPercent(
const System::String& s);
454 static bool TryParseAsDate(
const System::String& s, TimeUnitType& type);
455 static TimeUnitType SelectWithModifier(
bool isEstimated,
bool isElapsed, TimeUnitType both, TimeUnitType estimated, TimeUnitType elapsed, TimeUnitType withoutModifiers);
456 static System::String GetUnit(System::String s,
bool& isEstimated,
bool& isElapsed);
457 static bool IsMinute(
const System::String& unit);
458 static bool IsHour(
const System::String& unit);
459 static bool IsDay(
const System::String& s);
460 static bool IsWeek(
const System::String& s);
461 static bool IsMonth(
const System::String& unit);
462 static bool IsYear(
const System::String& unit);
463 System::String GetDurationUnit(
const System::String& dur,
const System::String& abbr,
bool addSpaceBeforeLabel)
const;
464 bool GetAddSpaceBeforeLabel();
474 namespace System {
template<>
struct IsBoxable<
Aspose::Tasks::Duration> : std::true_type {}; }
Represents duration in a project.
Definition: Duration.h:163
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:138
Contains resource leveling methods.
Definition: ResourceLeveler.h:46
Represents an outline value.
Definition: OutlineValue.h:79
Represents a project.
Definition: Project.h:552
Represents a resource assignment in a project.
Definition: ResourceAssignment.h:222
Represents a task in a project.
Definition: Task.h:384