VTK  9.3.1
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
22 #ifndef vtkWriter_h
23 #define vtkWriter_h
24 
25 #include "vtkAlgorithm.h"
26 #include "vtkIOCoreModule.h" // For export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkDataObject;
30 
31 #define VTK_ASCII 1
32 #define VTK_BINARY 2
33 
34 class VTKIOCORE_EXPORT vtkWriter : public vtkAlgorithm
35 {
36 public:
37  vtkTypeMacro(vtkWriter, vtkAlgorithm);
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
45  virtual int Write();
46 
53  void EncodeString(char* resname, const char* name, bool doublePercent);
54 
62  void EncodeWriteString(ostream* out, const char* name, bool doublePercent);
63 
65 
68  void SetInputData(vtkDataObject* input);
69  void SetInputData(int index, vtkDataObject* input);
71 
72  vtkDataObject* GetInput();
73  vtkDataObject* GetInput(int port);
74 
75 protected:
76  vtkWriter();
77  ~vtkWriter() override;
78 
80  vtkInformationVector* outputVector) override;
81  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
82  vtkInformationVector* outputVector);
83 
84  virtual void WriteData() = 0; // internal method subclasses must respond to
86 
87 private:
88  vtkWriter(const vtkWriter&) = delete;
89  void operator=(const vtkWriter&) = delete;
90 };
91 
92 VTK_ABI_NAMESPACE_END
93 #endif
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:24
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
abstract class to write data to file(s)
Definition: vtkWriter.h:34
vtkTimeStamp WriteTime
Definition: vtkWriter.h:85
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
a simple class to control print indentation
Definition: vtkIndent.h:28
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:54