VTK  9.5.20251121
vtkWriter.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
22#ifndef vtkWriter_h
23#define vtkWriter_h
24
25#include "vtkAlgorithm.h"
26#include "vtkDeprecation.h" // For VTK_DEPRECATED_9_5_0
27#include "vtkIOCoreModule.h" // For export macro
28
29VTK_ABI_NAMESPACE_BEGIN
30class vtkDataObject;
31
32#define VTK_ASCII 1
33#define VTK_BINARY 2
34
35class VTKIOCORE_EXPORT vtkWriter : public vtkAlgorithm
36{
37public:
38 vtkTypeMacro(vtkWriter, vtkAlgorithm);
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
46 virtual int Write();
47
49
57 static void EncodeString(char* resname, const char* name);
58 VTK_DEPRECATED_IN_9_6_0("Use the version without doublePercent instead.")
59 static void EncodeString(char* resname, const char* name, bool doublePercent);
61
63
71 static void EncodeWriteString(ostream* out, const char* name);
72 VTK_DEPRECATED_IN_9_6_0("Use the version without doublePercent instead.")
73 static void EncodeWriteString(ostream* out, const char* name, bool doublePercent);
75
77
81 void SetInputData(int index, vtkDataObject* input);
83
86
87protected:
89 ~vtkWriter() override;
90
92 vtkInformationVector* outputVector) override;
93 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
94 vtkInformationVector* outputVector);
95
96 virtual void WriteData() = 0; // internal method subclasses must respond to
98
99private:
100 vtkWriter(const vtkWriter&) = delete;
101 void operator=(const vtkWriter&) = delete;
102};
103
104VTK_ABI_NAMESPACE_END
105#endif
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
record modification and/or execution time
static void EncodeWriteString(ostream *out, const char *name)
Encode the string so that the reader will not have problems.
vtkTimeStamp WriteTime
Definition vtkWriter.h:97
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject * GetInput()
virtual int Write()
Write data to output.
static void EncodeString(char *resname, const char *name)
Encode the string so that the reader will not have problems.
virtual void WriteData()=0
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
void SetInputData(vtkDataObject *input)
Set/get the input to this writer.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_6_0(reason)