VTK  9.3.1
vtkXMLPHyperTreeGridReader.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
16 #ifndef vtkXMLPHyperTreeGridReader_h
17 #define vtkXMLPHyperTreeGridReader_h
18 
19 #include "vtkIOXMLModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkHyperTreeCursor;
24 class vtkHyperTreeGrid;
27 
29 {
30 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
39  vtkHyperTreeGrid* GetOutput();
40  vtkHyperTreeGrid* GetOutput(int idx);
42 
47  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
48 
49 protected:
51  ~vtkXMLPHyperTreeGridReader() override;
52 
56  const char* GetDataSetName() override;
57 
61  vtkIdType GetNumberOfPoints();
62  vtkIdType GetNumberOfPointsInPiece(int piece);
63 
64  vtkHyperTreeGrid* GetOutputAsHyperTreeGrid();
65  vtkHyperTreeGrid* GetPieceInputAsHyperTreeGrid(int piece);
66 
71  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
72 
76  void SetupEmptyOutput() override;
77 
81  void SetupOutputData() override;
82 
86  void SetupOutputInformation(vtkInformation* outInfo) override;
87 
91  void SetupOutputTotals();
92 
96  void SetupNextPiece();
97 
101  void SetupPieces(int numPieces) override;
102 
106  void SetupUpdateExtent(int piece, int numberOfPieces);
107 
111  void ReadXMLData() override;
112 
116  int CanReadPiece(int index) override;
117 
121  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
122 
126  void DestroyPieces() override;
127 
129 
133  int ReadPiece(vtkXMLDataElement* ePiece) override;
134 
138  int ReadPieceData(int index);
139  int ReadPieceData();
140  void RecursivelyProcessTree(
142 
146  vtkXMLHyperTreeGridReader* CreatePieceReader();
147 
148  int FillOutputPortInformation(int, vtkInformation*) override;
149 
150  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
151  vtkInformationVector* outputVector) override;
152 
156  void PieceProgressCallback() override;
157 
163 
168  int EndPiece;
169 
172 
174 
175 private:
177  void operator=(const vtkXMLPHyperTreeGridReader&) = delete;
178 };
179 
180 VTK_ABI_NAMESPACE_END
181 #endif
Read VTK XML HyperTreeGrid files.
virtual const char * GetDataSetName()=0
Get the name of the data set being read.
virtual void SetupEmptyOutput()=0
Setup the output with no data available.
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.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void ReadXMLData()
Pipeline execution methods to be defined by subclass.
int vtkIdType
Definition: vtkType.h:315
Objects for traversal a HyperTreeGrid.
vtkXMLHyperTreeGridReader ** PieceReaders
Objects for depth-first traversal HyperTrees.
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
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.
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.
Read PVTK XML HyperTreeGrid files.
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.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
int StartPiece
The range of pieces from the file that will form the UpdatePiece.
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.