VTK  9.3.1
vtkGraphWriter.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
16 #ifndef vtkGraphWriter_h
17 #define vtkGraphWriter_h
18 
19 #include "vtkDataWriter.h"
20 #include "vtkIOLegacyModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkGraph;
24 class vtkMolecule;
25 
26 class VTKIOLEGACY_EXPORT vtkGraphWriter : public vtkDataWriter
27 {
28 public:
29  static vtkGraphWriter* New();
30  vtkTypeMacro(vtkGraphWriter, vtkDataWriter);
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
37  vtkGraph* GetInput();
38  vtkGraph* GetInput(int port);
40 
41 protected:
42  vtkGraphWriter() = default;
43  ~vtkGraphWriter() override = default;
44 
45  void WriteData() override;
46 
47  void WriteMoleculeData(ostream* fp, vtkMolecule* m);
48 
50 
51 private:
52  vtkGraphWriter(const vtkGraphWriter&) = delete;
53  void operator=(const vtkGraphWriter&) = delete;
54 };
55 
56 VTK_ABI_NAMESPACE_END
57 #endif
void WriteData() override
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:83
helper class for objects that write VTK data files
Definition: vtkDataWriter.h:36
Base class for graph data types.
Definition: vtkGraph.h:280
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkDataObject * GetInput()
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
write vtkGraph data to a file
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
static vtkDataWriter * New()
Create object with default header, ASCII format, and default names for scalars, vectors, tensors, normals, and texture coordinates.