VTK  9.3.0
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 
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
general representation of visualization data
Definition: vtkDataObject.h:64
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
a helper class used by vtkXMLWriter2 subclasses that write composite datasets.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkXMLCompositeDataSetWriterHelper * New()
void SetWriter(vtkXMLWriterBase *writer)
Get/Set the writer using this helper.
std::string WriteDataSet(const std::string &path, const std::string &prefix, vtkDataObject *data)
Write a specific dataset to a file.
vtkXMLWriterBase * GetWriter(int dataType)
Method to obtain a writer for the given data type.
Abstract base class for VTK-XML writers.
@ data
Definition: vtkX3D.h:315
@ string
Definition: vtkX3D.h:490