VTK  9.7.20260928
vtkXMLTableReader.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 vtkXMLTableReader_h
16#define vtkXMLTableReader_h
17
18#include "vtkIOXMLModule.h" // For export macro
19#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20#include "vtkXMLReader.h"
21
22#include <map> // needed for std::map
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkCellArray;
26class vtkIdTypeArray;
28class vtkTable;
29
30class VTKIOXML_EXPORT VTK_MARSHALAUTO vtkXMLTableReader : public vtkXMLReader
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
36
38
44
49
54
61 void SetupUpdateExtent(int piece, int numberOfPieces);
62
67 void CopyOutputInformation(vtkInformation* outInfo, int port) override;
68
69protected:
72
77
79
83 const char* GetDataSetName() override;
84
88 void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
89
94
98 void SetupEmptyOutput() override;
99
104
109
113 void SetupOutputData() override;
114
118 void SetupOutputInformation(vtkInformation* outInfo) override;
119
123 void SetupPieces(int numPieces);
124
128 void ReadXMLData() override;
129
133 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
134
138 int ReadPiece(vtkXMLDataElement* ePiece, int piece);
139
144
149
151
164
170
175
179 int Piece;
180
185
191
192private:
193 std::map<std::string, int> RowDataTimeStep;
194 std::map<std::string, vtkTypeInt64> RowDataOffset;
195
196 vtkXMLTableReader(const vtkXMLTableReader&) = delete;
197 void operator=(const vtkXMLTableReader&) = delete;
198};
199
200VTK_ABI_NAMESPACE_END
201#endif
int idx
Definition HexCnBasis.h:79
object to represent cell connectivity
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:170
dynamic, self-adjusting array of unsigned char
Represents an XML element and those nested inside.
const char * GetDataSetName() override
Get the name of the data set being read.
int UpdatedPiece
The update request.
int ColumnIsEnabled(vtkXMLDataElement *eRowData)
Check whether the given array element is an enabled array.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetupOutputData() override
Initialize current output data: allocate arrays for RowData.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Pipeline execute data driver.
void GetOutputUpdateExtent(int &piece, int &numberOfPieces)
Get the current piece index and the total number of piece in the dataset.
int StartPiece
The range of pieces from the file that will form the UpdatedPiece.
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
int NumberOfPieces
The number of Pieces of data found in the file.
vtkTable * GetOutput(int idx)
Get the reader's output.
int Piece
The piece currently being read.
static vtkXMLTableReader * New()
int NumberOfColumns
The number of columns arrays in the output.
void SetupOutputInformation(vtkInformation *outInfo) override
Setup the output's information.
void SetupEmptyOutput() override
Initialize current output.
vtkIdType GetNumberOfPieces()
Get the number of pieces in the file.
vtkIdType GetNumberOfRows()
Get the number of rows in the output.
int ReadPiece(vtkXMLDataElement *ePiece, int piece)
Setup the piece reader at the given index.
int RowDataNeedToReadTimeStep(vtkXMLDataElement *eNested)
Specify the last time step read, useful to know if we need to read data.
vtkXMLDataElement ** RowElements
The Points element for each piece.
int ReadPiece(vtkXMLDataElement *ePiece)
Setup the current piece reader.
void ReadXMLData() override
Pipeline execute data driver.
void SetupNextPiece()
Initialize the index of the first row to be read in the next piece.
void SetupUpdateExtent(int piece, int numberOfPieces)
Setup the reader as if the given update extent were requested by its output.
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...
void SetupOutputTotals()
Initialize the total number of rows to be read.
vtkTable * GetOutput()
Get the reader's output.
int ReadPieceData(int)
Actually read the current piece data.
void SetupPieces(int numPieces)
Setup the number of pieces to be read and allocate space accordingly.
vtkXMLDataElement ** RowDataElements
The RowData element representations for each piece.
~vtkXMLTableReader() override
int vtkIdType
Definition vtkType.h:363
#define VTK_MARSHALAUTO