VTK  9.2.6
vtkReaderAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkReaderAlgorithm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkReaderAlgorithm_h
32 #define vtkReaderAlgorithm_h
33 
34 #include "vtkAlgorithm.h"
35 #include "vtkCommonExecutionModelModule.h" // For export macro
36 
37 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkReaderAlgorithm : public vtkAlgorithm
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
47  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
48 
58  virtual vtkDataObject* CreateOutput(vtkDataObject* currentOutput) { return currentOutput; }
59 
66  virtual int ReadMetaData(vtkInformation* metadata) = 0;
67 
74  virtual int ReadTimeDependentMetaData(int /*timestep*/, vtkInformation* /*metadata*/)
75  {
76  return 1;
77  }
78 
86  virtual int ReadMesh(
87  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
88 
94  virtual int ReadPoints(
95  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
96 
102  virtual int ReadArrays(
103  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
104 
105 protected:
107  ~vtkReaderAlgorithm() override;
108 
109 private:
110  vtkReaderAlgorithm(const vtkReaderAlgorithm&) = delete;
111  void operator=(const vtkReaderAlgorithm&) = delete;
112 };
113 
114 #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:69
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:62
a simple class to control print indentation
Definition: vtkIndent.h:39
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:65
Superclass for readers that implement a simplified API.