Aspose.Tasks for C++
WeeklyRepetitionBase.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="WeeklyRepetitionBase.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <cstdint>
9 
10 #include "aspose.tasks.cpp/Recurring/Validators/IValidatorCreator.h"
11 #include "aspose.tasks.cpp/Recurring/Calculators/ICalculatorCreator.h"
12 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
13 
14 namespace Aspose
15 {
16 namespace Tasks
17 {
18 class Calendar;
19 class Duration;
20 class RecurrencePatternValidatorBase;
21 namespace Recurring
22 {
23 namespace Calculators
24 {
25 class RecurrenceDateCalculatorBase;
26 } // namespace Calculators
27 } // namespace Recurring
28 class WeeklyRecurrencePattern;
29 } // namespace Tasks
30 } // namespace Aspose
31 
32 namespace Aspose {
33 
34 namespace Tasks {
35 
36 /// <summary>
37 /// Represents a base class for repetitions in weekly recurrence pattern.
38 /// </summary>
39 class ASPOSE_TASKS_SHARED_CLASS WeeklyRepetitionBase : public Aspose::Tasks::Recurring::Validators::IValidatorCreator, public Aspose::Tasks::Recurring::Calculators::ICalculatorCreator
40 {
41  typedef WeeklyRepetitionBase ThisType;
42  typedef Aspose::Tasks::Recurring::Validators::IValidatorCreator BaseType;
43  typedef Aspose::Tasks::Recurring::Calculators::ICalculatorCreator BaseType1;
44 
45  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
46  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
47 
49 
50 public:
51 
52  /// <summary>
53  /// Gets a number of weeks which represents the interval in weeks between occurrences.
54  /// </summary>
55  ASPOSE_TASKS_SHARED_API int32_t get_RepetitionInterval() const;
56  /// <summary>
57  /// Sets a number of weeks which represents the interval in weeks between occurrences.
58  /// </summary>
59  ASPOSE_TASKS_SHARED_API void set_RepetitionInterval(int32_t value);
60 
61 protected:
62 
63  /// <summary>
64  /// Initializes a new instance of the <see cref="WeeklyRepetitionBase"></see> class.
65  /// </summary>
66  ASPOSE_TASKS_SHARED_API WeeklyRepetitionBase();
67 
68  ASPOSE_TASKS_SHARED_API System::SharedPtr<Calendar> GetCalendarInternal();
69  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<RecurrencePatternValidatorBase> GetValidatorInternal(System::SharedPtr<Calendar> calendar) = 0;
70  virtual ASPOSE_TASKS_SHARED_API System::SharedPtr<Recurring::Calculators::RecurrenceDateCalculatorBase> GetCalculatorInternal(System::SharedPtr<Calendar> calendar, Duration duration) = 0;
71 
72 private:
73 
74  int32_t repetitionInterval;
75 
76  System::SharedPtr<RecurrencePatternValidatorBase> GetValidator(System::SharedPtr<Calendar> calendar) override;
77  System::SharedPtr<Recurring::Calculators::RecurrenceDateCalculatorBase> GetCalculator(System::SharedPtr<Calendar> calendar, Duration duration) override;
78 
79 };
80 
81 } // namespace Tasks
82 } // namespace Aspose
83 
84 
Represents duration in a project.
Definition: Duration.h:163
Represents the set of parameters are used to create a weekly recurring task in a project.
Definition: WeeklyRecurrencePattern.h:37
Represents a base class for repetitions in weekly recurrence pattern.
Definition: WeeklyRepetitionBase.h:40
int32_t get_RepetitionInterval() const
Gets a number of weeks which represents the interval in weeks between occurrences.
void set_RepetitionInterval(int32_t value)
Sets a number of weeks which represents the interval in weeks between occurrences.
Definition: Asn.h:13