VTK  9.3.1
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 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkAbstractArray;
23 class vtkDataSet;
24 class vtkXMLDataReader;
25 
26 class VTKIOXML_EXPORT vtkXMLPDataReader : public vtkXMLPDataObjectReader
27 {
28 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
36  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
37 
38 protected:
40  ~vtkXMLPDataReader() override;
41 
42  // Re-use any superclass signatures that we don't override.
44 
48  void DestroyPieces() override;
49 
50  virtual vtkIdType GetNumberOfPoints() = 0;
51 
52  virtual vtkIdType GetNumberOfCells() = 0;
53 
57  vtkDataSet* GetPieceInputAsDataSet(int piece);
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 
82  virtual vtkXMLDataReader* CreatePieceReader() = 0;
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 
128 private:
129  vtkXMLPDataReader(const vtkXMLPDataReader&) = delete;
130  void operator=(const vtkXMLPDataReader&) = delete;
131 };
132 
133 VTK_ABI_NAMESPACE_END
134 #endif
vtkXMLDataElement * PCellDataElement
virtual int CanReadPiece(int index)=0
Whether or not the current reader can read the current piece.
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
virtual void PieceProgressCallback()=0
Callback registered with the PieceProgressObserver.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
Abstract superclass for all arrays.
int GhostLevel
The ghost level available on each input piece.
int vtkIdType
Definition: vtkType.h:315
vtkXMLDataElement * PPointDataElement
The PPointData and PCellData element representations.
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetupOutputData() override
Initialize the output data.
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Setup the output's information.
Definition: vtkXMLReader.h:228
Superclass for PVTK XML file readers that read vtkDataSets.
Superclass for PVTK XML file readers.
vtkXMLDataReader ** PieceReaders
Information per-piece.
virtual void SetupPieces(int numPieces)
Setup the number of pieces to be read and allocate space accordingly.
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
Read the primary element from the file.
virtual void DestroyPieces()
Delete all piece readers and related information.
Superclass for VTK XML file readers.
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:150
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.