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