VTK  9.7.20261008
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
14
15#ifndef vtkXMLPDataReader_h
16#define vtkXMLPDataReader_h
17
18#include "vtkIOXMLModule.h" // For export macro
19#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21
22VTK_ABI_NAMESPACE_BEGIN
24class vtkDataSet;
26
28{
29public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
37 void CopyOutputInformation(vtkInformation* outInfo, int port) override;
38
39protected:
42
43 // Reuse any superclass signatures that we don't override.
45
49 void DestroyPieces() override;
50
52
54
59
63 void SetupOutputData() override;
64
68 void SetupOutputInformation(vtkInformation* outInfo) override;
69
73 void SetupPieces(int numPieces) override;
74
78 int CanReadPiece(int index) override;
79
84
88 int ReadPiece(vtkXMLDataElement* ePiece) override;
89
93 int ReadPieceData(int index);
94
98 virtual int ReadPieceData();
99
103 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
104
105 virtual void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) = 0;
106 virtual void CopyArrayForCells(vtkAbstractArray* inArray, vtkAbstractArray* outArray) = 0;
107
111 void PieceProgressCallback() override;
112
117
122
128
129private:
130 vtkXMLPDataReader(const vtkXMLPDataReader&) = delete;
131 void operator=(const vtkXMLPDataReader&) = delete;
132};
133
134VTK_ABI_NAMESPACE_END
135#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.
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:363
#define VTK_MARSHALAUTO