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
vtkXMLTableWriter::CurrentPiece
int CurrentPiece
Definition: vtkXMLTableWriter.h:125
vtkXMLWriter::GetDefaultFileExtension
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:59
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkXMLWriter.h
vtkXMLTableWriter::RowsOM
OffsetsManagerArray * RowsOM
For TimeStep support.
Definition: vtkXMLTableWriter.h:123
vtkXMLTableWriter::NumberOfColsPositions
vtkTypeInt64 * NumberOfColsPositions
Positions of attributes for each piece.
Definition: vtkXMLTableWriter.h:117
vtkX3D::port
Definition: vtkX3D.h:447
vtkXMLTableWriter::NumberOfRowsPositions
vtkTypeInt64 * NumberOfRowsPositions
Definition: vtkXMLTableWriter.h:118
vtkXMLWriter
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:62
vtkXMLTableWriter::WritePiece
int WritePiece
Which piece to write, if not all.
Definition: vtkXMLTableWriter.h:112
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkXMLWriter::GetDataSetName
virtual const char * GetDataSetName()=0
OffsetsManagerGroup
Definition: vtkXMLOffsetsManager.h:109
vtkXMLTableWriter
Write VTK XML Table files.
Definition: vtkXMLTableWriter.h:34
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkAlgorithm::New
static vtkAlgorithm * New()
OffsetsManagerArray
Definition: vtkXMLOffsetsManager.h:158
vtkXMLTableWriter::NumberOfPieces
int NumberOfPieces
Number of pieces used for streaming.
Definition: vtkXMLTableWriter.h:107
vtkX3D::index
Definition: vtkX3D.h:246
vtkXMLWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLWriter::ProcessRequest
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...