VTK  9.3.1
vtkXMLTableWriter.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
14 #ifndef vtkXMLTableWriter_h
15 #define vtkXMLTableWriter_h
16 
17 #include "vtkIOXMLModule.h" // For export macro
18 #include "vtkXMLWriter.h"
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkTable;
22 
23 class VTKIOXML_EXPORT vtkXMLTableWriter : public vtkXMLWriter
24 {
25 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28  static vtkXMLTableWriter* New();
29 
31 
35  vtkSetMacro(NumberOfPieces, int);
36  vtkGetMacro(NumberOfPieces, int);
38 
40 
44  vtkSetMacro(WritePiece, int);
45  vtkGetMacro(WritePiece, int);
47 
53 
54 protected:
56  ~vtkXMLTableWriter() override;
57 
59 
60  vtkTable* GetInputAsTable();
61  const char* GetDataSetName() override; // vtkTable isn't a DataSet but it's used by vtkXMLWriter
62 
66  const char* GetDefaultFileExtension() override;
67 
68  void SetInputUpdateExtent(int piece, int numPieces);
69 
70  int WriteHeader();
71  int WriteAPiece();
72  int WriteFooter();
73 
74  void AllocatePositionArrays();
75  void DeletePositionArrays();
76 
77  int WriteInlineMode(vtkIndent indent);
78  void WriteInlinePieceAttributes();
79  void WriteInlinePiece(vtkIndent indent);
80 
81  void WriteAppendedPieceAttributes(int index);
82  void WriteAppendedPiece(int index, vtkIndent indent);
83  void WriteAppendedPieceData(int index);
84 
85  void WriteRowDataAppended(
86  vtkDataSetAttributes* ds, vtkIndent indent, OffsetsManagerGroup* dsManager);
87 
88  void WriteRowDataAppendedData(
89  vtkDataSetAttributes* ds, int timestep, OffsetsManagerGroup* pdManager);
90 
91  void WriteRowDataInline(vtkDataSetAttributes* ds, vtkIndent indent);
92 
97 
102 
106  vtkTypeInt64* NumberOfColsPositions;
107  vtkTypeInt64* NumberOfRowsPositions;
108 
113 
115 
116 private:
117  vtkXMLTableWriter(const vtkXMLTableWriter&) = delete;
118  void operator=(const vtkXMLTableWriter&) = delete;
119 };
120 
121 VTK_ABI_NAMESPACE_END
122 #endif
virtual const char * GetDataSetName()=0
vtkTypeInt64 * NumberOfColsPositions
Positions of attributes for each piece.
Store vtkAlgorithm input/output information.
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
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
int vtkTypeBool
Definition: vtkABI.h:64
int WritePiece
Which piece to write, if not all.
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:53
a simple class to control print indentation
Definition: vtkIndent.h:28
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:58
int NumberOfPieces
Number of pieces used for streaming.
Store zero or more vtkInformation instances.
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
static vtkAlgorithm * New()
Write VTK XML Table files.