VTK  9.2.6
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=========================================================================*/
32
33#ifndef vtkDataObjectWriter_h
34#define vtkDataObjectWriter_h
35
36#include "vtkDataWriter.h" // Needs data because it calls methods on it
37#include "vtkIOLegacyModule.h" // For export macro
38#include "vtkStdString.h" // For string used in api
39#include "vtkWriter.h"
40
41class VTKIOLEGACY_EXPORT vtkDataObjectWriter : public vtkWriter
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
52 void SetFileName(VTK_FILEPATH const char* filename) { this->Writer->SetFileName(filename); }
53 VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST
54 {
55 return this->Writer->GetFileName();
56 }
57 void SetHeader(const char* header) { this->Writer->SetHeader(header); }
58 char* GetHeader() { return this->Writer->GetHeader(); }
59 void SetFileType(int type) { this->Writer->SetFileType(type); }
60 int GetFileType() { return this->Writer->GetFileType(); }
61 void SetFileTypeToASCII() { this->Writer->SetFileType(VTK_ASCII); }
62 void SetFileTypeToBinary() { this->Writer->SetFileType(VTK_BINARY); }
63 void SetWriteToOutputString(int b) { this->Writer->SetWriteToOutputString(b); }
64 void WriteToOutputStringOn() { this->Writer->WriteToOutputStringOn(); }
65 void WriteToOutputStringOff() { this->Writer->WriteToOutputStringOff(); }
66 int GetWriteToOutputString() { return this->Writer->GetWriteToOutputString(); }
67 char* GetOutputString() { return this->Writer->GetOutputString(); }
68 vtkStdString GetOutputStdString() { return this->Writer->GetOutputStdString(); }
69 vtkIdType GetOutputStringLength() { return this->Writer->GetOutputStringLength(); }
70 unsigned char* GetBinaryOutputString() { return this->Writer->GetBinaryOutputString(); }
71 void SetFieldDataName(const char* fieldname) { this->Writer->SetFieldDataName(fieldname); }
72 char* GetFieldDataName() { return this->Writer->GetFieldDataName(); }
74
75protected:
78
79 void WriteData() override;
81
82 int FillInputPortInformation(int port, vtkInformation* info) override;
83
84private:
86 void operator=(const vtkDataObjectWriter&) = delete;
87};
88
89#endif
~vtkDataObjectWriter() override
char * GetOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
char * GetFieldDataName()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void WriteToOutputStringOn()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void SetWriteToOutputString(int b)
Methods delegated to vtkDataWriter, see vtkDataWriter.
char * GetHeader()
Methods delegated to vtkDataWriter, see vtkDataWriter.
VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
Methods delegated to vtkDataWriter, see vtkDataWriter.
int GetWriteToOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
static vtkDataObjectWriter * New()
void WriteToOutputStringOff()
Methods delegated to vtkDataWriter, see vtkDataWriter.
vtkStdString GetOutputStdString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
int GetFileType()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void SetFieldDataName(const char *fieldname)
Methods delegated to vtkDataWriter, see vtkDataWriter.
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.
unsigned char * GetBinaryOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void WriteData() override
vtkIdType GetOutputStringLength()
Methods delegated to vtkDataWriter, see vtkDataWriter.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetHeader(const char *header)
Methods delegated to vtkDataWriter, see vtkDataWriter.
void SetFileTypeToBinary()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void SetFileName(VTK_FILEPATH const char *filename)
Methods delegated to vtkDataWriter, see vtkDataWriter.
void SetFileTypeToASCII()
Methods delegated to vtkDataWriter, see vtkDataWriter.
helper class for objects that write VTK data files
a simple class to control print indentation
Definition vtkIndent.h:40
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
int vtkIdType
Definition vtkType.h:332
#define VTK_FILEPATH
#define VTK_BINARY
Definition vtkWriter.h:43
#define VTK_ASCII
Definition vtkWriter.h:42