VTK
vtkArrayDataWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkArrayDataWriter.h
5 
6 -------------------------------------------------------------------------
7  Copyright 2008 Sandia Corporation.
8  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9  the U.S. Government retains certain rights in this software.
10 -------------------------------------------------------------------------
11 
12  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13  All rights reserved.
14  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15 
16  This software is distributed WITHOUT ANY WARRANTY; without even
17  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  PURPOSE. See the above copyright notice for more information.
19 
20 =========================================================================*/
21 
54 #ifndef vtkArrayDataWriter_h
55 #define vtkArrayDataWriter_h
56 
57 #include "vtkIOCoreModule.h" // For export macro
58 #include "vtkWriter.h"
59 #include "vtkStdString.h" // For string API
60 
61 class vtkArrayData;
62 
63 class VTKIOCORE_EXPORT vtkArrayDataWriter :
64  public vtkWriter
65 {
66 public:
67  static vtkArrayDataWriter *New();
68  vtkTypeMacro(vtkArrayDataWriter, vtkWriter);
69  void PrintSelf(ostream& os, vtkIndent indent);
70 
72 
75  vtkSetStringMacro(FileName);
76  vtkGetStringMacro(FileName);
78 
80 
83  vtkSetMacro(Binary, int);
84  vtkGetMacro(Binary, int);
85  vtkBooleanMacro(Binary, int);
87 
92  { return this->OutputString; }
93 
95 
98  vtkSetMacro(WriteToOutputString, bool);
99  vtkGetMacro(WriteToOutputString, bool);
100  vtkBooleanMacro(WriteToOutputString, bool);
102 
103  virtual int Write(); // This is necessary to get Write() wrapped for scripting languages.
104 
108  bool Write(const vtkStdString& FileName, bool WriteBinary = false);
109 
113  static bool Write(vtkArrayData* array, const vtkStdString& file_name, bool WriteBinary = false);
114 
119  bool Write(ostream& stream, bool WriteBinary = false);
120 
125  static bool Write(vtkArrayData* array, ostream& stream, bool WriteBinary = false);
126 
131  vtkStdString Write(bool WriteBinary);
132 
136  static vtkStdString Write(vtkArrayData* array, bool WriteBinary = false);
137 
138 protected:
141 
143  virtual void WriteData();
144 
145  char* FileName;
146  int Binary;
149 
150 private:
151  vtkArrayDataWriter(const vtkArrayDataWriter&) VTK_DELETE_FUNCTION;
152  void operator=(const vtkArrayDataWriter&) VTK_DELETE_FUNCTION;
153 };
154 
155 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:47
Store vtkAlgorithm input/output information.
Serialize vtkArrayData to a file or stream.
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:52
abstract class to write data to file(s)
Definition: vtkWriter.h:42
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual vtkStdString GetOutputString()
The output string.
virtual int Write()
Write data to output.
static vtkAlgorithm * New()
virtual void WriteData()=0
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.