VTK  9.0.1
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 =========================================================================*/
24 #ifndef vtkXMLTableReader_h
25 #define vtkXMLTableReader_h
26 
27 #include "vtkIOXMLModule.h" // For export macro
28 #include "vtkXMLReader.h"
29 
30 #include <map> // needed for std::map
31 
32 class vtkCellArray;
33 class vtkIdTypeArray;
35 class vtkTable;
36 
37 class VTKIOXML_EXPORT vtkXMLTableReader : public vtkXMLReader
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42  static vtkXMLTableReader* New();
43 
45 
48  vtkTable* GetOutput();
49  vtkTable* GetOutput(int idx);
51 
55  vtkIdType GetNumberOfRows();
56 
60  vtkIdType GetNumberOfPieces();
61 
68  void SetupUpdateExtent(int piece, int numberOfPieces);
69 
74  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
75 
76 protected:
78  ~vtkXMLTableReader() override;
79 
83  int ColumnIsEnabled(vtkXMLDataElement* eRowData);
84 
85  void DestroyPieces();
86 
90  const char* GetDataSetName() override;
91 
95  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
96 
100  int RowDataNeedToReadTimeStep(vtkXMLDataElement* eNested);
101 
105  void SetupEmptyOutput() override;
106 
110  void SetupOutputTotals();
111 
115  void SetupNextPiece();
116 
120  void SetupOutputData() override;
121 
125  void SetupOutputInformation(vtkInformation* outInfo) override;
126 
130  void SetupPieces(int numPieces);
131 
135  void ReadXMLData() override;
136 
140  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
141 
145  int ReadPiece(vtkXMLDataElement* ePiece, int piece);
146 
150  int ReadPiece(vtkXMLDataElement* ePiece);
151 
155  int ReadPieceData(int);
156 
157  int FillOutputPortInformation(int, vtkInformation*) override;
158 
168  int EndPiece;
171 
177 
182 
186  int Piece;
187 
192 
198 
199 private:
200  std::map<std::string, int> RowDataTimeStep;
201  std::map<std::string, vtkTypeInt64> RowDataOffset;
202 
203  vtkXMLTableReader(const vtkXMLTableReader&) = delete;
204  void operator=(const vtkXMLTableReader&) = delete;
205 };
206 
207 #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:338
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:33
vtkIdType * NumberOfRows
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:201
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:179
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:135
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&#39;s XML format readers.
Definition: vtkXMLReader.h:43
virtual void SetupOutputData()