VTK: IO/ParallelXML/vtkXMLCompositeDataSetWriterHelper.h Source File

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