VTK  9.4.20250113
vtkForEach.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3#ifndef vtkForEach_h
4#define vtkForEach_h
5
6#include "vtkCommonExecutionModelModule.h" // for export macro
8
9#include <memory> // for std::unique_ptr
10
28VTK_ABI_NAMESPACE_BEGIN
29
30class vtkEndFor;
33class VTKCOMMONEXECUTIONMODEL_EXPORT vtkForEach : public vtkDataObjectAlgorithm
34{
35public:
36 static vtkForEach* New();
38 void PrintSelf(std::ostream& os, vtkIndent indent) override;
39
44
49
53 virtual bool IsIterating();
54
58 virtual void RegisterEndFor(vtkEndFor*);
59
60protected:
62 ~vtkForEach() override;
63
68
69private:
70 vtkForEach(const vtkForEach&) = delete;
71 void operator=(const vtkForEach&) = delete;
72
73 struct Internals;
74 std::unique_ptr<Internals> Internal;
75};
76
77VTK_ABI_NAMESPACE_END
78
79#endif // vtkForEach_h
Superclass for algorithms that produce only data object as output.
vtkEndFor define the end of the sub-pipeline to loop
Definition vtkEndFor.h:36
Define a range for the vtkForEach.
Algorithm allowing to implement a for loop using the VTK pipeline and a sister filter vtkEndFor.
Definition vtkForEach.h:34
static vtkInformationObjectBaseKey * FOR_EACH_FILTER()
Information key used to pass this filter into the pipeline.
virtual void SetRange(vtkExecutionRange *)
Range object to use to control execution loop.
void PrintSelf(std::ostream &os, vtkIndent indent) override
static vtkForEach * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual void RegisterEndFor(vtkEndFor *)
Method for registering the end of the loop vtkEndFor filter.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual bool IsIterating()
Method indicating whether the filter is currently iterating.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
~vtkForEach() override
a simple class to control print indentation
Definition vtkIndent.h:108
Key for vtkObjectBase values.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.