VTK  9.7.1
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 
28 VTK_ABI_NAMESPACE_BEGIN
29 
30 class vtkEndFor;
31 class vtkExecutionRange;
33 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkForEach : public vtkDataObjectAlgorithm
34 {
35 public:
36  static vtkForEach* New();
38  void PrintSelf(std::ostream& os, vtkIndent indent) override;
39 
44  static vtkInformationObjectBaseKey* FOR_EACH_FILTER();
45 
49  virtual void SetRange(vtkExecutionRange*);
50 
54  virtual bool IsIterating();
55 
59  void Iter();
60 
64  virtual void RegisterEndFor(vtkEndFor*);
65 
66 protected:
67  vtkForEach();
68  ~vtkForEach() override;
69 
74 
75 private:
76  vtkForEach(const vtkForEach&) = delete;
77  void operator=(const vtkForEach&) = delete;
78 
79  struct Internals;
80  std::unique_ptr<Internals> Internal;
81 };
82 
83 VTK_ABI_NAMESPACE_END
84 
85 #endif // vtkForEach_h
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Define a range for the vtkForEach.
vtkEndFor define the end of the sub-pipeline to loop
Definition: vtkEndFor.h:35
Store vtkAlgorithm input/output information.
static vtkDataObjectAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Key for vtkObjectBase values.
Superclass for algorithms that produce only data object as output.
Algorithm allowing to implement a for loop using the VTK pipeline and a sister filter vtkEndFor...
Definition: vtkForEach.h:33
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.