Aspose.Tasks for C++
ChildTasksCollector.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="ChildTasksCollector.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/shared_ptr.h>
9 #include <system/details/pointer_collection_helpers.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/Util/TreeAlgorithmBase.h"
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
14 
15 namespace Aspose
16 {
17 namespace Tasks
18 {
19 class Task;
20 namespace Util
21 {
22 class SavingUtils;
23 } // namespace Util
24 } // namespace Tasks
25 } // namespace Aspose
26 namespace System
27 {
28 namespace Collections
29 {
30 namespace Generic
31 {
32 template <typename> class List;
33 } // namespace Generic
34 } // namespace Collections
35 } // namespace System
36 
37 namespace Aspose {
38 
39 namespace Tasks {
40 
41 namespace Util {
42 
43 /// <summary>
44 /// Collects all child tasks.
45 /// </summary>
46 class ASPOSE_TASKS_SHARED_CLASS ChildTasksCollector : public Aspose::Tasks::Util::TreeAlgorithmBase<System::SharedPtr<Aspose::Tasks::Task>>
47 {
50 
51  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
52  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
53 
54  friend class Aspose::Tasks::Task;
55  friend class Aspose::Tasks::Util::SavingUtils;
56 
57 public:
58 
59  /// <summary>
60  /// Gets a list collected child objects (tasks).
61  /// </summary>
62  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Task>>> get_Tasks() const;
63 
64  /// <summary>
65  /// Initializes a new instance of the <see cref="ChildTasksCollector"></see> class.
66  /// </summary>
67  ASPOSE_TASKS_SHARED_API ChildTasksCollector();
68 
69  /// <summary>
70  /// Processes the specified object.
71  /// </summary>
72  /// <param name="el">Object to process.</param>
73  /// <param name="level">Tree node level.</param>
74  ASPOSE_TASKS_SHARED_API void Alg(System::SharedPtr<Task> el, int32_t level) override;
75  ASPOSE_TASKS_SHARED_API void SetTemplateWeakPtr(uint32_t argument) override;
76 
77 protected:
78 
79  ASPOSE_TASKS_SHARED_API ChildTasksCollector(bool skipFirstTask);
80 
81  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ChildTasksCollector, CODEPORTING_ARGS(bool skipFirstTask));
82  #ifdef ASPOSE_GET_SHARED_MEMBERS
83  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
84  #endif
85 
86 
87 private:
88 
89  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Task>>> tasks;
90  bool skipFirstTask;
91 
92 };
93 
94 } // namespace Util
95 } // namespace Tasks
96 } // namespace Aspose
97 
98 
Represents a task in a project.
Definition: Task.h:384
Collects all child tasks.
Definition: ChildTasksCollector.h:47
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Task > > > get_Tasks() const
Gets a list collected child objects (tasks).
void Alg(System::SharedPtr< Task > el, int32_t level) override
Processes the specified object.
ChildTasksCollector()
Initializes a new instance of the ChildTasksCollector class.
A base class for implementations of ITreeAlgorithm<T>
Definition: TreeAlgorithmBase.h:24
Definition: Asn.h:13