VTK  9.2.6
vtkXMLTableReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLTableReader.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 vtkXMLTableReader_h
28 #define vtkXMLTableReader_h
29 
30 #include "vtkIOXMLModule.h" // For export macro
31 #include "vtkXMLReader.h"
32 
33 #include <map> // needed for std::map
34 
35 class vtkCellArray;
36 class vtkIdTypeArray;
38 class vtkTable;
39 
40 class VTKIOXML_EXPORT vtkXMLTableReader : public vtkXMLReader
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45  static vtkXMLTableReader* New();
46 
48 
51  vtkTable* GetOutput();
52  vtkTable* GetOutput(int idx);
54 
58  vtkIdType GetNumberOfRows();
59 
63  vtkIdType GetNumberOfPieces();
64 
71  void SetupUpdateExtent(int piece, int numberOfPieces);
72 
77  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
78 
79 protected:
81  ~vtkXMLTableReader() override;
82 
86  int ColumnIsEnabled(vtkXMLDataElement* eRowData);
87 
88  void DestroyPieces();
89 
93  const char* GetDataSetName() override;
94 
98  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
99 
103  int RowDataNeedToReadTimeStep(vtkXMLDataElement* eNested);
104 
108  void SetupEmptyOutput() override;
109 
113  void SetupOutputTotals();
114 
118  void SetupNextPiece();
119 
123  void SetupOutputData() override;
124 
128  void SetupOutputInformation(vtkInformation* outInfo) override;
129 
133  void SetupPieces(int numPieces);
134 
138  void ReadXMLData() override;
139 
143  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
144 
148  int ReadPiece(vtkXMLDataElement* ePiece, int piece);
149 
153  int ReadPiece(vtkXMLDataElement* ePiece);
154 
158  int ReadPieceData(int);
159 
160  int FillOutputPortInformation(int, vtkInformation*) override;
161 
171  int EndPiece;
174 
180 
185 
189  int Piece;
190 
195 
201 
202 private:
203  std::map<std::string, int> RowDataTimeStep;
204  std::map<std::string, vtkTypeInt64> RowDataOffset;
205 
206  vtkXMLTableReader(const vtkXMLTableReader&) = delete;
207  void operator=(const vtkXMLTableReader&) = delete;
208 };
209 
210 #endif
virtual const char * GetDataSetName()=0
virtual void SetupEmptyOutput()=0
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
int UpdatedPiece
The update request.
Read VTK XML Table files.
int NumberOfPieces
The number of Pieces of data found in the file.
int NumberOfColumns
The number of columns arrays in the output.
dynamic, self-adjusting array of vtkIdType
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:332
vtkXMLDataElement ** RowDataElements
The RowData element representations for each piece.
int Piece
The piece currently being read.
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:39
vtkIdType * NumberOfRows
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:227
dynamic, self-adjusting array of unsigned char
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkXMLDataElement ** RowElements
The Points element for each piece.
object to represent cell connectivity
Definition: vtkCellArray.h:186
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:73
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:161
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkAlgorithm * New()
int StartPiece
The range of pieces from the file that will form the UpdatedPiece.
Superclass for VTK's XML format readers.
Definition: vtkXMLReader.h:49
virtual void SetupOutputData()