VTK  9.3.1
vtkXMLDataObjectWriter.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
20 #ifndef vtkXMLDataObjectWriter_h
21 #define vtkXMLDataObjectWriter_h
22 
23 #include "vtkIOXMLModule.h" // For export macro
24 #include "vtkXMLWriter.h"
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkCallbackCommand;
28 
29 class VTKIOXML_EXPORT vtkXMLDataObjectWriter : public vtkXMLWriter
30 {
31 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34  static vtkXMLDataObjectWriter* New();
35 
40 
47  static vtkXMLWriter* NewWriter(int dataset_type);
48 
49 protected:
51  ~vtkXMLDataObjectWriter() override;
52 
53  // see algorithm for more info
55 
56  // Override writing method from superclass.
57  int WriteInternal() override;
58 
59  // Dummies to satisfy pure virtuals from superclass.
60  const char* GetDataSetName() override;
61  const char* GetDefaultFileExtension() override;
62 
63  // Callback registered with the InternalProgressObserver.
64  static void ProgressCallbackFunction(vtkObject*, unsigned long, void*, void*);
65  // Progress callback from internal writer.
66  virtual void ProgressCallback(vtkAlgorithm* w);
67 
68  // The observer to report progress from the internal writer.
70 
71 private:
73  void operator=(const vtkXMLDataObjectWriter&) = delete;
74 };
75 
76 VTK_ABI_NAMESPACE_END
77 #endif
virtual const char * GetDataSetName()=0
abstract base class for most VTK objects
Definition: vtkObject.h:51
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:68
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:53
vtkCallbackCommand * InternalProgressObserver
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int WriteInternal()
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
static vtkAlgorithm * New()
Write any type of VTK XML file.