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 
53 #ifndef __vtkArrayDataWriter_h
54 #define __vtkArrayDataWriter_h
55 
56 #include "vtkWriter.h"
57 #include "vtkStdString.h" // For string API
58 
59 class vtkArrayData;
60 
62  public vtkWriter
63 {
64 public:
65  static vtkArrayDataWriter *New();
66  vtkTypeMacro(vtkArrayDataWriter, vtkWriter);
67  void PrintSelf(ostream& os, vtkIndent indent);
68 
70 
72  vtkSetStringMacro(FileName);
73  vtkGetStringMacro(FileName);
75 
77 
79  vtkSetMacro(Binary, int);
80  vtkGetMacro(Binary, int);
81  vtkBooleanMacro(Binary, int);
83 
85 
86  virtual vtkStdString GetOutputString()
87  { return this->OutputString; }
89 
91 
93  vtkSetMacro(WriteToOutputString, bool);
94  vtkGetMacro(WriteToOutputString, bool);
95  vtkBooleanMacro(WriteToOutputString, bool);
97 
98  virtual int Write(); // This is necessary to get Write() wrapped for scripting languages.
99 
102  bool Write(const vtkStdString& FileName, bool WriteBinary = false);
103 
105  static bool Write(vtkArrayData* array, const vtkStdString& file_name, bool WriteBinary = false);
106 
107 //BTX
111  bool Write(ostream& stream, bool WriteBinary = false);
112 
114 
117  static bool Write(vtkArrayData* array, ostream& stream, bool WriteBinary = false);
118 //ETX
120 
124  vtkStdString Write(bool WriteBinary);
125 
127  static vtkStdString Write(vtkArrayData* array, bool WriteBinary = false);
128 
129 protected:
132 
134  virtual void WriteData();
135 
136  char* FileName;
137  int Binary;
140 
141 private:
142  vtkArrayDataWriter(const vtkArrayDataWriter&); // Not implemented.
143  void operator=(const vtkArrayDataWriter&); // Not implemented.
144 };
145 
146 #endif