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 =========================================================================*/
23 #ifndef vtkXMLTableWriter_h
24 #define vtkXMLTableWriter_h
25 
26 #include "vtkIOXMLModule.h" // For export macro
27 #include "vtkXMLWriter.h"
28 
29 class vtkTable;
30 
31 class VTKIOXML_EXPORT vtkXMLTableWriter : public vtkXMLWriter
32 {
33 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36  static vtkXMLTableWriter* New();
37 
39 
43  vtkSetMacro(NumberOfPieces, int);
44  vtkGetMacro(NumberOfPieces, int);
46 
48 
52  vtkSetMacro(WritePiece, int);
53  vtkGetMacro(WritePiece, int);
55 
60 
61 protected:
63  ~vtkXMLTableWriter() override;
64 
66 
67  vtkTable* GetInputAsTable();
68  const char* GetDataSetName()
69  override; // vtkTable isn't a DataSet but it's used by vtkXMLWriter
70 
74  const char* GetDefaultFileExtension() override;
75 
76  void SetInputUpdateExtent(int piece, int numPieces);
77 
78  int WriteHeader();
79  int WriteAPiece();
80  int WriteFooter();
81 
82  void AllocatePositionArrays();
83  void DeletePositionArrays();
84 
85  int WriteInlineMode(vtkIndent indent);
86  void WriteInlinePieceAttributes();
87  void WriteInlinePiece(vtkIndent indent);
88 
89  void WriteAppendedPieceAttributes(int index);
90  void WriteAppendedPiece(int index, vtkIndent indent);
91  void WriteAppendedPieceData(int index);
92 
93  void WriteRowDataAppended(
94  vtkDataSetAttributes* ds, vtkIndent indent, OffsetsManagerGroup* dsManager);
95 
96  void WriteRowDataAppendedData(
97  vtkDataSetAttributes* ds, int timestep, OffsetsManagerGroup* pdManager);
98 
99  void WriteRowDataInline(vtkDataSetAttributes* ds, vtkIndent indent);
100 
105 
110 
114  vtkTypeInt64* NumberOfColsPositions;
115  vtkTypeInt64* NumberOfRowsPositions;
116 
121 
123 
124 private:
125  vtkXMLTableWriter(const vtkXMLTableWriter&) = delete;
126  void operator=(const vtkXMLTableWriter&) = delete;
127 };
128 
129 #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:59
a simple class to control print indentation
Definition: vtkIndent.h:33
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:62
int NumberOfPieces
Number of pieces used for streaming.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
Write VTK XML Table files.