VTK  9.3.1
vtkXMLUnstructuredGridReader.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
23 #ifndef vtkXMLUnstructuredGridReader_h
24 #define vtkXMLUnstructuredGridReader_h
25 
26 #include "vtkIOXMLModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
31 class vtkIdTypeArray;
32 
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  vtkUnstructuredGrid* GetOutput();
45  vtkUnstructuredGrid* GetOutput(int idx);
47 
48 protected:
50  ~vtkXMLUnstructuredGridReader() override;
51 
52  const char* GetDataSetName() override;
53  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) override;
54  void SetupOutputTotals() override;
55  void SetupPieces(int numPieces) override;
56  void DestroyPieces() override;
57 
58  void SetupOutputData() override;
59  int ReadPiece(vtkXMLDataElement* ePiece) override;
60  void SetupNextPiece() override;
61  int ReadPieceData() override;
62 
63  // Read a data array whose tuples correspond to cells.
64  int ReadArrayForCells(vtkXMLDataElement* da, vtkAbstractArray* outArray) override;
65 
66  // Get the number of cells in the given piece. Valid after
67  // UpdateInformation.
68  vtkIdType GetNumberOfCellsInPiece(int piece) override;
69 
70  int FillOutputPortInformation(int, vtkInformation*) override;
71 
72  // The index of the cell in the output where the current piece
73  // begins.
75 
76  // The Cells element for each piece.
79 
81  unsigned long CellsOffset;
82 
83 private:
85  void operator=(const vtkXMLUnstructuredGridReader&) = delete;
86 };
87 
88 VTK_ABI_NAMESPACE_END
89 #endif
virtual const char * GetDataSetName()=0
Get the name of the data set being read.
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
virtual vtkIdType GetNumberOfCellsInPiece(int piece)=0
Superclass for unstructured data XML readers.
dynamic, self-adjusting array of vtkIdType
void SetupPieces(int numPieces) override
int vtkIdType
Definition: vtkType.h:315
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
dataset represents arbitrary combinations of all possible cell types
void SetupOutputData() override
Setup the output's data with allocation.
Read VTK XML UnstructuredGrid files.
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
static vtkAlgorithm * New()
virtual int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray)
int ReadPiece(vtkXMLDataElement *ePiece) override
void DestroyPieces() override
virtual void SetupOutputTotals()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.