VTK
vtkXMLTableWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLTableWriter.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 =========================================================================*/
26 #ifndef vtkXMLTableWriter_h
27 #define vtkXMLTableWriter_h
28 
29 #include "vtkIOXMLModule.h" // For export macro
30 #include "vtkXMLWriter.h"
31 
32 class vtkTable;
33 
34 class VTKIOXML_EXPORT vtkXMLTableWriter : public vtkXMLWriter
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39  static vtkXMLTableWriter* New();
40 
42 
46  vtkSetMacro(NumberOfPieces, int);
47  vtkGetMacro(NumberOfPieces, int);
49 
51 
55  vtkSetMacro(WritePiece, int);
56  vtkGetMacro(WritePiece, int);
58 
63 
64 protected:
66  ~vtkXMLTableWriter() override;
67 
69 
70  vtkTable* GetInputAsTable();
71  const char* GetDataSetName()
72  override; // vtkTable isn't a DataSet but it's used by vtkXMLWriter
73 
77  const char* GetDefaultFileExtension() override;
78 
79  void SetInputUpdateExtent(int piece, int numPieces);
80 
81  int WriteHeader();
82  int WriteAPiece();
83  int WriteFooter();
84 
85  void AllocatePositionArrays();
86  void DeletePositionArrays();
87 
88  int WriteInlineMode(vtkIndent indent);
89  void WriteInlinePieceAttributes();
90  void WriteInlinePiece(vtkIndent indent);
91 
92  void WriteAppendedPieceAttributes(int index);
93  void WriteAppendedPiece(int index, vtkIndent indent);
94  void WriteAppendedPieceData(int index);
95 
96  void WriteRowDataAppended(
97  vtkDataSetAttributes* ds, vtkIndent indent, OffsetsManagerGroup* dsManager);
98 
99  void WriteRowDataAppendedData(
100  vtkDataSetAttributes* ds, int timestep, OffsetsManagerGroup* pdManager);
101 
102  void WriteRowDataInline(vtkDataSetAttributes* ds, vtkIndent indent);
103 
108 
113 
117  vtkTypeInt64* NumberOfColsPositions;
118  vtkTypeInt64* NumberOfRowsPositions;
119 
124 
126 
127 private:
128  vtkXMLTableWriter(const vtkXMLTableWriter&) = delete;
129  void operator=(const vtkXMLTableWriter&) = delete;
130 };
131 
132 #endif
virtual const char * GetDataSetName()=0
vtkTypeInt64 * NumberOfColsPositions
Positions of attributes for each piece.
Store vtkAlgorithm input/output information.
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
OffsetsManagerArray * RowsOM
For TimeStep support.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeInt64 * NumberOfRowsPositions
int WritePiece
Which piece to write, if not all.
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:62
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
represent and manipulate attribute data in a dataset
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
int NumberOfPieces
Number of pieces used for streaming.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
Write VTK XML Table files.