VTK  9.3.1
vtkReaderAlgorithm.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
19 #ifndef vtkReaderAlgorithm_h
20 #define vtkReaderAlgorithm_h
21 
22 #include "vtkAlgorithm.h"
23 #include "vtkCommonExecutionModelModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkReaderAlgorithm : public vtkAlgorithm
27 {
28 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
36  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
37 
47  virtual vtkDataObject* CreateOutput(vtkDataObject* currentOutput) { return currentOutput; }
48 
55  virtual int ReadMetaData(vtkInformation* metadata) = 0;
56 
63  virtual int ReadTimeDependentMetaData(int /*timestep*/, vtkInformation* /*metadata*/)
64  {
65  return 1;
66  }
67 
75  virtual int ReadMesh(
76  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
77 
83  virtual int ReadPoints(
84  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
85 
91  virtual int ReadArrays(
92  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
93 
94 protected:
96  ~vtkReaderAlgorithm() override;
97 
98 private:
99  vtkReaderAlgorithm(const vtkReaderAlgorithm&) = delete;
100  void operator=(const vtkReaderAlgorithm&) = delete;
101 };
102 
103 VTK_ABI_NAMESPACE_END
104 #endif
Store vtkAlgorithm input/output information.
virtual vtkDataObject * CreateOutput(vtkDataObject *currentOutput)
This can be overridden by a subclass to create an output that is determined by the file being read...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int ReadTimeDependentMetaData(int, vtkInformation *)
Provide meta-data for the pipeline.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:54
Superclass for readers that implement a simplified API.