VTK  9.2.6
vtkXMLCompositeDataSetWriterHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLCompositeDataSetWriterHelper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkXMLCompositeDataSetWriterHelper_h
27 #define vtkXMLCompositeDataSetWriterHelper_h
28 
29 #include "vtkIOParallelXMLModule.h" // For export macro
30 #include "vtkObject.h"
31 #include "vtkSmartPointer.h" // for vtkSmartPointer
32 
33 #include <map> // for std::map
34 #include <string> // for std::string
35 
36 class vtkXMLWriterBase;
37 class vtkDataObject;
38 
39 class VTKIOPARALLELXML_EXPORT vtkXMLCompositeDataSetWriterHelper : public vtkObject
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
51  void SetWriter(vtkXMLWriterBase* writer);
52  vtkGetObjectMacro(Writer, vtkXMLWriterBase);
54 
69  std::string WriteDataSet(const std::string& path, const std::string& prefix, vtkDataObject* data);
70 
71 protected:
74 
79  vtkXMLWriterBase* GetWriter(int dataType);
80 
81 private:
83  void operator=(const vtkXMLCompositeDataSetWriterHelper&) = delete;
84 
85  std::map<int, vtkSmartPointer<vtkXMLWriterBase>> WriterCache;
86  vtkXMLWriterBase* Writer;
87 };
88 
89 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
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:39
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:65