Aspose.Tasks for C++
Baseline.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="Baseline.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/iequatable.h>
9 #include <system/icomparable.h>
10 #include <system/decimal.h>
11 #include <system/array.h>
12 #include <cstdint>
13 
14 #include "aspose.tasks.cpp/Duration.h"
15 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
16 
17 namespace Aspose
18 {
19 namespace Tasks
20 {
21 class AssignmentBaseline;
22 enum class BaselineType;
23 class Duration;
24 class EvaluationModeDatesResetter;
25 class EVCalculator;
26 namespace IO
27 {
28 namespace MSProject
29 {
30 class MPPResourceWriter;
31 class MPPTaskReader;
32 } // namespace MSProject
33 } // namespace IO
34 class Resource;
35 class TaskBaseline;
36 class TimeScaledParentCostUnit;
37 class TimeScaledParentWorkUnit;
38 namespace Util
39 {
40 class BaselineHelper;
41 } // namespace Util
42 } // namespace Tasks
43 } // namespace Aspose
44 
45 namespace Aspose {
46 
47 namespace Tasks {
48 
49 /// <summary>
50 /// Represents baseline values of a resource.
51 /// </summary>
52 class ASPOSE_TASKS_SHARED_CLASS Baseline : public virtual System::IComparable<System::SharedPtr<Aspose::Tasks::Baseline>>, public virtual System::IEquatable<System::SharedPtr<Aspose::Tasks::Baseline>>
53 {
54  typedef Baseline ThisType;
55  typedef System::IComparable<System::SharedPtr<Aspose::Tasks::Baseline>> BaseType;
56  typedef System::IEquatable<System::SharedPtr<Aspose::Tasks::Baseline>> BaseType1;
57 
58  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
59  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
60 
62  friend class Aspose::Tasks::Resource;
63  friend class Aspose::Tasks::Util::BaselineHelper;
64  friend class Aspose::Tasks::EVCalculator;
65  friend class Aspose::Tasks::IO::MSProject::MPPTaskReader;
66  friend class Aspose::Tasks::IO::MSProject::MPPResourceWriter;
67  friend class Aspose::Tasks::EvaluationModeDatesResetter;
68  friend class Aspose::Tasks::TaskBaseline;
69  friend ASPOSE_TASKS_SHARED_API bool operator ==(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
70  friend ASPOSE_TASKS_SHARED_API bool operator !=(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
71  friend ASPOSE_TASKS_SHARED_API bool operator <(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
72  friend ASPOSE_TASKS_SHARED_API bool operator >(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
73  friend ASPOSE_TASKS_SHARED_API bool operator >=(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
74  friend ASPOSE_TASKS_SHARED_API bool operator <=(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
75 
76 public:
77 
78  /// <summary>
79  /// Gets the unique number of a baseline data record.
80  /// </summary>
81  ASPOSE_TASKS_SHARED_API BaselineType get_BaselineNumber() const;
82  /// <summary>
83  /// Sets the unique number of a baseline data record.
84  /// </summary>
85  ASPOSE_TASKS_SHARED_API void set_BaselineNumber(BaselineType value);
86  /// <summary>
87  /// Gets the work assigned to a resource when the baseline is saved.
88  /// <value>The amount of assigned work to a resource when the baseline was saved.</value>
89  /// </summary>
90  ASPOSE_TASKS_SHARED_API Duration get_Work() const;
91  /// <summary>
92  /// Sets the work assigned to a resource when the baseline is saved.
93  /// <value>The amount of assigned work to a resource when the baseline was saved.</value>
94  /// </summary>
95  ASPOSE_TASKS_SHARED_API void set_Work(Duration value);
96  /// <summary>
97  /// Gets the projected cost of a resource when the baseline is saved.
98  /// </summary>
99  ASPOSE_TASKS_SHARED_API System::Decimal get_Cost() const;
100  /// <summary>
101  /// Sets the projected cost of a resource when the baseline is saved.
102  /// </summary>
103  ASPOSE_TASKS_SHARED_API void set_Cost(System::Decimal value);
104  /// <summary>
105  /// Gets the budget cost of a work scheduled for a resource.
106  /// </summary>
107  ASPOSE_TASKS_SHARED_API double get_Bcws() const;
108  /// <summary>
109  /// Sets the budget cost of a work scheduled for a resource.
110  /// </summary>
111  ASPOSE_TASKS_SHARED_API void set_Bcws(double value);
112  /// <summary>
113  /// Gets the budgeted cost of a work performed by a resource for a project to-date.
114  /// </summary>
115  ASPOSE_TASKS_SHARED_API double get_Bcwp() const;
116  /// <summary>
117  /// Sets the budgeted cost of a work performed by a resource for a project to-date.
118  /// </summary>
119  ASPOSE_TASKS_SHARED_API void set_Bcwp(double value);
120 
121  /// <summary>
122  /// Returns a value indicating whether this instance is equal to a specified object.
123  /// </summary>
124  /// <param name="other">the specified object to compare with this instance.</param>
125  /// <returns>returns true if this instance is equal to the specified object; otherwise, false.</returns>
126  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<Baseline> other) override;
127  /// <summary>
128  /// Returns a value indicating whether this instance is equal to a specified object.
129  /// </summary>
130  /// <param name="obj">the specified object to compare with this instance.</param>
131  /// <returns>returns true if this instance is equal to the specified object; otherwise, false.</returns>
132  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
133  /// <summary>
134  /// Returns a hash code value for the baseline.
135  /// </summary>
136  /// <returns>returns a hash code value for this object.</returns>
137  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
138  /// <summary>
139  /// IComparable interface implementation.
140  /// Compares this instance to the specified Baseline object.
141  /// </summary>
142  /// <param name="other"> the specified Baseline object to compare this instance to.</param>
143  /// <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>
144  ASPOSE_TASKS_SHARED_API int32_t CompareTo(System::SharedPtr<Baseline> other) override;
145 
146  ASPOSE_TASKS_SHARED_API Baseline();
147 
148 protected:
149 
150  ASPOSE_TASKS_SHARED_API const System::SharedPtr<TimeScaledParentCostUnit>& get_ScaledCost() const;
151  ASPOSE_TASKS_SHARED_API void set_ScaledCost(const System::SharedPtr<TimeScaledParentCostUnit>& value);
152  ASPOSE_TASKS_SHARED_API const System::SharedPtr<TimeScaledParentWorkUnit>& get_ScaledWork() const;
153  ASPOSE_TASKS_SHARED_API void set_ScaledWork(const System::SharedPtr<TimeScaledParentWorkUnit>& value);
154  ASPOSE_TASKS_SHARED_API const System::ArrayPtr<uint8_t>& get_WorkRawTD() const;
155  ASPOSE_TASKS_SHARED_API void set_WorkRawTD(const System::ArrayPtr<uint8_t>& value);
156  ASPOSE_TASKS_SHARED_API const System::ArrayPtr<uint8_t>& get_CostRawTD() const;
157  ASPOSE_TASKS_SHARED_API void set_CostRawTD(const System::ArrayPtr<uint8_t>& value);
158 
159  ASPOSE_TASKS_SHARED_API void CalculateTimeScaledData();
160 
161  virtual ASPOSE_TASKS_SHARED_API ~Baseline();
162 
163  #ifdef ASPOSE_GET_SHARED_MEMBERS
164  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
165  #endif
166 
167 
168 private:
169 
170  BaselineType pr_BaselineNumber;
171  Duration pr_Work;
172  System::Decimal pr_Cost;
173  double pr_Bcws;
174  double pr_Bcwp;
175  System::SharedPtr<TimeScaledParentCostUnit> pr_ScaledCost;
176  System::SharedPtr<TimeScaledParentWorkUnit> pr_ScaledWork;
177  System::ArrayPtr<uint8_t> pr_WorkRawTD;
178  System::ArrayPtr<uint8_t> pr_CostRawTD;
179 
180  System::String get_DebuggerDisplay();
181 
182 };
183 
184 ASPOSE_TASKS_SHARED_API bool operator ==(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
185 ASPOSE_TASKS_SHARED_API bool operator !=(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
186 ASPOSE_TASKS_SHARED_API bool operator <(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
187 ASPOSE_TASKS_SHARED_API bool operator >(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
188 ASPOSE_TASKS_SHARED_API bool operator >=(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
189 ASPOSE_TASKS_SHARED_API bool operator <=(const System::SharedPtr<Baseline>& a, const System::SharedPtr<Baseline>& b);
190 
191 } // namespace Tasks
192 } // namespace Aspose
193 
194 
int32_t GetHashCode() const override
Returns a hash code value for the instance of the TaskBaseline class.
Represents Baseline of a Task.
Definition: TaskBaseline.h:52
void set_BaselineNumber(BaselineType value)
Sets the unique number of a baseline data record.
Represents Baseline of a resource assignment.
Definition: AssignmentBaseline.h:83
double get_Bcws() const
Gets the budget cost of a work scheduled for a resource.
void set_Bcws(double value)
Sets the budget cost of a work scheduled for a resource.
void set_Bcwp(double value)
Sets the budgeted cost of a work performed by a resource for a project to-date.
Represents duration in a project.
Definition: Duration.h:162
int32_t CompareTo(System::SharedPtr< TaskBaseline > other) override
IComparable interface implementation. Compares this instance to the specified Baseline object...
void set_Cost(System::Decimal value)
Sets the projected cost of a resource when the baseline is saved.
System::Decimal get_Cost() const
Gets the projected cost of a resource when the baseline is saved.
void set_Work(Duration value)
Sets the work assigned to a resource when the baseline is saved. The amount of assigned work to a res...
Represents baseline values of a resource.
Definition: Baseline.h:52
Duration get_Work() const
Gets the work assigned to a resource when the baseline is saved. The amount of assigned work to a res...
BaselineType get_BaselineNumber() const
Gets the unique number of a baseline data record.
bool Equals(System::SharedPtr< TaskBaseline > other) override
Returns a value indicating whether this instance is equal to the specified TaskBaseline object...
double get_Bcwp() const
Gets the budgeted cost of a work performed by a resource for a project to-date.
Represents a resource in a project.
Definition: Resource.h:206