Aspose.Tasks for C++
IAlgorithm.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="IAlgorithm.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 list 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 IAlgorithm : public virtual System::Object
23 {
24  typedef IAlgorithm<T> ThisType;
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 an object.
34  /// </summary>
35  /// <param name="el">Processed object.</param>
36  /// <param name="index">Index of the object.</param>
37  virtual void PreAlg(T el, int32_t index) = 0;
38  /// <summary>
39  /// Processes an object in the list. Called after <see cref="IAlgorithm&lt;T&gt;::PreAlg"></see>;
40  /// </summary>
41  /// <param name="el">Processed object.</param>
42  /// <param name="index">Index of the object.</param>
43  virtual void Alg(T el, int32_t index) = 0;
44  /// <summary>
45  /// Called after processing of an object.
46  /// </summary>
47  /// <param name="el">Processed object.</param>
48  /// <param name="index">Index of the object.</param>
49  virtual void PostAlg(T el, int32_t index) = 0;
50 
51 };
52 
53 } // namespace Util
54 } // namespace Tasks
55 } // namespace Aspose
56 
57 
virtual void PostAlg(T el, int32_t index)=0
Called after processing of an object.
virtual void PreAlg(T el, int32_t index)=0
Called before processing of an object.
virtual void Alg(T el, int32_t index)=0
Processes an object in the list. Called after IAlgorithm&lt;T&gt;::PreAlg;
Represents an algorithm that can be applied to a list of objects T .
Definition: IAlgorithm.h:22