VTK
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 class vtkCellArray;
34 class vtkIdTypeArray;
36 class vtkTable;
37 
38 class VTKIOXML_EXPORT vtkXMLTableReader : public vtkXMLReader
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43  static vtkXMLTableReader* New();
44 
46 
49  vtkTable* GetOutput();
50  vtkTable* GetOutput(int idx);
52 
56  vtkIdType GetNumberOfRows();
57 
61  vtkIdType GetNumberOfPieces();
62 
69  void SetupUpdateExtent(int piece, int numberOfPieces);
70 
75  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
76 
77 protected:
79  ~vtkXMLTableReader() override;
80 
84  int ColumnIsEnabled(vtkXMLDataElement* eRowData);
85 
86  void DestroyPieces();
87 
91  const char* GetDataSetName() override;
92 
96  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
97 
101  int RowDataNeedToReadTimeStep(vtkXMLDataElement* eNested);
102 
106  void SetupEmptyOutput() override;
107 
111  void SetupOutputTotals();
112 
116  void SetupNextPiece();
117 
121  void SetupOutputData() override;
122 
126  void SetupOutputInformation(vtkInformation* outInfo) override;
127 
131  void SetupPieces(int numPieces);
132 
136  void ReadXMLData() override;
137 
141  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
142 
146  int ReadPiece(vtkXMLDataElement* ePiece, int piece);
147 
151  int ReadPiece(vtkXMLDataElement* ePiece);
152 
156  int ReadPieceData(int);
157 
158  int FillOutputPortInformation(int, vtkInformation*) override;
159 
169  int EndPiece;
172 
178 
183 
187  int Piece;
188 
193 
199 
201  vtkTypeInt64* RowDataOffset;
202 
203 private:
204  vtkXMLTableReader(const vtkXMLTableReader&) = delete;
205  void operator=(const vtkXMLTableReader&) = delete;
206 };
207 
208 #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:347
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:207
vtkTypeInt64 * RowDataOffset
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:50
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:136
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:43
virtual void SetupOutputData()