VTK  9.6.2
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
18
19#ifndef vtkWriter_h
20#define vtkWriter_h
21
22#include "vtkAlgorithm.h"
23#include "vtkDeprecation.h" // For VTK_DEPRECATED_9_5_0
24#include "vtkIOCoreModule.h" // For export macro
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkDataObject;
28
29#define VTK_ASCII 1
30#define VTK_BINARY 2
31
32class VTKIOCORE_EXPORT vtkWriter : public vtkAlgorithm
33{
34public:
35 vtkTypeMacro(vtkWriter, vtkAlgorithm);
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
43 virtual int Write();
44
46
51 static void EncodeString(char* resname, const char* name);
52
61 VTK_DEPRECATED_IN_9_6_0("Use the version without doublePercent instead.")
62 static void EncodeString(char* resname, const char* name, bool doublePercent);
64
66
71 static void EncodeWriteString(ostream* out, const char* name);
72
81 VTK_DEPRECATED_IN_9_6_0("Use the version without doublePercent instead.")
82 static void EncodeWriteString(ostream* out, const char* name, bool doublePercent);
84
86
90 void SetInputData(int index, vtkDataObject* input);
92
95
96protected:
98 ~vtkWriter() override;
99
101 vtkInformationVector* outputVector) override;
102 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
103 vtkInformationVector* outputVector);
104
105 virtual void WriteData() = 0; // internal method subclasses must respond to
107
108private:
109 vtkWriter(const vtkWriter&) = delete;
110 void operator=(const vtkWriter&) = delete;
111};
112
113VTK_ABI_NAMESPACE_END
114#endif
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:29
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:106
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)
#define vtkAlgorithm