Aspose.Tasks for C++
RecurrencePatternBase.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="RecurrencePatternBase.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/object.h>
9 
10 #include "aspose.tasks.cpp/Duration.h"
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 class Calendar;
18 class RecurrencePatternValidatorBase;
19 class RecurrenceRangeBase;
20 namespace Recurring
21 {
22 namespace Calculators
23 {
24 class RecurrenceDateCalculatorBase;
25 } // namespace Calculators
26 } // namespace Recurring
27 class RecurringTaskBuilder;
28 class RecurringTaskParameters;
29 } // namespace Tasks
30 } // namespace Aspose
31 
32 namespace Aspose {
33 
34 namespace Tasks {
35 
36 /// <summary>
37 /// Represents the base class of recurrence pattern.
38 /// </summary>
39 class ASPOSE_TASKS_SHARED_CLASS RecurrencePatternBase : public System::Object
40 {
42  typedef System::Object BaseType;
43 
44  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
45  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
46 
48  friend class Aspose::Tasks::RecurringTaskBuilder;
50 
51 public:
52 
53  /// <summary>
54  /// Gets the recurrence range.
55  /// </summary>
56  ASPOSE_TASKS_SHARED_API const System::SharedPtr<RecurrenceRangeBase>& get_RecurrenceRange() const;
57  /// <summary>
58  /// Sets the recurrence range.
59  /// </summary>
60  ASPOSE_TASKS_SHARED_API void set_RecurrenceRange(const System::SharedPtr<RecurrenceRangeBase>& value);
61 
62 protected:
63 
64  /// <summary>
65  /// Initializes a new instance of the <see cref="RecurrencePatternBase"></see> class.
66  /// </summary>
67  // ReSharper disable once EmptyConstructor
68  ASPOSE_TASKS_SHARED_API RecurrencePatternBase();
69 
70  ASPOSE_TASKS_SHARED_API void EnsureInitializationIsDone(const System::SharedPtr<Aspose::Tasks::Calendar>& calendar, Aspose::Tasks::Duration duration);
71  /// <summary>
72  /// Returns a validator which check a date as valid against the recurrence pattern conditions.
73  /// </summary>
74  /// <returns>
75  /// Returns the instance of the validator.
76  /// </returns>
77  ASPOSE_TASKS_SHARED_API System::SharedPtr<RecurrencePatternValidatorBase> GetValidator();
78  /// <summary>
79  /// Returns a calculator which calculates start/finish dates by appropriate algorithm.
80  /// </summary>
81  /// <returns>Returns the instance of the validator.</returns>
82  ASPOSE_TASKS_SHARED_API System::SharedPtr<Recurring::Calculators::RecurrenceDateCalculatorBase> GetCalculator();
83  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<RecurrencePatternValidatorBase> GetValidatorInternal(System::SharedPtr<Aspose::Tasks::Calendar> calendar) = 0;
84  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<Recurring::Calculators::RecurrenceDateCalculatorBase> GetCalculatorInternal(System::SharedPtr<Aspose::Tasks::Calendar> calendar, Aspose::Tasks::Duration duration) = 0;
85  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::Calendar> GetCalendarOrDefault(System::SharedPtr<Aspose::Tasks::Calendar> calendar) = 0;
86  #ifdef ASPOSE_GET_SHARED_MEMBERS
87  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
88  #endif
89 
90 
91 private:
92 
93  System::SharedPtr<RecurrenceRangeBase> pr_RecurrenceRange;
94  Aspose::Tasks::Duration pr_Duration;
95 
98 
99  System::SharedPtr<Aspose::Tasks::Calendar> pr_Calendar;
100 
101  const System::SharedPtr<Aspose::Tasks::Calendar>& get_Calendar() const;
102  void set_Calendar(const System::SharedPtr<Aspose::Tasks::Calendar>& value);
103 
104 };
105 
106 } // namespace Tasks
107 } // namespace Aspose
108 
109 
void set_Duration(Aspose::Tasks::Duration value)
Sets the duration for one occurrence of the recurring task.
Definition: Asn.h:12
Aspose::Tasks::Duration get_Duration() const
Gets the duration for one occurrence of the recurring task.
Represents duration in a project.
Definition: Duration.h:161
Represents the recurrence range of recurring task.
Definition: RecurrenceRangeBase.h:49
Represents the base class of recurrence pattern.
Definition: RecurrencePatternBase.h:39
Represents the set of parameters are used to create a recurring task in a project.
Definition: RecurringTaskParameters.h:48