VTK  9.3.1
vtkXMLPMultiBlockDataWriter.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
17 #ifndef vtkXMLPMultiBlockDataWriter_h
18 #define vtkXMLPMultiBlockDataWriter_h
19 
20 #include "vtkIOParallelXMLModule.h" // For export macro
22 
23 VTK_ABI_NAMESPACE_BEGIN
26 
27 class VTKIOPARALLELXML_EXPORT vtkXMLPMultiBlockDataWriter : public vtkXMLMultiBlockDataWriter
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
38  vtkSetMacro(NumberOfPieces, int);
39  vtkGetMacro(NumberOfPieces, int);
41 
43 
46  vtkSetMacro(StartPiece, int);
47  vtkGetMacro(StartPiece, int);
49 
51 
58  virtual void SetController(vtkMultiProcessController*);
59  vtkGetObjectMacro(Controller, vtkMultiProcessController);
61 
67  void SetWriteMetaFile(int flag) override;
68 
69  // See the vtkAlgorithm for a description of what these do
72 
73 protected:
75  ~vtkXMLPMultiBlockDataWriter() override;
76 
85  void FillDataTypes(vtkCompositeDataSet*) override;
86 
88 
98  int WriteComposite(
99  vtkCompositeDataSet* compositeData, vtkXMLDataElement* parent, int& currentFileIndex) override;
100 
112  int ParallelWriteNonCompositeData(
113  vtkDataObject* dObj, vtkXMLDataElement* parentXML, int currentFileIndex);
114 
120  virtual vtkStdString CreatePieceFileName(int currentFileIndex, int procId, int dataSetType);
121 
126  void MakeDirectory(const char* name) override;
127 
132  void RemoveWrittenFiles(const char* subDirectory) override;
133 
135 
141 
142 private:
144  void operator=(const vtkXMLPMultiBlockDataWriter&) = delete;
145 
146  class vtkInternal;
147  vtkInternal* XMLPMultiBlockDataWriterInternal;
148 };
149 
150 VTK_ABI_NAMESPACE_END
151 #endif
vtkMultiProcessController * Controller
parallel writer for vtkHierarchicalBoxDataSet.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
writer for vtkMultiBlockDataSet.
Represents an XML element and those nested inside.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
See the vtkAlgorithm for a description of what these do.
Store vtkAlgorithm input/output information.
virtual void RemoveWrittenFiles(const char *SubDirectory)
Utility function to remove any already written files in case writer failed.
virtual void FillDataTypes(vtkCompositeDataSet *)
Determine the data types for each of the leaf nodes.
static vtkXMLMultiBlockDataWriter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:64
virtual void MakeDirectory(const char *name)
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkStdString CreatePieceFileName(int Piece)
Create a filename for the given index.
virtual void SetWriteMetaFile(int flag)
Get/Set whether this instance will write the meta-file.
Store zero or more vtkInformation instances.
int WriteComposite(vtkCompositeDataSet *compositeData, vtkXMLDataElement *parent, int &writerIdx) override
Internal method called recursively to create the xml tree for the children of compositeData as well a...
general representation of visualization data
Definition: vtkDataObject.h:54
Multiprocessing communication superclass.