VTK  9.3.20240327
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
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:161
general representation of visualization data
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for readers that implement a simplified API.
virtual int ReadPoints(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read the points.
virtual int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read the mesh (connectivity) for a given set of data partitioning, number of ghost levels and time st...
virtual int ReadMetaData(vtkInformation *metadata)=0
Provide meta-data for the pipeline.
virtual int ReadArrays(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read all the arrays (point, cell, field etc.).
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.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Overridden to call appropriate handle pipeline request from executive.
virtual int ReadTimeDependentMetaData(int, vtkInformation *)
Provide meta-data for the pipeline.
~vtkReaderAlgorithm() override
int vtkTypeBool
Definition: vtkABI.h:64