VTK  9.6.1
vtkDelimitedTextWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2009 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
12
13#ifndef vtkDelimitedTextWriter_h
14#define vtkDelimitedTextWriter_h
15
16#include "vtkIOCoreModule.h" // For export macro
17#include "vtkWriter.h"
18
19VTK_ABI_NAMESPACE_BEGIN
20class vtkStdString;
21class vtkTable;
22
23class VTKIOCORE_EXPORT vtkDelimitedTextWriter : public vtkWriter
24{
25public:
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
31
34 vtkSetStringMacro(FieldDelimiter);
35 vtkGetStringMacro(FieldDelimiter);
37
39
43 vtkSetStringMacro(StringDelimiter);
44 vtkGetStringMacro(StringDelimiter);
46
48
54
56
60 vtkSetMacro(UseStringDelimiter, bool);
61 vtkGetMacro(UseStringDelimiter, bool);
63
65
68 vtkSetMacro(WriteToOutputString, bool);
69 vtkGetMacro(WriteToOutputString, bool);
70 vtkBooleanMacro(WriteToOutputString, bool);
72
78
84
86
90 vtkSetMacro(Precision, int);
91 vtkGetMacro(Precision, int);
93
100
102
115 vtkSetMacro(Notation, int);
116 vtkGetMacro(Notation, int);
121
122protected:
125
128
130
131 void WriteData() override;
132 virtual void WriteTable(vtkTable* table);
133
134 // see algorithm for more info.
135 // This writer takes in vtkTable.
136 int FillInputPortInformation(int port, vtkInformation* info) override;
137
138 char* FileName;
142 int Precision = 6;
144
145 ostream* Stream;
146
147private:
149 void operator=(const vtkDelimitedTextWriter&) = delete;
150};
151
152VTK_ABI_NAMESPACE_END
153#endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetNotation(int)
virtual void WriteTable(vtkTable *table)
void WriteData() override
vtkGetFilePathMacro(FileName)
Get/Set the filename for the file.
static vtkDelimitedTextWriter * New()
int FillInputPortInformation(int port, vtkInformation *info) override
~vtkDelimitedTextWriter() override
vtkStdString GetString(vtkStdString string)
Internal method: Returns the "string" with the "StringDelimiter" if UseStringDelimiter is true.
vtkSetFilePathMacro(FileName)
Get/Set the filename for the file.
char * RegisterAndGetOutputString()
This convenience method returns the string, sets the IVAR to nullptr, so that the user is responsible...
a simple class to control print indentation
Definition vtkIndent.h:29
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:60