VTK  9.3.1
vtkXMLPTableReader.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
20 #ifndef vtkXMLPTableReader_h
21 #define vtkXMLPTableReader_h
22 
23 #include "vtkIOXMLModule.h" // For export macro
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkTable;
28 class vtkXMLTableReader;
29 
30 class VTKIOXML_EXPORT vtkXMLPTableReader : public vtkXMLPDataObjectReader
31 {
32 public:
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35  static vtkXMLPTableReader* New();
36 
38 
41  vtkTable* GetOutput();
42  vtkTable* GetOutput(int idx);
44 
49  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
50 
55 
60  const char* GetColumnArrayName(int index);
61 
63 
67  int GetColumnArrayStatus(const char* name);
68  void SetColumnArrayStatus(const char* name, int status);
70 
75  vtkGetObjectMacro(ColumnSelection, vtkDataArraySelection);
76 
77 protected:
79  ~vtkXMLPTableReader() override;
80 
84  const char* GetDataSetName() override;
85 
89  vtkIdType GetNumberOfRows();
90 
95  virtual vtkIdType GetNumberOfRowsInPiece(int piece);
96 
97  vtkTable* GetOutputAsTable();
98 
99  vtkTable* GetPieceInputAsTable(int piece);
100 
104  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
105 
109  void SetupEmptyOutput() override;
110 
114  void SetupOutputData() override;
115 
119  void SetupOutputInformation(vtkInformation* outInfo) override;
120 
124  void SetupOutputTotals();
125 
129  void SetupNextPiece();
130 
134  void SetupPieces(int numPieces) override;
135 
139  void SetupUpdateExtent(int piece, int numberOfPieces);
140 
144  void ReadXMLData() override;
145 
149  int CanReadPiece(int index) override;
150 
154  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
155 
159  void DestroyPieces() override;
160 
162 
166  int ReadPiece(vtkXMLDataElement* ePiece) override;
167 
171  int ReadPieceData(int index);
172 
176  int ReadPieceData();
177 
181  vtkXMLTableReader* CreatePieceReader();
182 
183  int FillOutputPortInformation(int, vtkInformation*) override;
184 
185  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
186  vtkInformationVector* outputVector) override;
187 
191  void PieceProgressCallback() override;
192 
196  int ColumnIsEnabled(vtkXMLDataElement* elementRowData);
197 
198  int GetNumberOfRowArrays();
199  const char* GetRowArrayName(int index);
200 
206 
211  int EndPiece;
214 
216 
221 
223 
224 private:
225  vtkXMLPTableReader(const vtkXMLPTableReader&) = delete;
226  void operator=(const vtkXMLPTableReader&) = delete;
227 };
228 
229 VTK_ABI_NAMESPACE_END
230 #endif
vtkXMLDataElement * PRowElement
The PRowData element representations.
vtkDataArraySelection * ColumnSelection
virtual const char * GetDataSetName()=0
Get the name of the data set being read.
virtual void SetupEmptyOutput()=0
Setup the output with no data available.
virtual int CanReadPiece(int index)=0
Whether or not the current reader can read the current piece.
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
virtual void PieceProgressCallback()=0
Callback registered with the PieceProgressObserver.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int UpdatePieceId
The update request.
Read VTK XML Table files.
const char * GetColumnArrayName(int index)
Get the name of the point, cell, column or time array with the given index in the input...
virtual void ReadXMLData()
Pipeline execution methods to be defined by subclass.
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
void SetColumnArrayStatus(const char *name, int status)
Get/Set whether the point, cell, column or time array with the given name is to be read...
Store on/off settings for data arrays, etc.
void SetupOutputData() override
Initialize the output data.
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Setup the output's information.
Definition: vtkXMLReader.h:228
Superclass for PVTK XML file readers.
Read PVTK XML Table files.
virtual void SetupPieces(int numPieces)
Setup the number of pieces to be read and allocate space accordingly.
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
Read the primary element from the file.
virtual void DestroyPieces()
Delete all piece readers and related information.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:58
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:150
vtkXMLTableReader ** PieceReaders
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
int GetColumnArrayStatus(const char *name)
Get/Set whether the point, cell, column or time array with the given name is to be read...
int GetNumberOfColumnArrays()
Get the number of point, cell or column arrays available in the input.
int StartPiece
The range of pieces from the file that will form the UpdatePiece.
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.