VTK  9.0.2
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 
52  virtual vtkDataObject* CreateOutput(vtkDataObject* currentOutput) { return currentOutput; }
53 
60  virtual int ReadMetaData(vtkInformation* metadata) = 0;
61 
68  virtual int ReadTimeDependentMetaData(int /*timestep*/, vtkInformation* /*metadata*/)
69  {
70  return 1;
71  }
72 
80  virtual int ReadMesh(
81  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
82 
88  virtual int ReadPoints(
89  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
90 
96  virtual int ReadArrays(
97  int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) = 0;
98 
99 protected:
102 
103 private:
104  vtkReaderAlgorithm(const vtkReaderAlgorithm&) = delete;
105  void operator=(const vtkReaderAlgorithm&) = delete;
106 };
107 
108 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:63
general representation of visualization data
Definition: vtkDataObject.h:60
a simple class to control print indentation
Definition: vtkIndent.h:34
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.
virtual int ReadTimeDependentMetaData(int, vtkInformation *)
Provide meta-data for the pipeline.
~vtkReaderAlgorithm() override