VTK
vtkJavaScriptDataWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ParaView
4 Module: vtkJavaScriptDataWriter.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
27#ifndef vtkJavaScriptDataWriter_h
28#define vtkJavaScriptDataWriter_h
29
30#include "vtkIOCoreModule.h" // For export macro
31#include "vtkWriter.h"
32
33class vtkStdString;
34class vtkTable;
35
36class VTKIOCORE_EXPORT vtkJavaScriptDataWriter : public vtkWriter
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent);
42
44
50 vtkSetStringMacro(VariableName);
51 vtkGetStringMacro(VariableName);
53
55
58 vtkSetStringMacro(FileName);
61
63
78 vtkSetMacro(IncludeFieldNames, bool);
79 vtkGetMacro(IncludeFieldNames, bool);
81
82 // Get/Set the OutputStream for writing output.
83 void SetOutputStream(ostream *my_stream);
84 ostream* GetOutputStream();
85
86protected:
89
90 ofstream* OpenFile();
91
92 virtual void WriteData();
93 virtual void WriteTable(vtkTable* table, ostream *stream_ptr);
94
95 // see algorithm for more info.
96 // This writer takes in vtkTable.
98
100 char* FileName;
102 ostream* OutputStream;
103private:
104 vtkJavaScriptDataWriter(const vtkJavaScriptDataWriter&) VTK_DELETE_FUNCTION;
105 void operator=(const vtkJavaScriptDataWriter&) VTK_DELETE_FUNCTION;
106
107};
108
109
110
111#endif
112
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
A Javascript data writer for vtkTable Writes a vtkTable into a Javascript data format.
void SetOutputStream(ostream *my_stream)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkJavaScriptDataWriter * New()
ostream * GetOutputStream()
virtual void WriteData()
virtual void WriteTable(vtkTable *table, ostream *stream_ptr)
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
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.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.