VTK  9.3.0
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;
35 
40 
47  static vtkXMLWriter* NewWriter(int dataset_type);
48 
49 protected:
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
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:52
supports function callbacks
abstract class to specify dataset behavior
Definition: vtkDataSet.h:53
a simple class to control print indentation
Definition: vtkIndent.h:29
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:52
Write any type of VTK XML file.
vtkDataSet * GetInput()
Get/Set the writer's input.
virtual void ProgressCallback(vtkAlgorithm *w)
static vtkXMLDataObjectWriter * New()
static vtkXMLWriter * NewWriter(int dataset_type)
Creates a writer for the given dataset type.
const char * GetDefaultFileExtension() override
Get the default file extension for files written by this writer.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
~vtkXMLDataObjectWriter() override
static void ProgressCallbackFunction(vtkObject *, unsigned long, void *, void *)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetDataSetName() override
vtkCallbackCommand * InternalProgressObserver
int WriteInternal() override
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:54
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447