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 "vtkIOCoreModule.h" // For export macro
57 #include "vtkWriter.h"
58 #include "vtkStdString.h" // For string API
59 
60 class vtkArrayData;
61 
63  public vtkWriter
64 {
65 public:
66  static vtkArrayDataWriter *New();
67  vtkTypeMacro(vtkArrayDataWriter, vtkWriter);
68  void PrintSelf(ostream& os, vtkIndent indent);
69 
71 
73  vtkSetStringMacro(FileName);
74  vtkGetStringMacro(FileName);
76 
78 
80  vtkSetMacro(Binary, int);
81  vtkGetMacro(Binary, int);
82  vtkBooleanMacro(Binary, int);
84 
86 
88  { return this->OutputString; }
90 
92 
94  vtkSetMacro(WriteToOutputString, bool);
95  vtkGetMacro(WriteToOutputString, bool);
96  vtkBooleanMacro(WriteToOutputString, bool);
98 
99  virtual int Write(); // This is necessary to get Write() wrapped for scripting languages.
100 
103  bool Write(const vtkStdString& FileName, bool WriteBinary = false);
104 
106  static bool Write(vtkArrayData* array, const vtkStdString& file_name, bool WriteBinary = false);
107 
108 //BTX
112  bool Write(ostream& stream, bool WriteBinary = false);
113 
115 
118  static bool Write(vtkArrayData* array, ostream& stream, bool WriteBinary = false);
119 //ETX
121 
125  vtkStdString Write(bool WriteBinary);
126 
128  static vtkStdString Write(vtkArrayData* array, bool WriteBinary = false);
129 
130 protected:
133 
135  virtual void WriteData();
136 
137  char* FileName;
138  int Binary;
141 
142 private:
143  vtkArrayDataWriter(const vtkArrayDataWriter&); // Not implemented.
144  void operator=(const vtkArrayDataWriter&); // Not implemented.
145 };
146 
147 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
Store vtkAlgorithm input/output information.
Serialize vtkArrayData to a file or stream.
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:51
#define VTKIOCORE_EXPORT
abstract class to write data to file(s)
Definition: vtkWriter.h:44
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual vtkStdString GetOutputString()
virtual int Write()
static vtkAlgorithm * New()
virtual void WriteData()=0
void PrintSelf(ostream &os, vtkIndent indent)