Aspose.Tasks for C++
ITreeAlgorithm.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="ITreeAlgorithm.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 <cstdint>
10 
11 namespace Aspose {
12 
13 namespace Tasks {
14 
15 namespace Util {
16 
17 /// <summary>
18 /// Represents an algorithm that can be applied to a tree of objects <typeparamref name="T"></typeparamref>.
19 /// </summary>
20 /// <typeparam name="T">The type of object to apply method interface to.</typeparam>
21 template<typename T>
22 class ITreeAlgorithm : public virtual System::Object
23 {
25  typedef System::Object BaseType;
26 
27  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
28  RTTI_INFO_TEMPLATE_CLASS(ThisType, ThisTypeBaseTypesInfo);
29 
30 public:
31 
32  /// <summary>
33  /// Called before processing of a node of a tree.
34  /// </summary>
35  /// <param name="el">Node to process.</param>
36  /// <param name="level">Tree node level.</param>
37  virtual void PreAlg(T el, int32_t level) = 0;
38  /// <summary>
39  /// Processes a node of a tree.
40  /// </summary>
41  /// <param name="el">Node to process.</param>
42  /// <param name="level">Tree node level.</param>
43  virtual void Alg(T el, int32_t level) = 0;
44  /// <summary>
45  /// Called after processing of a node of a tree.
46  /// </summary>
47  /// <param name="el">Node to process.</param>
48  /// <param name="level">Tree node level.</param>
49  virtual void PostAlg(T el, int32_t level) = 0;
50 
51 };
52 
53 } // namespace Util
54 } // namespace Tasks
55 } // namespace Aspose
56 
57 
Represents an algorithm that can be applied to a tree of objects T .
Definition: ITreeAlgorithm.h:23
virtual void PreAlg(T el, int32_t level)=0
Called before processing of a node of a tree.
virtual void PostAlg(T el, int32_t level)=0
Called after processing of a node of a tree.
virtual void Alg(T el, int32_t level)=0
Processes a node of a tree.
Definition: Asn.h:13