VTK
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 =========================================================================*/
27 #ifndef vtkXMLPDataReader_h
28 #define vtkXMLPDataReader_h
29 
30 #include "vtkIOXMLModule.h" // For export macro
32 
33 class vtkDataArray;
34 class vtkDataSet;
35 class vtkXMLDataReader;
36 
37 class VTKIOXML_EXPORT vtkXMLPDataReader : public vtkXMLPDataObjectReader
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
47  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
48 
49 protected:
51  ~vtkXMLPDataReader() override;
52 
53  // Re-use any superclass signatures that we don't override.
55 
59  void DestroyPieces() override;
60 
61  virtual vtkIdType GetNumberOfPoints() = 0;
62 
63  virtual vtkIdType GetNumberOfCells() = 0;
64 
68  vtkDataSet* GetPieceInputAsDataSet(int piece);
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 
93  virtual vtkXMLDataReader* CreatePieceReader() = 0;
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(vtkDataArray* inArray, vtkDataArray* outArray) = 0;
116  virtual void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray) = 0;
117 
121  void PieceProgressCallback() override;
122 
127 
132 
138 
139 private:
140  vtkXMLPDataReader(const vtkXMLPDataReader&) = delete;
141  void operator=(const vtkXMLPDataReader&) = delete;
142 };
143 
144 #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:62
int GhostLevel
The ghost level available on each input piece.
int vtkIdType
Definition: vtkType.h:345
vtkXMLDataElement * PPointDataElement
The PPointData and PCellData element representations.
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void SetupOutputData() override
Initialize the output data.
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:207
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)
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:136
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.