VTK  9.1.0
vtkParallelReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkParallelReader.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=========================================================================*/
26#ifndef vtkParallelReader_h
27#define vtkParallelReader_h
28
29#include "vtkCommonExecutionModelModule.h" // For export macro
30#include "vtkReaderAlgorithm.h"
31
32#include <string> // needed for std::string in the interface
33
34struct vtkParallelReaderInternal;
35
36class VTKCOMMONEXECUTIONMODEL_EXPORT vtkParallelReader : public vtkReaderAlgorithm
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
48 void AddFileName(VTK_FILEPATH const char* fname);
49
54
59
63 VTK_FILEPATH const char* GetFileName(int i) const;
64
69 VTK_FILEPATH const char* GetCurrentFileName() const;
70
72
77 int ReadMetaData(vtkInformation* metadata) override;
78 int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) override;
79 int ReadPoints(int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) override;
80 int ReadArrays(int piece, int npieces, int nghosts, int timestep, vtkDataObject* output) override;
82
83protected:
86
93 virtual double GetTimeValue(const std::string& fname);
94
101 virtual int ReadMesh(
102 const std::string& fname, int piece, int npieces, int nghosts, vtkDataObject* output) = 0;
103
110 virtual int ReadPoints(
111 const std::string& fname, int piece, int npieces, int nghosts, vtkDataObject* output) = 0;
112
119 virtual int ReadArrays(
120 const std::string& fname, int piece, int npieces, int nghosts, vtkDataObject* output) = 0;
121
123
124private:
125 vtkParallelReader(const vtkParallelReader&) = delete;
126 void operator=(const vtkParallelReader&) = delete;
127
128 vtkParallelReaderInternal* Internal;
129};
130
131#endif
general representation of visualization data
a simple class to control print indentation
Definition: vtkIndent.h:113
Store vtkAlgorithm input/output information.
Superclass for algorithms that are parallel aware.
virtual int ReadPoints(const std::string &fname, int piece, int npieces, int nghosts, vtkDataObject *output)=0
A method that needs to be override by the subclass to provide the point coordinates.
virtual double GetTimeValue(const std::string &fname)
A subclass can override this method to provide an actual time value for a given file (this method is ...
void ClearFileNames()
Removes all filenames stored by the reader.
~vtkParallelReader() override
VTK_FILEPATH const char * GetFileName(int i) const
Returns a particular filename stored by the reader.
int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
This is the superclass API overridden by this class to provide time support internally.
void AddFileName(VTK_FILEPATH const char *fname)
Add a filename to be read.
VTK_FILEPATH const char * GetCurrentFileName() const
Returns the filename that was last loaded by the reader.
int GetNumberOfFileNames() const
Returns the number of filenames stored by the reader.
virtual int ReadMesh(const std::string &fname, int piece, int npieces, int nghosts, vtkDataObject *output)=0
A method that needs to be override by the subclass to provide the mesh (topology).
virtual int ReadArrays(const std::string &fname, int piece, int npieces, int nghosts, vtkDataObject *output)=0
A method that needs to be override by the subclass to provide data arrays.
int ReadPoints(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
This is the superclass API overridden by this class to provide time support internally.
int ReadArrays(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output) override
This is the superclass API overridden by this class to provide time support internally.
int ReadMetaData(vtkInformation *metadata) override
This is the superclass API overridden by this class to provide time support internally.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for readers that implement a simplified API.
#define VTK_FILEPATH