VTK  9.3.1
vtkXMLCompositeDataSetWriterHelper.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
14 #ifndef vtkXMLCompositeDataSetWriterHelper_h
15 #define vtkXMLCompositeDataSetWriterHelper_h
16 
17 #include "vtkIOParallelXMLModule.h" // For export macro
18 #include "vtkObject.h"
19 #include "vtkSmartPointer.h" // for vtkSmartPointer
20 
21 #include <map> // for std::map
22 #include <string> // for std::string
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkXMLWriterBase;
26 class vtkDataObject;
27 
28 class VTKIOPARALLELXML_EXPORT vtkXMLCompositeDataSetWriterHelper : public vtkObject
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
40  void SetWriter(vtkXMLWriterBase* writer);
41  vtkGetObjectMacro(Writer, vtkXMLWriterBase);
43 
58  std::string WriteDataSet(const std::string& path, const std::string& prefix, vtkDataObject* data);
59 
60 protected:
63 
68  vtkXMLWriterBase* GetWriter(int dataType);
69 
70 private:
72  void operator=(const vtkXMLCompositeDataSetWriterHelper&) = delete;
73 
74  std::map<int, vtkSmartPointer<vtkXMLWriterBase>> WriterCache;
75  vtkXMLWriterBase* Writer;
76 };
77 
78 VTK_ABI_NAMESPACE_END
79 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a helper class used by vtkXMLWriter2 subclasses that write composite datasets.
a simple class to control print indentation
Definition: vtkIndent.h:28
Abstract base class for VTK-XML writers.
void WriteDataSet(vtkUnstructuredGrid *grid, const std::string &file)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
general representation of visualization data
Definition: vtkDataObject.h:54