1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkPolyDataWriter.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /**
16  * @class   vtkPolyDataWriter
17  * @brief   write vtk polygonal data
18  *
19  * vtkPolyDataWriter is a source object that writes ASCII or binary
20  * polygonal data files in vtk format. See text for format details.
21  * @warning
22  * Binary files written on one system may not be readable on other systems.
23 */
24 
25 #ifndef vtkPolyDataWriter_h
26 #define vtkPolyDataWriter_h
27 
28 #include "vtkIOLegacyModule.h" // For export macro
29 #include "vtkDataWriter.h"
30 
31 class vtkPolyData;
32 
33 class VTKIOLEGACY_EXPORT vtkPolyDataWriter : public vtkDataWriter
34 {
35 public:
36   static vtkPolyDataWriter *New();
37   vtkTypeMacro(vtkPolyDataWriter,vtkDataWriter);
38   void PrintSelf(ostream& os, vtkIndent indent) override;
39 
40   //@{
41   /**
42    * Get the input to this writer.
43    */
44   vtkPolyData* GetInput();
45   vtkPolyData* GetInput(int port);
46   //@}
47 
48 protected:
vtkPolyDataWriter()49   vtkPolyDataWriter() {}
~vtkPolyDataWriter()50   ~vtkPolyDataWriter() override {}
51 
52   void WriteData() override;
53 
54   int FillInputPortInformation(int port, vtkInformation *info) override;
55 
56 private:
57   vtkPolyDataWriter(const vtkPolyDataWriter&) = delete;
58   void operator=(const vtkPolyDataWriter&) = delete;
59 };
60 
61 #endif
62