VTK
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
30#ifndef vtkDelimitedTextWriter_h
31#define vtkDelimitedTextWriter_h
32
33#include "vtkIOCoreModule.h" // For export macro
34#include "vtkWriter.h"
35
36class vtkStdString;
37class vtkTable;
38
39class VTKIOCORE_EXPORT vtkDelimitedTextWriter : public vtkWriter
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent);
45
47
50 vtkSetStringMacro(FieldDelimiter);
51 vtkGetStringMacro(FieldDelimiter);
53
55
59 vtkSetStringMacro(StringDelimiter);
60 vtkGetStringMacro(StringDelimiter);
62
64
67 vtkSetStringMacro(FileName);
70
72
76 vtkSetMacro(UseStringDelimiter, bool);
77 vtkGetMacro(UseStringDelimiter, bool);
79
81
84 vtkSetMacro(WriteToOutputString,bool);
85 vtkGetMacro(WriteToOutputString,bool);
86 vtkBooleanMacro(WriteToOutputString,bool);
88
94
100
101protected:
104
107
109
110 virtual void WriteData();
111 virtual void WriteTable(vtkTable* rectilinearGrid);
112
113 // see algorithm for more info.
114 // This writer takes in vtkTable.
116
117 char* FileName;
121
122 ostream* Stream;
123
124private:
125 vtkDelimitedTextWriter(const vtkDelimitedTextWriter&) VTK_DELETE_FUNCTION;
126 void operator=(const vtkDelimitedTextWriter&) VTK_DELETE_FUNCTION;
127};
128
129
130
131#endif
132
Delimited text writer for vtkTable Writes a vtkTable as a delimited text file (such as CSV).
static vtkDelimitedTextWriter * New()
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual void WriteTable(vtkTable *rectilinearGrid)
vtkStdString GetString(vtkStdString string)
Internal method: Returns the "string" with the "StringDelimiter" if UseStringDelimiter is true.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
char * RegisterAndGetOutputString()
This convenience method returns the string, sets the IVAR to NULL, so that the user is responsible fo...
virtual void WriteData()
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
abstract class to write data to file(s)
Definition: vtkWriter.h:43
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.