Aspose.Tasks for C++
Duration.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="Duration.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 // ReSharper disable StringLiteralTypo
8 
9 #include <system/timespan.h>
10 #include <system/object_ext.h>
11 #include <system/iequatable.h>
12 #include <system/array.h>
13 #include <cstdint>
14 
15 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
16 
17 namespace Aspose
18 {
19 namespace Tasks
20 {
21 namespace Calculations
22 {
23 class ResourceAssignmentCalculator;
24 class ResourceAssignmentPeakCalculator;
25 class TaskEarlyLateDatesCalculator;
26 class TaskProgressCalculator;
27 class TaskStatusCalculator;
28 class TaskWorkCalculator;
29 } // namespace Calculations
30 namespace Connectivity
31 {
32 class DbTypeConverter;
33 class MpdAssignmentMapper;
34 class MpdTaskMapper;
35 class MspAssignmentMapper;
36 class MspDbTypeConverter;
37 class MspTaskBaseLineMapper;
38 class MspTaskMapper;
39 class PmDbTypeConverter;
40 } // namespace Connectivity
41 class ExtendedAttribute;
42 namespace IO
43 {
44 namespace Html
45 {
46 class HtmlReadingUtils;
47 class HtmlResourceAssignmentTableReader;
48 class HtmlTaskBaseLineTableReader;
49 class HtmlTaskTableReader;
50 } // namespace Html
51 namespace Mpx
52 {
53 class MpxUtils;
54 } // namespace Mpx
55 namespace MSProject
56 {
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;
67 } // namespace MSProject
68 namespace PrimaveraXml
69 {
70 class P6XmlUtils;
71 class PrimaveraActivityNodeReader;
72 class PrimaveraAssignmentsNodeReader;
73 } // namespace PrimaveraXml
74 namespace Pwa
75 {
76 namespace InternalApi
77 {
78 class ExtendedAttributeValueReader;
79 namespace Mapping
80 {
81 class AssignmentDurationPropertyMapper;
82 class BaseDurationPropertyMapper;
83 template <typename> class ProjectCoreEntityMapperBase;
84 class ProjectTasksMapper;
85 class TaskDurationPropertyMapper;
86 class TaskLinkEntityMapper;
87 } // namespace Mapping
88 class PropertyValueReader;
89 } // namespace InternalApi
90 } // namespace Pwa
91 namespace Xer
92 {
93 class XerAssignmentReader;
94 class XerRecordValueReader;
95 } // namespace Xer
96 namespace Xml
97 {
98 class ExtendedAttributeNodeReader;
99 class OutlineCodeDefinitionReader;
100 class ResourceAssignmentNodeReader;
101 class ResourceAssignmentNodeWriter;
102 class TaskNodeReader;
103 class TaskNodeWriter;
104 } // namespace Xml
105 } // namespace IO
106 namespace Leveling
107 {
108 class ResourceLeveler;
109 } // namespace Leveling
110 class OutlineValue;
111 class PercentCompleteCalculator;
112 class ProjDurValue;
113 class Project;
114 class ProjectState;
115 class ProjectWorkUpdater;
116 class ResourceAssignment;
117 namespace RiskAnalysis
118 {
119 class RndDurationAlgorithm;
120 } // namespace RiskAnalysis
121 namespace Rollup
122 {
123 class DurationExtendedAttributeComparer;
124 } // namespace Rollup
125 namespace Saving
126 {
127 class MpxSavingUtils;
128 class MpxWriter;
129 } // namespace Saving
130 class Task;
131 class TaskPlanner;
132 class TaskPlannerAssignmentManager;
133 class TimephasedDataMaker;
134 enum class TimeUnitType : int8_t;
135 namespace Util
136 {
137 namespace Fields
138 {
139 class RscFieldToValue;
140 class TaskFieldToValue;
141 } // namespace Fields
142 class PrimaveraTasksProcessor;
143 } // namespace Util
144 } // namespace Tasks
145 } // namespace Aspose
146 namespace System
147 {
148 namespace Globalization
149 {
150 class CultureInfo;
151 } // namespace Globalization
152 class IFormatProvider;
153 } // namespace System
154 
155 namespace Aspose {
156 
157 namespace Tasks {
158 
159 /// <summary>
160 /// Represents duration in a project.
161 /// </summary>
162 class ASPOSE_TASKS_SHARED_CLASS Duration : public System::IEquatable<Aspose::Tasks::Duration>, public System::Details::BoxableObjectBase
163 {
164  typedef Duration ThisType;
165  typedef System::IEquatable<Aspose::Tasks::Duration> BaseType;
166 
167  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
168  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
169 
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;
184  friend class Aspose::Tasks::Project;
186  friend class Aspose::Tasks::Task;
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;
225  friend class Aspose::Tasks::OutlineValue;
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;
239  friend ASPOSE_TASKS_SHARED_API bool operator ==(Duration a, Duration b);
240  friend ASPOSE_TASKS_SHARED_API bool operator !=(Duration a, Duration b);
241 
242 public:
243 
244  /// <summary>
245  /// Gets <see cref="TimeSpan"></see> instance of this Duration object.
246  /// <value>The TimeSpan instance of this Duration object.</value>
247  /// </summary>
248  ASPOSE_TASKS_SHARED_API System::TimeSpan get_TimeSpan() const;
249  /// <summary>
250  /// Gets time unit type for this object.
251  /// <value>The time unit type of this Duration instance.</value>
252  /// </summary>
253  ASPOSE_TASKS_SHARED_API TimeUnitType get_TimeUnit() const;
254  /// <summary>
255  /// Gets a value indicating whether time unit is estimated.
256  /// <value>The flag which determines whether this Duration instance is estimated.</value>
257  /// </summary>
258  ASPOSE_TASKS_SHARED_API bool get_IsEstimated() const;
259  /// <summary>
260  /// Gets a value indicating whether time unit is elapsed.
261  /// <value>The flag which determines whether this Duration instance is elapsed.</value>
262  /// </summary>
263  ASPOSE_TASKS_SHARED_API bool get_IsElapsed() const;
264 
265  /// <summary>
266  /// Converts the specified string to the instance of <see cref="Duration"></see> struct.
267  /// </summary>
268  /// <param name="p">the specified instance of <see cref="Project"></see> class to convert duration for.</param>
269  /// <param name="value">the specified string to convert.</param>
270  /// <returns>Returns the converted instance of <see cref="Duration"></see> struct.</returns>
271  static ASPOSE_TASKS_SHARED_API Duration Parse(const System::SharedPtr<Project>& p, const System::String& value);
272  /// <summary>
273  /// Parses duration string in format "PT--H--M--S--".
274  /// </summary>
275  /// <param name="value">the specified string to parse.</param>
276  /// <returns>returns parsed instance of the <see cref="TimeSpan"></see> struct.</returns>
277  static ASPOSE_TASKS_SHARED_API System::TimeSpan ParseTimeSpan(const System::String& value);
278  /// <summary>
279  /// Converts Duration object to <see cref="double"></see> value.
280  /// </summary>
281  /// <returns>Converted value.</returns>
282  ASPOSE_TASKS_SHARED_API double ToDouble();
283  /// <summary>
284  /// Converts Duration object to another duration with specified time units.
285  /// </summary>
286  /// <param name="timeUnitType">the specified time unit type.</param>
287  /// <returns>returns new duration with the specified unit type.</returns>
288  ASPOSE_TASKS_SHARED_API Duration Convert(TimeUnitType timeUnitType);
289  /// <summary>
290  /// Adds specified duration to this duration.
291  /// </summary>
292  /// <param name="d">specified <see cref="Duration"></see> to add to this instance.</param>
293  /// <returns>New duration object that represents the value of this instance plus the specified duration value.</returns>
294  ASPOSE_TASKS_SHARED_API Duration Add(Duration d);
295  /// <summary>
296  /// Adds specified double value to this duration.
297  /// </summary>
298  /// <param name="val">the specified <see cref="double"></see> value to add to this instance.</param>
299  /// <returns>New duration object that represents the value of this instance plus the specified duration value.</returns>
300  ASPOSE_TASKS_SHARED_API Duration Add(double val);
301  /// <summary>
302  /// Subtracts specified duration from this duration instance.
303  /// </summary>
304  /// <param name="d">the specified <see cref="Duration"></see> instance to subtract from this instance.</param>
305  /// <returns>New duration object that represents the value of this instance minus the specified duration value.</returns>
306  ASPOSE_TASKS_SHARED_API Duration Subtract(Duration d);
307  /// <summary>
308  /// Subtracts specified double value from this duration instance.
309  /// </summary>
310  /// <param name="val">specified <see cref="double"></see> value to subtract from this instance.</param>
311  /// <returns>New duration object that represents the value of this instance minus the specified duration value.</returns>
312  ASPOSE_TASKS_SHARED_API Duration Subtract(double val);
313  /// <summary>
314  /// Returns a value indicating whether this instance is equal to a specified object.
315  /// </summary>
316  /// <param name="other">The object to compare with this instance.</param>
317  /// <returns>Returns <b>True</b> if other Duration instance has the same TimeSpan and TimeUnit values as this instance; otherwise, <b>false</b>.</returns>
318  ASPOSE_TASKS_SHARED_API bool Equals(Duration other) override;
319  /// <summary>
320  /// Returns a value indicating whether this instance is equal to a specified object.
321  /// </summary>
322  /// <param name="obj">The object to compare with this instance.</param>
323  /// <returns><b>True</b> if the specified object is a Duration that has the same TimeSpan and TimeUnit values as this instance; otherwise, <b>false</b>.</returns>
324  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
325  /// <summary>
326  /// Returns a hash code value for this object.
327  /// </summary>
328  /// <returns>returns a hash code value for this duration instance.</returns>
329  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
330 
331  ASPOSE_TASKS_SHARED_API Duration();
332 
333  /// <summary>
334  /// Returns a string representation of this instance.
335  /// </summary>
336  /// <returns>a string representation of this instance.</returns>
337  ASPOSE_TASKS_SHARED_API System::String ToString() const override;
338 
339 protected:
340 
341  ASPOSE_TASKS_SHARED_API double get_TotalMinutes();
342  ASPOSE_TASKS_SHARED_API bool get_IsZeroDuration();
343 
344  /// <summary>
345  /// Initializes a new instance of the <see cref="Duration"></see> struct with a specified TimeSpan value and TimeUnitType.
346  /// </summary>
347  /// <param name="project">the specified instance of the <see cref="Project"></see> to get settings from.</param>
348  /// <param name="timeSpan">the specified <see cref="TimeSpan"></see></param>
349  /// <param name="timeUnit">the specified <see cref="TimeUnit"></see></param>
350  ASPOSE_TASKS_SHARED_API Duration(const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit);
351 
352  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Duration, CODEPORTING_ARGS(const System::SharedPtr<Project>& project, System::TimeSpan timeSpan, TimeUnitType timeUnit));
353 
354  /// <summary>
355  /// Initializes a new instance of the <see cref="Duration"></see> struct with a specified double value and TimeUnitType.
356  /// </summary>
357  /// <param name="project">the specified instance of the <see cref="Project"></see> to get settings from.</param>
358  /// <param name="d">the specified double value.</param>
359  /// <param name="timeUnit">the specified <see cref="TimeUnit"></see></param>
360  /// <param name="setUndefinedTimeUnit">The flag to set undefined value.</param>
361  ASPOSE_TASKS_SHARED_API Duration(const System::SharedPtr<Project>& project, double d, TimeUnitType timeUnit, bool setUndefinedTimeUnit);
362 
363  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Duration, CODEPORTING_ARGS(const System::SharedPtr<Project>& project, double d, TimeUnitType timeUnit, bool setUndefinedTimeUnit));
364 
365  /// <summary>
366  /// Initializes a new instance of the <see cref="Duration"></see> struct with a specified double value and TimeUnitType.
367  /// </summary>
368  /// <param name="project">the specified instance of the <see cref="Project"></see> to get settings from.</param>
369  /// <param name="d">the specified double value.</param>
370  /// <param name="timeUnit">the specified <see cref="TimeUnit"></see></param>
371  ASPOSE_TASKS_SHARED_API Duration(const System::SharedPtr<Project>& project, double d, TimeUnitType timeUnit);
372 
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);
375  /// <summary>
376  /// Converts the specified string to the instance of <see cref="Duration"></see> struct.
377  /// </summary>
378  /// <param name="p">the specified instance of <see cref="Project"></see> class to convert duration for.</param>
379  /// <param name="value">the specified string to convert.</param>
380  /// <param name="formatProvider">An object that supplies culture-specific formatting information about <paramref name="value"></paramref>.</param>
381  /// <returns>Returns the converted instance of <see cref="Duration"></see> struct.</returns>
382  static ASPOSE_TASKS_SHARED_API Duration Parse(const System::SharedPtr<Project>& p, System::String value, const System::SharedPtr<System::IFormatProvider>& formatProvider);
383  /// <summary>
384  /// Returns total minutes multiplied by 10.
385  /// </summary>
386  /// <returns>Total minutes multiplied by 10.</returns>
387  ASPOSE_TASKS_SHARED_API int32_t ToInt();
388  /// <summary>
389  /// Converts integer value to duration instance and returns converted duration instance.
390  /// </summary>
391  /// <param name="project">the specified project.</param>
392  /// <param name="i">the specified integer value.</param>
393  /// <returns>returns converted duration instance.</returns>
394  static ASPOSE_TASKS_SHARED_API Duration FromInt(const System::SharedPtr<Project>& project, int32_t i);
395  /// <summary>
396  /// Converts integer value to duration instance with the specified time units.
397  /// </summary>
398  /// <param name="project">the specified project.</param>
399  /// <param name="i">the specified integer value.</param>
400  /// <param name="timeUnit">the specified time unit type.</param>
401  /// <returns>returns converted duration instance.</returns>
402  static ASPOSE_TASKS_SHARED_API Duration FromInt(const System::SharedPtr<Project>& project, int32_t i, TimeUnitType timeUnit);
403  /// <summary>
404  /// Returns this instance as variance.
405  /// </summary>
406  /// <returns>returns this instance as variance.</returns>
407  ASPOSE_TASKS_SHARED_API double ToVariance();
408  /// <summary>
409  /// Converts variance to duration instance.
410  /// </summary>
411  /// <param name="project">the specified project.</param>
412  /// <param name="variance">the specified variance.</param>
413  /// <returns>returns duration instance which was converted from variance.</returns>
414  static ASPOSE_TASKS_SHARED_API Duration FromVariance(const System::SharedPtr<Project>& project, double variance);
415  /// <summary>
416  /// Converts TimeSpan instance to duration instance with day time units.
417  /// </summary>
418  /// <param name="project">the specified project for the instance of the <see cref="Duration"></see> class.</param>
419  /// <param name="timeSpan">the specified TimeSpan instance.</param>
420  /// <param name="type">the specified TimeUnitType instance.</param>
421  /// <returns>returns converted duration instance with day time units.</returns>
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;
428  #endif
429 
430 
431 private:
432 
433  System::WeakPtr<Project> project;
434  System::TimeSpan pr_TimeSpan;
435 
436  /// <summary>
437  /// Gets <see cref="TimeSpan"></see> instance of this Duration object.
438  /// <value>The TimeSpan instance of this Duration object.</value>
439  /// </summary>
440  ASPOSE_TASKS_SHARED_API void set_TimeSpan(System::TimeSpan value);
441 
442  TimeUnitType pr_TimeUnit;
443 
444  /// <summary>
445  /// Gets time unit type for this object.
446  /// <value>The time unit type of this Duration instance.</value>
447  /// </summary>
448  ASPOSE_TASKS_SHARED_API void set_TimeUnit(TimeUnitType value);
449 
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();
465 
466 };
467 
468 ASPOSE_TASKS_SHARED_API bool operator ==(Duration a, Duration b);
469 ASPOSE_TASKS_SHARED_API bool operator !=(Duration a, Duration b);
470 
471 } // namespace Tasks
472 } // namespace Aspose
473 
474 namespace System { template<> struct IsBoxable<Aspose::Tasks::Duration> : std::true_type {}; }
475 
476 
477 
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:551
Represents a resource assignment in a project.
Definition: ResourceAssignment.h:219
Represents a task in a project.
Definition: Task.h:383
Definition: Asn.h:13