Aspose.Tasks for C++
WorkUnit.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="WorkUnit.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/timespan.h>
9 #include <system/object.h>
10 #include <system/date_time.h>
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 TimephasedDataMaker;
20 } // namespace Tasks
21 } // namespace Aspose
22 namespace System
23 {
24 class String;
25 } // namespace System
26 
27 namespace Aspose {
28 
29 namespace Tasks {
30 
31 /// <summary>
32 /// Represents working hours.
33 /// </summary>
34 class ASPOSE_TASKS_SHARED_CLASS WorkUnit : public System::Object
35 {
36  typedef WorkUnit ThisType;
37  typedef System::Object BaseType;
38 
39  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
40  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
41 
42  friend class Aspose::Tasks::Calendar;
43  friend class Aspose::Tasks::TimephasedDataMaker;
44 
45 public:
46 
47  /// <summary>
48  /// Gets the From date.
49  /// </summary>
50  ASPOSE_TASKS_SHARED_API System::DateTime get_From() const;
51  /// <summary>
52  /// Sets the From date.
53  /// </summary>
54  ASPOSE_TASKS_SHARED_API void set_From(System::DateTime value);
55  /// <summary>
56  /// Gets the To date.
57  /// </summary>
58  ASPOSE_TASKS_SHARED_API System::DateTime get_To() const;
59  /// <summary>
60  /// Sets the To date.
61  /// </summary>
62  ASPOSE_TASKS_SHARED_API void set_To(System::DateTime value);
63  /// <summary>
64  /// Gets the duration of working hours.
65  /// </summary>
66  ASPOSE_TASKS_SHARED_API System::TimeSpan get_WorkingHours() const;
67  /// <summary>
68  /// Sets the duration of working hours.
69  /// </summary>
70  ASPOSE_TASKS_SHARED_API void set_WorkingHours(System::TimeSpan value);
71 
72  /// <summary>
73  /// Initializes a new instance of the <see cref="WorkUnit"></see> class.
74  /// Creates new WorkUnit object with the specified From and To dates.
75  /// </summary>
76  /// <param name="from">
77  /// Start date of working hours.
78  /// </param>
79  /// <param name="to">
80  /// Finish date of working hours.
81  /// </param>
82  ASPOSE_TASKS_SHARED_API WorkUnit(System::DateTime from, System::DateTime to);
83 
84 protected:
85 
86  ASPOSE_TASKS_SHARED_API WorkUnit(System::DateTime from, System::DateTime to, System::TimeSpan work);
87 
88  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(WorkUnit, CODEPORTING_ARGS(System::DateTime from, System::DateTime to, System::TimeSpan work));
89  #ifdef ASPOSE_GET_SHARED_MEMBERS
90  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
91  #endif
92 
93 
94 private:
95 
96  System::DateTime pr_From;
97  System::DateTime pr_To;
98  System::TimeSpan pr_WorkingHours;
99 
100  System::String get_DebuggerDisplay();
101 
102 };
103 
104 } // namespace Tasks
105 } // namespace Aspose
106 
107 
Represents a calendar used in a project.
Definition: Calendar.h:294
Represents working hours.
Definition: WorkUnit.h:35
System::DateTime get_To() const
Gets the To date.
WorkUnit(System::DateTime from, System::DateTime to)
Initializes a new instance of the WorkUnit class. Creates new WorkUnit object with the specified From...
System::DateTime get_From() const
Gets the From date.
void set_To(System::DateTime value)
Sets the To date.
System::TimeSpan get_WorkingHours() const
Gets the duration of working hours.
void set_WorkingHours(System::TimeSpan value)
Sets the duration of working hours.
void set_From(System::DateTime value)
Sets the From date.
Definition: Asn.h:13