VTK  9.2.6
vtkDelimitedTextWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ParaView
4 Module: vtkDelimitedTextWriter.h
5
6 Copyright (c) Kitware, Inc.
7 All rights reserved.
8 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2009 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
20
26
27#ifndef vtkDelimitedTextWriter_h
28#define vtkDelimitedTextWriter_h
29
30#include "vtkIOCoreModule.h" // For export macro
31#include "vtkWriter.h"
32
33class vtkStdString;
34class vtkTable;
35
36class VTKIOCORE_EXPORT vtkDelimitedTextWriter : public vtkWriter
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
44
47 vtkSetStringMacro(FieldDelimiter);
48 vtkGetStringMacro(FieldDelimiter);
50
52
56 vtkSetStringMacro(StringDelimiter);
57 vtkGetStringMacro(StringDelimiter);
59
61
67
69
73 vtkSetMacro(UseStringDelimiter, bool);
74 vtkGetMacro(UseStringDelimiter, bool);
76
78
81 vtkSetMacro(WriteToOutputString, bool);
82 vtkGetMacro(WriteToOutputString, bool);
83 vtkBooleanMacro(WriteToOutputString, bool);
85
91
97
98protected:
101
104
106
107 void WriteData() override;
108 virtual void WriteTable(vtkTable* table);
109
110 // see algorithm for more info.
111 // This writer takes in vtkTable.
112 int FillInputPortInformation(int port, vtkInformation* info) override;
113
114 char* FileName;
118
119 ostream* Stream;
120
121private:
123 void operator=(const vtkDelimitedTextWriter&) = delete;
124};
125
126#endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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
Fill the input port information objects for this algorithm.
~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:40
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:74