VTK
vtkDataObjectWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataObjectWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
30 #ifndef vtkDataObjectWriter_h
31 #define vtkDataObjectWriter_h
32 
33 #include "vtkIOLegacyModule.h" // For export macro
34 #include "vtkWriter.h"
35 #include "vtkDataWriter.h" // Needs data because it calls methods on it
36 #include "vtkStdString.h" // For string used in api
37 
38 class VTKIOLEGACY_EXPORT vtkDataObjectWriter : public vtkWriter
39 {
40 public:
41  static vtkDataObjectWriter *New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  void SetFileName(const char *filename) {this->Writer->SetFileName(filename);};
50  char *GetFileName() {return this->Writer->GetFileName();};
51  void SetHeader(const char *header) {this->Writer->SetHeader(header);};
52  char *GetHeader() {return this->Writer->GetHeader();};
53  void SetFileType(int type) {this->Writer->SetFileType(type);};
54  int GetFileType() {return this->Writer->GetFileType();};
55  void SetFileTypeToASCII() {this->Writer->SetFileType(VTK_ASCII);};
56  void SetFileTypeToBinary() {this->Writer->SetFileType(VTK_BINARY);};
57  void SetWriteToOutputString(int b) {this->Writer->SetWriteToOutputString(b);};
58  void WriteToOutputStringOn() {this->Writer->WriteToOutputStringOn();};
59  void WriteToOutputStringOff() {this->Writer->WriteToOutputStringOff();};
60  int GetWriteToOutputString() {return this->Writer->GetWriteToOutputString();};
61  char* GetOutputString() {return this->Writer->GetOutputString();};
62  vtkStdString GetOutputStdString() {return this->Writer->GetOutputStdString();};
63  int GetOutputStringLength() {return this->Writer->GetOutputStringLength();};
64  unsigned char* GetBinaryOutputString() {return this->Writer->GetBinaryOutputString();};
65  void SetFieldDataName(const char *fieldname) {this->Writer->SetFieldDataName(fieldname);};
66  char *GetFieldDataName() {return this->Writer->GetFieldDataName();};
68 
69 protected:
71  ~vtkDataObjectWriter() override;
72 
73  void WriteData() override;
75 
77 
78 private:
80  void operator=(const vtkDataObjectWriter&) = delete;
81 };
82 
83 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
void WriteToOutputStringOn()
Methods delegated to vtkDataWriter, see vtkDataWriter.
Store vtkAlgorithm input/output information.
char * GetHeader()
Methods delegated to vtkDataWriter, see vtkDataWriter.
helper class for objects that write vtk data files
Definition: vtkDataWriter.h:45
#define VTK_ASCII
Definition: vtkWriter.h:39
void SetWriteToOutputString(int b)
Methods delegated to vtkDataWriter, see vtkDataWriter.
abstract class to write data to file(s)
Definition: vtkWriter.h:42
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetFileType(int type)
Methods delegated to vtkDataWriter, see vtkDataWriter.
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetFileTypeToBinary()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void SetHeader(const char *header)
Methods delegated to vtkDataWriter, see vtkDataWriter.
#define VTK_BINARY
Definition: vtkWriter.h:40
void SetFieldDataName(const char *fieldname)
Methods delegated to vtkDataWriter, see vtkDataWriter.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
int GetOutputStringLength()
Methods delegated to vtkDataWriter, see vtkDataWriter.
char * GetFieldDataName()
Methods delegated to vtkDataWriter, see vtkDataWriter.
vtkStdString GetOutputStdString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void SetFileTypeToASCII()
Methods delegated to vtkDataWriter, see vtkDataWriter.
char * GetOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
write vtk field data
void SetFileName(const char *filename)
Methods delegated to vtkDataWriter, see vtkDataWriter.
char * GetFileName()
Methods delegated to vtkDataWriter, see vtkDataWriter.
vtkDataWriter * Writer
static vtkAlgorithm * New()
virtual void WriteData()=0
unsigned char * GetBinaryOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
int GetFileType()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void WriteToOutputStringOff()
Methods delegated to vtkDataWriter, see vtkDataWriter.
int GetWriteToOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.