VTK  9.1.0
vtkXMLPDataObjectWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkXMLPDataObjectWriter.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=========================================================================*/
28#ifndef vtkXMLPDataObjectWriter_h
29#define vtkXMLPDataObjectWriter_h
30
31#include "vtkIOParallelXMLModule.h" // For export macro
32#include "vtkXMLWriter.h"
33
36
37class VTKIOPARALLELXML_EXPORT vtkXMLPDataObjectWriter : public vtkXMLWriter
38{
39public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
44
47 vtkSetMacro(NumberOfPieces, int);
48 vtkGetMacro(NumberOfPieces, int);
50
52
55 vtkSetMacro(StartPiece, int);
56 vtkGetMacro(StartPiece, int);
57 vtkSetMacro(EndPiece, int);
58 vtkGetMacro(EndPiece, int);
60
62
65 vtkSetMacro(GhostLevel, int);
66 vtkGetMacro(GhostLevel, int);
68
70
73 vtkSetMacro(UseSubdirectory, bool);
74 vtkGetMacro(UseSubdirectory, bool);
76
78
84 virtual void SetWriteSummaryFile(int flag);
85 vtkGetMacro(WriteSummaryFile, int);
86 vtkBooleanMacro(WriteSummaryFile, int);
88
90
96 vtkGetObjectMacro(Controller, vtkMultiProcessController);
98
104 vtkInformationVector* outputVector) override;
105
106protected:
109
113 int WriteInternal() override;
114
118 int WriteData() override;
119
123 virtual void WritePData(vtkIndent indent) = 0;
124
129 virtual int WritePiece(int index) = 0;
130
135 virtual int WritePieceInternal() = 0;
136
140 virtual int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
141 vtkInformationVector* outputVector);
142
148 virtual void PrepareSummaryFile();
149
153 virtual void WritePPieceAttributes(int index);
154
156
159 char* CreatePieceFileName(int index, const char* path = nullptr);
162
166 static void ProgressCallbackFunction(vtkObject*, unsigned long, void*, void*);
167
172 vtkGetMacro(ContinuingExecution, bool);
173
177 vtkGetMacro(CurrentPiece, int);
178
183
188
193
195
202
203 char* PathName;
207
211 unsigned char* PieceWrittenFlags;
212
217
218private:
220 void operator=(const vtkXMLPDataObjectWriter&) = delete;
221
225 int CurrentPiece;
226
231 bool ContinuingExecution;
232};
233
234#endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:114
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:73
Write data in a parallel XML format.
unsigned char * PieceWrittenFlags
Flags used to keep track of which pieces were written out.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Overridden to handle passing the CONTINUE_EXECUTING() flags to the executive.
virtual void ProgressCallback(vtkAlgorithm *w)
Progress callback from internal writer.
virtual int WritePieceInternal()=0
Method called by WriteInternal().
static void ProgressCallbackFunction(vtkObject *, unsigned long, void *, void *)
Callback registered with the InternalProgressObserver.
int WriteInternal() override
Override writing method from superclass.
vtkCallbackCommand * InternalProgressObserver
The observer to report progress from the internal writer.
virtual void WritePData(vtkIndent indent)=0
Write Data associated with the input dataset.
vtkMultiProcessController * Controller
int WriteData() override
Write data from the input dataset.
void DeleteFiles()
Method used to delete all written files.
char * CreatePieceFileName(int index, const char *path=nullptr)
Methods for creating a filename for each piece in the dataset.
void SplitFileName()
Methods for creating a filename for each piece in the dataset.
virtual void SetController(vtkMultiProcessController *)
Controller used to communicate data type of blocks.
virtual void SetWriteSummaryFile(int flag)
Get/Set whether the writer should write the summary file that refers to all of the pieces' individual...
~vtkXMLPDataObjectWriter() override
virtual int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Overridden to make appropriate piece request from upstream.
virtual void WritePPieceAttributes(int index)
Write the attributes of the piece at the given index.
virtual void SetupPieceFileNameExtension()
Initializes PieceFileNameExtension.
virtual void PrepareSummaryFile()
Collect information between ranks before writing the summary file.
virtual int WritePiece(int index)=0
Write a piece of the dataset on disk.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:62
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69