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 =========================================================================*/
24 #ifndef vtkXMLPDataWriter_h
25 #define vtkXMLPDataWriter_h
26 
27 #include "vtkIOParallelXMLModule.h" // For export macro
28 #include "vtkXMLWriter.h"
29 
30 class vtkCallbackCommand;
32 
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
40 
41  vtkSetMacro(NumberOfPieces, int);
42  vtkGetMacro(NumberOfPieces, int);
44 
46 
47  vtkSetMacro(StartPiece, int);
48  vtkGetMacro(StartPiece, int);
49  vtkSetMacro(EndPiece, int);
50  vtkGetMacro(EndPiece, int);
52 
54 
55  vtkSetMacro(GhostLevel, int);
56  vtkGetMacro(GhostLevel, int);
58 
60 
63  virtual void SetWriteSummaryFile(int flag);
64  vtkGetMacro(WriteSummaryFile, int);
65  vtkBooleanMacro(WriteSummaryFile, int);
67 
69 
72  virtual void SetController(vtkMultiProcessController*);
73  vtkGetObjectMacro(Controller, vtkMultiProcessController);
75 
76 protected:
79 
80  // Override writing method from superclass.
81  virtual int WriteInternal();
82 
83  virtual vtkXMLWriter* CreatePieceWriter(int index)=0;
84 
85  virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent);
86  int WriteData();
87  virtual void WritePData(vtkIndent indent);
88  virtual void WritePPieceAttributes(int index);
89 
90  char* CreatePieceFileName(int index, const char* path=0);
91  void SplitFileName();
92  virtual int WritePieces();
93  virtual int WritePiece(int index);
94 
95  // Callback registered with the ProgressObserver.
96  static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
97  void*);
98  // Progress callback from internal writer.
99  virtual void ProgressCallback(vtkAlgorithm* w);
100 
102  int EndPiece;
106 
107  char* PathName;
111 
112  // The observer to report progress from the internal writer.
114 
116 
117 private:
118  vtkXMLPDataWriter(const vtkXMLPDataWriter&); // Not implemented.
119  void operator=(const vtkXMLPDataWriter&); // Not implemented.
120 };
121 
122 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkMultiProcessController * Controller
#define VTKIOPARALLELXML_EXPORT
virtual int WriteData()
Definition: vtkXMLWriter.h:323
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:53
a simple class to control print indentation
Definition: vtkIndent.h:38
Write data in a parallel XML format.
virtual int WriteInternal()
vtkCallbackCommand * ProgressObserver
virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent)
void PrintSelf(ostream &os, vtkIndent indent)
Multiprocessing communication superclass.