VTK  9.3.20240416
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 
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKIOLEGACY_EXPORT vtkDataObjectWriter : public vtkWriter
31 {
32 public:
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 
64 protected:
67 
68  void WriteData() override;
70 
72 
73 private:
75  void operator=(const vtkDataObjectWriter&) = delete;
76 };
77 
78 VTK_ABI_NAMESPACE_END
79 #endif
write vtk field data
vtkDataWriter * Writer
static vtkDataObjectWriter * New()
~vtkDataObjectWriter() override
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.
int GetWriteToOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
void WriteToOutputStringOff()
Methods delegated to vtkDataWriter, see vtkDataWriter.
unsigned char * GetBinaryOutputString()
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.
char * GetOutputString()
Methods delegated to vtkDataWriter, see vtkDataWriter.
char * GetFieldDataName()
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.
VTK_FILEPATH VTK_FUTURE_CONST char * GetFileName() VTK_FUTURE_CONST
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
Definition: vtkDataWriter.h:37
a simple class to control print indentation
Definition: vtkIndent.h:108
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:78
abstract class to write data to file(s)
Definition: vtkWriter.h:35
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ type
Definition: vtkX3D.h:516
int vtkIdType
Definition: vtkType.h:315
#define VTK_FILEPATH
#define VTK_BINARY
Definition: vtkWriter.h:32
#define VTK_ASCII
Definition: vtkWriter.h:31