Aspose.Tasks for C++
AvailabilityPeriod.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="AvailabilityPeriod.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 
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 namespace IO
18 {
19 namespace MSProject
20 {
21 class MppAvailabilityWriter;
22 } // namespace MSProject
23 } // namespace IO
24 } // namespace Tasks
25 } // namespace Aspose
26 namespace System
27 {
28 class String;
29 } // namespace System
30 
31 namespace Aspose {
32 
33 namespace Tasks {
34 
35 /// <summary>
36 /// Represents a period when a resource is available.
37 /// </summary>
38 class ASPOSE_TASKS_SHARED_CLASS AvailabilityPeriod : public System::Object
39 {
41  typedef System::Object BaseType;
42 
43  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
44  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
45 
46  friend class Aspose::Tasks::IO::MSProject::MppAvailabilityWriter;
47 
48 public:
49 
50  /// <summary>
51  /// Gets the date when a resource becomes available for the specified period.
52  /// </summary>
53  ASPOSE_TASKS_SHARED_API System::DateTime get_AvailableFrom() const;
54  /// <summary>
55  /// Sets the date when a resource becomes available for the specified period.
56  /// </summary>
57  ASPOSE_TASKS_SHARED_API void set_AvailableFrom(System::DateTime value);
58  /// <summary>
59  /// Gets the last date when a resource is available for the specified period.
60  /// </summary>
61  ASPOSE_TASKS_SHARED_API System::DateTime get_AvailableTo() const;
62  /// <summary>
63  /// Sets the last date when a resource is available for the specified period.
64  /// </summary>
65  ASPOSE_TASKS_SHARED_API void set_AvailableTo(System::DateTime value);
66  /// <summary>
67  /// Gets the percentage of a resource which is available during the specified period.
68  /// </summary>
69  ASPOSE_TASKS_SHARED_API double get_AvailableUnits() const;
70  /// <summary>
71  /// Sets the percentage of a resource which is available during the specified period.
72  /// </summary>
73  ASPOSE_TASKS_SHARED_API void set_AvailableUnits(double value);
74 
75  /// <summary>
76  /// Initializes a new instance of the <see cref="AvailabilityPeriod"></see>.
77  /// </summary>
78  ASPOSE_TASKS_SHARED_API AvailabilityPeriod();
79  /// <summary>
80  /// Initializes a new instance of the <see cref="AvailabilityPeriod"></see> with the specified date range and available units.
81  /// </summary>
82  ASPOSE_TASKS_SHARED_API AvailabilityPeriod(System::DateTime availableFrom, System::DateTime availableTo, double availableUnits);
83 
84 protected:
85 
86  ASPOSE_TASKS_SHARED_API bool get_IsImplicit() const;
87  ASPOSE_TASKS_SHARED_API System::String get_DebuggerDisplay();
88 
89  static ASPOSE_TASKS_SHARED_API System::SharedPtr<AvailabilityPeriod> CreateImplicit(System::DateTime availableFrom, System::DateTime availableTo);
90  ASPOSE_TASKS_SHARED_API bool Intersects(const System::SharedPtr<AvailabilityPeriod>& another);
91  static ASPOSE_TASKS_SHARED_API System::String FormatDate(System::DateTime date);
92  #ifdef ASPOSE_GET_SHARED_MEMBERS
93  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
94  #endif
95 
96 
97 private:
98 
99  System::DateTime pr_AvailableFrom;
100  System::DateTime pr_AvailableTo;
101  double pr_AvailableUnits;
102  bool pr_IsImplicit;
103 
104  ASPOSE_TASKS_SHARED_API void set_IsImplicit(bool value);
105 
106 };
107 
108 } // namespace Tasks
109 } // namespace Aspose
110 
111 
Represents a period when a resource is available.
Definition: AvailabilityPeriod.h:39
void set_AvailableTo(System::DateTime value)
Sets the last date when a resource is available for the specified period.
System::DateTime get_AvailableFrom() const
Gets the date when a resource becomes available for the specified period.
AvailabilityPeriod(System::DateTime availableFrom, System::DateTime availableTo, double availableUnits)
Initializes a new instance of the AvailabilityPeriod with the specified date range and available unit...
AvailabilityPeriod()
Initializes a new instance of the AvailabilityPeriod.
void set_AvailableFrom(System::DateTime value)
Sets the date when a resource becomes available for the specified period.
System::DateTime get_AvailableTo() const
Gets the last date when a resource is available for the specified period.
double get_AvailableUnits() const
Gets the percentage of a resource which is available during the specified period.
void set_AvailableUnits(double value)
Sets the percentage of a resource which is available during the specified period.
Definition: Asn.h:13