VTK  9.0.20200927
vtkXMLPMultiBlockDataWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPMultiBlockDataWriter.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 vtkXMLPMultiBlockDataWriter_h
27 #define vtkXMLPMultiBlockDataWriter_h
28 
29 #include "vtkIOParallelXMLModule.h" // For export macro
31 
34 
35 class VTKIOPARALLELXML_EXPORT vtkXMLPMultiBlockDataWriter : public vtkXMLMultiBlockDataWriter
36 {
37 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
46  vtkSetMacro(NumberOfPieces, int);
47  vtkGetMacro(NumberOfPieces, int);
49 
51 
54  vtkSetMacro(StartPiece, int);
55  vtkGetMacro(StartPiece, int);
57 
59 
66  virtual void SetController(vtkMultiProcessController*);
67  vtkGetObjectMacro(Controller, vtkMultiProcessController);
69 
75  void SetWriteMetaFile(int flag) override;
76 
77  // See the vtkAlgorithm for a description of what these do
80 
81 protected:
83  ~vtkXMLPMultiBlockDataWriter() override;
84 
93  void FillDataTypes(vtkCompositeDataSet*) override;
94 
96 
106  int WriteComposite(
107  vtkCompositeDataSet* compositeData, vtkXMLDataElement* parent, int& currentFileIndex) override;
108 
120  int ParallelWriteNonCompositeData(
121  vtkDataObject* dObj, vtkXMLDataElement* parentXML, int currentFileIndex);
122 
128  virtual vtkStdString CreatePieceFileName(int currentFileIndex, int procId, int dataSetType);
129 
134  void RemoveWrittenFiles(const char* subDirectory) override;
135 
137 
143 
144 private:
146  void operator=(const vtkXMLPMultiBlockDataWriter&) = delete;
147 
148  class vtkInternal;
149  vtkInternal* XMLPMultiBlockDataWriterInternal;
150 };
151 
152 #endif
vtkXMLCompositeDataWriter::FillDataTypes
virtual void FillDataTypes(vtkCompositeDataSet *)
Determine the data types for each of the leaf nodes.
vtkXMLCompositeDataWriter::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
See the vtkAlgorithm for a description of what these do.
vtkXMLPMultiBlockDataWriter::StartPiece
int StartPiece
Piece information.
Definition: vtkXMLPMultiBlockDataWriter.h:140
vtkXMLCompositeDataWriter::RemoveWrittenFiles
virtual void RemoveWrittenFiles(const char *SubDirectory)
Utility function to remove any already written files in case writer failed.
vtkXMLMultiBlockDataWriter::WriteComposite
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...
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkXMLPMultiBlockDataWriter::Controller
vtkMultiProcessController * Controller
Definition: vtkXMLPMultiBlockDataWriter.h:95
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:45
vtkXMLCompositeDataWriter::CreatePieceFileName
vtkStdString CreatePieceFileName(int Piece)
Create a filename for the given index.
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:76
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:36
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkXMLMultiBlockDataWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLMultiBlockDataWriter.h
vtkXMLMultiBlockDataWriter
writer for vtkMultiBlockDataSet.
Definition: vtkXMLMultiBlockDataWriter.h:29
vtkXMLCompositeDataWriter::SetWriteMetaFile
virtual void SetWriteMetaFile(int flag)
vtkXMLPMultiBlockDataWriter::NumberOfPieces
int NumberOfPieces
Definition: vtkXMLPMultiBlockDataWriter.h:141
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
vtkXMLMultiBlockDataWriter::New
static vtkXMLMultiBlockDataWriter * New()
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkXMLPMultiBlockDataWriter
parallel writer for vtkHierarchicalBoxDataSet.
Definition: vtkXMLPMultiBlockDataWriter.h:35