VTK  9.3.20240423
vtkDataObjectWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
21#ifndef vtkDataObjectWriter_h
22#define vtkDataObjectWriter_h
23
24#include "vtkDataWriter.h" // Needs data because it calls methods on it
25#include "vtkIOLegacyModule.h" // For export macro
26#include "vtkStdString.h" // For string used in api
27#include "vtkWriter.h"
28
29VTK_ABI_NAMESPACE_BEGIN
30class VTKIOLEGACY_EXPORT vtkDataObjectWriter : public vtkWriter
31{
32public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
38
41 void SetFileName(VTK_FILEPATH const char* filename) { this->Writer->SetFileName(filename); }
42 VTK_FILEPATH VTK_FUTURE_CONST char* GetFileName() VTK_FUTURE_CONST
43 {
44 return this->Writer->GetFileName();
45 }
46 void SetHeader(const char* header) { this->Writer->SetHeader(header); }
47 char* GetHeader() { return this->Writer->GetHeader(); }
48 void SetFileType(int type) { this->Writer->SetFileType(type); }
49 int GetFileType() { return this->Writer->GetFileType(); }
50 void SetFileTypeToASCII() { this->Writer->SetFileType(VTK_ASCII); }
51 void SetFileTypeToBinary() { this->Writer->SetFileType(VTK_BINARY); }
52 void SetWriteToOutputString(int b) { this->Writer->SetWriteToOutputString(b); }
53 void WriteToOutputStringOn() { this->Writer->WriteToOutputStringOn(); }
54 void WriteToOutputStringOff() { this->Writer->WriteToOutputStringOff(); }
55 int GetWriteToOutputString() { return this->Writer->GetWriteToOutputString(); }
56 char* GetOutputString() { return this->Writer->GetOutputString(); }
57 vtkStdString GetOutputStdString() { return this->Writer->GetOutputStdString(); }
58 vtkIdType GetOutputStringLength() { return this->Writer->GetOutputStringLength(); }
59 unsigned char* GetBinaryOutputString() { return this->Writer->GetBinaryOutputString(); }
60 void SetFieldDataName(const char* fieldname) { this->Writer->SetFieldDataName(fieldname); }
61 char* GetFieldDataName() { return this->Writer->GetFieldDataName(); }
63
64protected:
67
68 void WriteData() override;
70
71 int FillInputPortInformation(int port, vtkInformation* info) override;
72
73private:
75 void operator=(const vtkDataObjectWriter&) = delete;
76};
77
78VTK_ABI_NAMESPACE_END
79#endif
write vtk field data
~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:108
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
abstract class to write data to file(s)
Definition vtkWriter.h:35
int vtkIdType
Definition vtkType.h:315
#define VTK_FILEPATH
#define VTK_BINARY
Definition vtkWriter.h:32
#define VTK_ASCII
Definition vtkWriter.h:31