VTK  9.7.0
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
95 {
99 };
100
102
115 vtkSetMacro(Notation, int);
116 vtkGetMacro(Notation, int);
121
122protected:
125
128
130
131 bool WriteDataAndReturn() override;
132
133 // see algorithm for more info.
134 // This writer takes in vtkTable.
135 int FillInputPortInformation(int port, vtkInformation* info) override;
136
137 char* FileName;
141 int Precision = 6;
143
144 ostream* Stream;
145
146private:
148 void operator=(const vtkDelimitedTextWriter&) = delete;
149
150 bool WriteTable(vtkTable* table);
151};
152
153VTK_ABI_NAMESPACE_END
154#endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetNotation(int)
bool WriteDataAndReturn() 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