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 "vtkXMLWriter.h"
28 
29 class vtkCallbackCommand;
30 
32 {
33 public:
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
38 
39  vtkSetMacro(NumberOfPieces, int);
40  vtkGetMacro(NumberOfPieces, int);
42 
44 
45  vtkSetMacro(StartPiece, int);
46  vtkGetMacro(StartPiece, int);
47  vtkSetMacro(EndPiece, int);
48  vtkGetMacro(EndPiece, int);
50 
52 
53  vtkSetMacro(GhostLevel, int);
54  vtkGetMacro(GhostLevel, int);
56 
58 
61  virtual void SetWriteSummaryFile(int flag);
62  vtkGetMacro(WriteSummaryFile, int);
63  vtkBooleanMacro(WriteSummaryFile, int);
65 
66 protected:
69 
70  // Override writing method from superclass.
71  virtual int WriteInternal();
72 
73  virtual vtkXMLWriter* CreatePieceWriter(int index)=0;
74 
75  virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent);
76  int WriteData();
77  virtual void WritePData(vtkIndent indent);
78  virtual void WritePPieceAttributes(int index);
79 
80  char* CreatePieceFileName(int index, const char* path=0);
81  void SplitFileName();
82  int WritePieces();
83  int WritePiece(int index);
84 
85  // Callback registered with the ProgressObserver.
86  static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
87  void*);
88  // Progress callback from internal writer.
89  virtual void ProgressCallback(vtkAlgorithm* w);
90 
92  int EndPiece;
97 
98  char* PathName;
99  char* FileNameBase;
102 
103  // The observer to report progress from the internal writer.
105 
106 private:
107  vtkXMLPDataWriter(const vtkXMLPDataWriter&); // Not implemented.
108  void operator=(const vtkXMLPDataWriter&); // Not implemented.
109 };
110 
111 #endif