VTK
vtkXMLPDataWriter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkXMLPDataWriter.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=========================================================================*/
25#ifndef vtkXMLPDataWriter_h
26#define vtkXMLPDataWriter_h
27
28#include "vtkIOParallelXMLModule.h" // For export macro
29#include "vtkXMLWriter.h"
30
33
34class VTKIOPARALLELXML_EXPORT vtkXMLPDataWriter : public vtkXMLWriter
35{
36public:
38 void PrintSelf(ostream& os, vtkIndent indent);
39
41
44 vtkSetMacro(NumberOfPieces, int);
45 vtkGetMacro(NumberOfPieces, int);
47
49
52 vtkSetMacro(StartPiece, int);
53 vtkGetMacro(StartPiece, int);
54 vtkSetMacro(EndPiece, int);
55 vtkGetMacro(EndPiece, int);
57
59
62 vtkSetMacro(GhostLevel, int);
63 vtkGetMacro(GhostLevel, int);
65
67
73 virtual void SetWriteSummaryFile(int flag);
74 vtkGetMacro(WriteSummaryFile, int);
75 vtkBooleanMacro(WriteSummaryFile, int);
77
79
85 vtkGetObjectMacro(Controller, vtkMultiProcessController);
87
88
93 virtual int ProcessRequest(vtkInformation* request,
94 vtkInformationVector** inputVector, vtkInformationVector* outputVector);
95
96protected:
99
104 vtkInformationVector **inputVector, vtkInformationVector *outputVector);
105
106 // Override writing method from superclass.
107 virtual int WriteInternal();
108
109 // Subclasses can override this method to collect information between ranks
110 // before writing the summary file. This method is called on all ranks while
111 // summary file is only written on 1 rank (rank 0).
112 virtual void PrepareSummaryFile();
113
115
116 virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent);
118 virtual void WritePData(vtkIndent indent);
119 virtual void WritePPieceAttributes(int index);
120
121 char* CreatePieceFileName(int index, const char* path=0);
123 virtual int WritePiece(int index);
124
125 // Callback registered with the ProgressObserver.
126 static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
127 void*);
128 // Progress callback from internal writer.
130
136
137 char* PathName;
141
142 // The observer to report progress from the internal writer.
144
146
151 vtkGetMacro(ContinuingExecution, bool);
152
153private:
154 vtkXMLPDataWriter(const vtkXMLPDataWriter&) VTK_DELETE_FUNCTION;
155 void operator=(const vtkXMLPDataWriter&) VTK_DELETE_FUNCTION;
156
160 void DeleteFiles();
161
165 void SetupPieceFileNameExtension();
166
167 // Indicates the piece currently being written.
168 int CurrentPiece;
169
170 // Set in WriteInternal() to request continued execution from the executive to
171 // write more pieces.
172 bool ContinuingExecution;
173
174 // Flags used to keep track of which pieces were written out.
175 unsigned char *PieceWrittenFlags;
176};
177
178#endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:60
Write data in a parallel XML format.
virtual int WritePiece(int index)
virtual void SetWriteSummaryFile(int flag)
Get/Set whether the writer should write the summary file that refers to all of the pieces' individual...
virtual int WriteInternal()
virtual vtkXMLWriter * CreatePieceWriter(int index)=0
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void SetController(vtkMultiProcessController *)
Controller used to communicate data type of blocks.
vtkCallbackCommand * ProgressObserver
virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent)
virtual void PrepareSummaryFile()
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Overridden to handle passing the CONTINUE_EXECUTING() flags to the executive.
virtual void WritePData(vtkIndent indent)
char * CreatePieceFileName(int index, const char *path=0)
virtual void ProgressCallback(vtkAlgorithm *w)
virtual void WritePPieceAttributes(int index)
static void ProgressCallbackFunction(vtkObject *, unsigned long, void *, void *)
vtkMultiProcessController * Controller
virtual int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Overridden to make appropriate piece request from upstream.
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:54
@ index
Definition: vtkX3D.h:246
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.