VTK  9.2.6
vtkXMLPDataReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkXMLPDataReader.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
27#ifndef vtkXMLPDataReader_h
28#define vtkXMLPDataReader_h
29
30#include "vtkIOXMLModule.h" // For export macro
32
34class vtkDataSet;
36
37class VTKIOXML_EXPORT vtkXMLPDataReader : public vtkXMLPDataObjectReader
38{
39public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
47 void CopyOutputInformation(vtkInformation* outInfo, int port) override;
48
49protected:
52
53 // Re-use any superclass signatures that we don't override.
55
59 void DestroyPieces() override;
60
62
64
69
73 void SetupOutputData() override;
74
78 void SetupOutputInformation(vtkInformation* outInfo) override;
79
83 void SetupPieces(int numPieces) override;
84
88 int CanReadPiece(int index) override;
89
94
98 int ReadPiece(vtkXMLDataElement* ePiece) override;
99
103 int ReadPieceData(int index);
104
108 virtual int ReadPieceData();
109
113 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
114
115 virtual void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) = 0;
116 virtual void CopyArrayForCells(vtkAbstractArray* inArray, vtkAbstractArray* outArray) = 0;
117
121 void PieceProgressCallback() override;
122
127
132
138
139private:
140 vtkXMLPDataReader(const vtkXMLPDataReader&) = delete;
141 void operator=(const vtkXMLPDataReader&) = delete;
142};
143
144#endif
Abstract superclass for all arrays.
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
a simple class to control print indentation
Definition vtkIndent.h:34
Store vtkAlgorithm input/output information.
Represents an XML element and those nested inside.
Superclass for VTK XML file readers.
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.
int CanReadPiece(int index) override
Whether or not the current reader can read the current piece.
vtkDataSet * GetPieceInputAsDataSet(int piece)
Get a given piece input as a dataset, return nullptr if there is none.
void PieceProgressCallback() override
Callback registered with the PieceProgressObserver.
int ReadPiece(vtkXMLDataElement *ePiece) override
Setup the current piece reader.
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...
virtual vtkIdType GetNumberOfPoints()=0
virtual int ReadPieceData()
Actually read the current piece data.
vtkXMLDataElement * PCellDataElement
vtkXMLDataReader ** PieceReaders
Information per-piece.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it.
int ReadPieceData(int index)
Actually read the piece at the given index data.
virtual vtkXMLDataReader * CreatePieceReader()=0
Create a reader according to the data to read.
void SetupPieces(int numPieces) override
Setup the number of pieces to be read and allocate space accordingly.
virtual vtkIdType GetNumberOfCells()=0
virtual void CopyArrayForCells(vtkAbstractArray *inArray, vtkAbstractArray *outArray)=0
void SetupOutputData() override
Initialize the output data.
virtual void CopyArrayForPoints(vtkAbstractArray *inArray, vtkAbstractArray *outArray)=0
void DestroyPieces() override
Delete all piece readers and related information.
~vtkXMLPDataReader() override
void SetupOutputInformation(vtkInformation *outInfo) override
Pipeline execute information driver.
int GhostLevel
The ghost level available on each input piece.
vtkXMLDataElement * PPointDataElement
The PPointData and PCellData element representations.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkIdType
Definition vtkType.h:332