Aspose.Tasks for C++
TaskBaseline.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="TaskBaseline.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/shared_ptr.h>
9 #include <system/iequatable.h>
10 #include <system/icomparable.h>
11 #include <system/details/pointer_collection_helpers.h>
12 #include <system/date_time.h>
13 
14 #include "aspose.tasks.cpp/NullableBool.h"
15 #include "aspose.tasks.cpp/Duration.h"
16 #include "aspose.tasks.cpp/Baseline.h"
17 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
18 
19 namespace Aspose
20 {
21 namespace Tasks
22 {
23 namespace Connectivity
24 {
25 class MpdTaskBaselineMapper;
26 } // namespace Connectivity
27 namespace IO
28 {
29 namespace Xml
30 {
31 class TaskBaselineNodeReader;
32 class TaskBaselineNodeWriter;
33 } // namespace Xml
34 } // namespace IO
35 class Task;
36 class TaskBaselineCollection;
37 class TimephasedDataCollection;
38 } // namespace Tasks
39 } // namespace Aspose
40 namespace System
41 {
42 template <typename> class WeakPtr;
43 } // namespace System
44 
45 namespace Aspose {
46 
47 namespace Tasks {
48 
49 /// <summary>
50 /// Represents Baseline of a Task.
51 /// </summary>
52 class ASPOSE_TASKS_SHARED_CLASS TaskBaseline final : public Aspose::Tasks::Baseline, public System::IComparable<System::SharedPtr<Aspose::Tasks::TaskBaseline>>, public System::IEquatable<System::SharedPtr<Aspose::Tasks::TaskBaseline>>
53 {
54  typedef TaskBaseline ThisType;
55  typedef Aspose::Tasks::Baseline BaseType;
56  typedef System::IComparable<System::SharedPtr<Aspose::Tasks::TaskBaseline>> BaseType1;
57  typedef System::IEquatable<System::SharedPtr<Aspose::Tasks::TaskBaseline>> BaseType2;
58 
59  typedef ::System::BaseTypesInfo<BaseType, BaseType1, BaseType2> ThisTypeBaseTypesInfo;
60  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
61 
62  friend class Aspose::Tasks::Connectivity::MpdTaskBaselineMapper;
63  friend class Aspose::Tasks::IO::Xml::TaskBaselineNodeReader;
64  friend class Aspose::Tasks::IO::Xml::TaskBaselineNodeWriter;
66 
67 public:
68 
69  /// <summary>
70  /// Gets a TimephasedDataCollection instance for this object.
71  /// The time phased data associated with the task baseline.
72  /// </summary>
73  ASPOSE_TASKS_SHARED_API System::SharedPtr<TimephasedDataCollection> get_TimephasedData();
74  /// <summary>
75  /// Sets a TimephasedDataCollection instance for this object.
76  /// The time phased data associated with the task baseline.
77  /// </summary>
78  ASPOSE_TASKS_SHARED_API void set_TimephasedData(const System::SharedPtr<TimephasedDataCollection>& value);
79  /// <summary>
80  /// Gets a value indicating whether this is an Interim Baseline.
81  /// </summary>
82  ASPOSE_TASKS_SHARED_API bool get_Interim();
83  /// <summary>
84  /// Sets a value indicating whether this is an Interim Baseline.
85  /// </summary>
86  ASPOSE_TASKS_SHARED_API void set_Interim(bool value);
87  /// <summary>
88  /// Gets the scheduled start date of the task when the baseline was saved.
89  /// </summary>
90  ASPOSE_TASKS_SHARED_API System::DateTime get_Start() const;
91  /// <summary>
92  /// Sets the scheduled start date of the task when the baseline was saved.
93  /// </summary>
94  ASPOSE_TASKS_SHARED_API void set_Start(System::DateTime value);
95  /// <summary>
96  /// Gets the scheduled finish date of the task when the baseline was saved.
97  /// </summary>
98  ASPOSE_TASKS_SHARED_API System::DateTime get_Finish() const;
99  /// <summary>
100  /// Sets the scheduled finish date of the task when the baseline was saved.
101  /// </summary>
102  ASPOSE_TASKS_SHARED_API void set_Finish(System::DateTime value);
103  /// <summary>
104  /// Gets the scheduled duration of the task when the baseline was saved.
105  /// </summary>
106  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Duration get_Duration() const;
107  /// <summary>
108  /// Sets the scheduled duration of the task when the baseline was saved.
109  /// </summary>
110  ASPOSE_TASKS_SHARED_API void set_Duration(Aspose::Tasks::Duration value);
111  /// <summary>
112  /// Gets a value indicating whether the baseline duration of the task was estimated.
113  /// </summary>
114  ASPOSE_TASKS_SHARED_API bool get_EstimatedDuration();
115  /// <summary>
116  /// Sets a value indicating whether the baseline duration of the task was estimated.
117  /// </summary>
118  ASPOSE_TASKS_SHARED_API void set_EstimatedDuration(bool value);
119  /// <summary>
120  /// Gets a fixed cost of the task when the baseline was saved.
121  /// </summary>
122  ASPOSE_TASKS_SHARED_API double get_FixedCost() const;
123  /// <summary>
124  /// Sets a fixed cost of the task when the baseline was saved.
125  /// </summary>
126  ASPOSE_TASKS_SHARED_API void set_FixedCost(double value);
127 
128  /// <summary>
129  /// Initializes a new instance of the <see cref="TaskBaseline"></see> class.
130  /// </summary>
131  /// <param name="task">Baseline's parent task.</param>
132  ASPOSE_TASKS_SHARED_API TaskBaseline(const System::SharedPtr<Aspose::Tasks::Task>& task);
133 
134  /// <summary>
135  /// IComparable interface implementation.
136  /// Compares this instance to the specified Baseline object.
137  /// </summary>
138  /// <param name="other"> the specified Baseline object to compare this instance to.</param>
139  /// <returns>returns -1 if this instance is less than the specified object, 1 if this instance is greater than the specified object; otherwise returns 0</returns>
140  ASPOSE_TASKS_SHARED_API int32_t CompareTo(System::SharedPtr<TaskBaseline> other) override;
141  /// <summary>
142  /// Returns a value indicating whether this instance is equal to the specified TaskBaseline object.
143  /// </summary>
144  /// <param name="other">the specified AssignmentBaseline object to compare with this instance.</param>
145  /// <returns>returns true if this instance is equal to the specified TaskBaseline object; otherwise, false.</returns>
146  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<TaskBaseline> other) override;
147  /// <summary>
148  /// Returns a value indicating whether this instance is equal to a specified object.
149  /// </summary>
150  /// <param name="obj">The object to compare with this instance.</param>
151  /// <returns><b>True</b> if the specified object is a TaskBaseline that has the same UID value as this instance; otherwise, <b>false</b>.</returns>
152  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
153  /// <summary>
154  /// Returns a hash code value for the instance of the <see cref="TaskBaseline"></see> class.
155  /// </summary>
156  /// <returns>returns a hash code value for this object.</returns>
157  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
158  ASPOSE_TASKS_SHARED_API void SetTemplateWeakPtr(uint32_t argument) override;
159 
160 protected:
161 
162  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Aspose::Tasks::Task>& get_Task() const;
163  ASPOSE_TASKS_SHARED_API NullableBool get_NullableInterim() const;
164  ASPOSE_TASKS_SHARED_API void set_NullableInterim(NullableBool value);
165  ASPOSE_TASKS_SHARED_API NullableBool get_NullableEstimatedDuration() const;
166  ASPOSE_TASKS_SHARED_API void set_NullableEstimatedDuration(NullableBool value);
167 
168  #ifdef ASPOSE_GET_SHARED_MEMBERS
169  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
170  #endif
171 
172 
173 private:
174 
175  System::SharedPtr<TimephasedDataCollection> timephasedData;
176  System::DateTime pr_Start;
177  System::DateTime pr_Finish;
178  Aspose::Tasks::Duration pr_Duration;
179  double pr_FixedCost;
180  System::WeakPtr<Aspose::Tasks::Task> pr_Task;
181 
182  ASPOSE_TASKS_SHARED_API void set_Task(const System::SharedPtr<Aspose::Tasks::Task>& value);
183 
184  NullableBool pr_NullableInterim;
185  NullableBool pr_NullableEstimatedDuration;
186 
187 };
188 
189 } // namespace Tasks
190 } // namespace Aspose
191 
192 
Represents baseline values of a resource.
Definition: Baseline.h:53
Represents duration in a project.
Definition: Duration.h:163
A class for boolean values with possibility to check whether the value was defined or not.
Definition: NullableBool.h:22
Represents a collection of TaskBaseline objects.
Definition: TaskBaselineCollection.h:100
Represents Baseline of a Task.
Definition: TaskBaseline.h:53
bool get_EstimatedDuration()
Gets a value indicating whether the baseline duration of the task was estimated.
bool get_Interim()
Gets a value indicating whether this is an Interim Baseline.
void set_Finish(System::DateTime value)
Sets the scheduled finish date of the task when the baseline was saved.
bool Equals(System::SharedPtr< TaskBaseline > other) override
Returns a value indicating whether this instance is equal to the specified TaskBaseline object.
int32_t GetHashCode() const override
Returns a hash code value for the instance of the TaskBaseline class.
System::DateTime get_Finish() const
Gets the scheduled finish date of the task when the baseline was saved.
TaskBaseline(const System::SharedPtr< Aspose::Tasks::Task > &task)
Initializes a new instance of the TaskBaseline class.
System::DateTime get_Start() const
Gets the scheduled start date of the task when the baseline was saved.
void set_Start(System::DateTime value)
Sets the scheduled start date of the task when the baseline was saved.
bool Equals(System::SharedPtr< System::Object > obj) override
Returns a value indicating whether this instance is equal to a specified object.
void set_EstimatedDuration(bool value)
Sets a value indicating whether the baseline duration of the task was estimated.
double get_FixedCost() const
Gets a fixed cost of the task when the baseline was saved.
void set_Interim(bool value)
Sets a value indicating whether this is an Interim Baseline.
void set_FixedCost(double value)
Sets a fixed cost of the task when the baseline was saved.
Aspose::Tasks::Duration get_Duration() const
Gets the scheduled duration of the task when the baseline was saved.
int32_t CompareTo(System::SharedPtr< TaskBaseline > other) override
IComparable interface implementation. Compares this instance to the specified Baseline object.
void set_TimephasedData(const System::SharedPtr< TimephasedDataCollection > &value)
Sets a TimephasedDataCollection instance for this object. The time phased data associated with the ta...
void set_Duration(Aspose::Tasks::Duration value)
Sets the scheduled duration of the task when the baseline was saved.
System::SharedPtr< TimephasedDataCollection > get_TimephasedData()
Gets a TimephasedDataCollection instance for this object. The time phased data associated with the ta...
Definition: Asn.h:13