Aspose.Tasks for C++
SplitPart.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="SplitPart.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/object.h>
9 #include <system/date_time.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
13 
14 namespace Aspose
15 {
16 namespace Tasks
17 {
18 class Calendar;
19 class CalendarDatesCalculator;
20 class DatesCalculator;
21 class SplitPartCollection;
22 class SplitPartComparer;
23 class SplitsCalculator;
24 class Task;
25 namespace Visualization
26 {
27 class GanttPageTaskBarBuilder;
28 } // namespace Visualization
29 } // namespace Tasks
30 } // namespace Aspose
31 namespace System
32 {
33 class String;
34 class TimeSpan;
35 } // namespace System
36 
37 namespace Aspose {
38 
39 namespace Tasks {
40 
41 /// <summary>
42 /// Represents a task portion. The SplitPart is a member of the task's SplitParts collection.
43 /// </summary>
44 class ASPOSE_TASKS_SHARED_CLASS SplitPart : public System::Object
45 {
46  typedef SplitPart ThisType;
47  typedef System::Object BaseType;
48 
49  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
50  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
51 
52  friend class Aspose::Tasks::Task;
53  friend class Aspose::Tasks::SplitPartComparer;
54  friend class Aspose::Tasks::Visualization::GanttPageTaskBarBuilder;
55  friend class Aspose::Tasks::CalendarDatesCalculator;
56  friend class Aspose::Tasks::DatesCalculator;
57  friend class Aspose::Tasks::SplitsCalculator;
59 
60 public:
61 
62  /// <summary>
63  /// Gets the start date of a SplitPart.
64  /// </summary>
65  ASPOSE_TASKS_SHARED_API System::DateTime get_Start() const;
66  /// <summary>
67  /// Gets the finish date of a SplitPart.
68  /// </summary>
69  ASPOSE_TASKS_SHARED_API System::DateTime get_Finish() const;
70 
71  /// <summary>
72  /// Compares two split parts.
73  /// </summary>
74  /// <param name="obj">Object to compare.</param>
75  /// <returns>True if the specified object is equal to the current object; otherwise, false.</returns>
76  ASPOSE_TASKS_SHARED_API bool Equals(System::SharedPtr<System::Object> obj) override;
77  /// <summary>
78  /// Returns a hash code value for the instance of the <see cref="SplitPart"></see> class.
79  /// </summary>
80  /// <returns>returns a hash code value for this object.</returns>
81  ASPOSE_TASKS_SHARED_API int32_t GetHashCode() const override;
82 
83 protected:
84 
85  /// <summary>
86  /// Gets the start date of a SplitPart.
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API void set_Start(System::DateTime value);
89  /// <summary>
90  /// Gets the finish date of a SplitPart.
91  /// </summary>
92  ASPOSE_TASKS_SHARED_API void set_Finish(System::DateTime value);
93  ASPOSE_TASKS_SHARED_API bool get_IsEmpty();
94 
95  ASPOSE_TASKS_SHARED_API SplitPart(System::DateTime start, System::DateTime finish);
96 
97  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(SplitPart, CODEPORTING_ARGS(System::DateTime start, System::DateTime finish));
98  ASPOSE_TASKS_SHARED_API System::TimeSpan GetWork(const System::SharedPtr<Calendar>& calendar1, const System::SharedPtr<Calendar>& calendar2);
99 
100  virtual ASPOSE_TASKS_SHARED_API ~SplitPart();
101 
102  #ifdef ASPOSE_GET_SHARED_MEMBERS
103  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
104  #endif
105 
106 
107 private:
108 
109  System::DateTime pr_Start;
110  System::DateTime pr_Finish;
111 
112  System::String get_DebuggerDisplay();
113 
114 };
115 
116 } // namespace Tasks
117 } // namespace Aspose
118 
119 
Collection that represents the portions of a task.
Definition: SplitPartCollection.h:51
Represents a task portion. The SplitPart is a member of the task's SplitParts collection.
Definition: SplitPart.h:45
System::DateTime get_Finish() const
Gets the finish date of a SplitPart.
System::DateTime get_Start() const
Gets the start date of a SplitPart.
bool Equals(System::SharedPtr< System::Object > obj) override
Compares two split parts.
int32_t GetHashCode() const override
Returns a hash code value for the instance of the SplitPart class.
Represents a task in a project.
Definition: Task.h:384
Definition: Asn.h:13