VTK  9.4.20250114
vtkXMLPDataReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15#ifndef vtkXMLPDataReader_h
16#define vtkXMLPDataReader_h
17
18#include "vtkIOXMLModule.h" // For export macro
20
21VTK_ABI_NAMESPACE_BEGIN
23class vtkDataSet;
25
26class VTKIOXML_EXPORT vtkXMLPDataReader : public vtkXMLPDataObjectReader
27{
28public:
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
36 void CopyOutputInformation(vtkInformation* outInfo, int port) override;
37
38protected:
41
42 // Re-use any superclass signatures that we don't override.
44
48 void DestroyPieces() override;
49
51
53
58
62 void SetupOutputData() override;
63
67 void SetupOutputInformation(vtkInformation* outInfo) override;
68
72 void SetupPieces(int numPieces) override;
73
77 int CanReadPiece(int index) override;
78
83
87 int ReadPiece(vtkXMLDataElement* ePiece) override;
88
92 int ReadPieceData(int index);
93
97 virtual int ReadPieceData();
98
102 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
103
104 virtual void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) = 0;
105 virtual void CopyArrayForCells(vtkAbstractArray* inArray, vtkAbstractArray* outArray) = 0;
106
110 void PieceProgressCallback() override;
111
116
121
127
128private:
129 vtkXMLPDataReader(const vtkXMLPDataReader&) = delete;
130 void operator=(const vtkXMLPDataReader&) = delete;
131};
132
133VTK_ABI_NAMESPACE_END
134#endif
Abstract superclass for all arrays.
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
Represents an XML element and those nested inside.
Superclass for VTK XML file readers.
Superclass for PVTK XML file readers.
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.
Superclass for PVTK XML file readers that read vtkDataSets.
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:315