VTK
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 "vtkCommonExecutionModelModule.h" // For export macro
35 #include "vtkAlgorithm.h"
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)
53  {
54  return currentOutput;
55  }
56 
63  virtual int ReadMetaData(vtkInformation* metadata) = 0;
64 
72  int /*timestep*/, vtkInformation* /*metadata*/)
73  {
74  return 1;
75  }
76 
77 
85  virtual int ReadMesh(
86  int piece, int npieces, int nghosts, int timestep,
87  vtkDataObject* output) = 0;
88 
94  virtual int ReadPoints(
95  int piece, int npieces, int nghosts, int timestep,
96  vtkDataObject* output) = 0;
97 
103  virtual int ReadArrays(
104  int piece, int npieces, int nghosts, int timestep,
105  vtkDataObject* output) = 0;
106 
107 protected:
109  ~vtkReaderAlgorithm() override;
110 
111 private:
112  vtkReaderAlgorithm(const vtkReaderAlgorithm&) = delete;
113  void operator=(const vtkReaderAlgorithm&) = delete;
114 };
115 
116 #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.
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int ReadTimeDependentMetaData(int, vtkInformation *)
Provide meta-data for the pipeline.
general representation of visualization data
Definition: vtkDataObject.h:64
Superclass for readers that implement a simplified API.