00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00024 #ifndef __vtkXMLPDataWriter_h
00025 #define __vtkXMLPDataWriter_h
00026
00027 #include "vtkXMLWriter.h"
00028
00029 class vtkCallbackCommand;
00030
00031 class VTK_IO_EXPORT vtkXMLPDataWriter : public vtkXMLWriter
00032 {
00033 public:
00034 vtkTypeRevisionMacro(vtkXMLPDataWriter,vtkXMLWriter);
00035 void PrintSelf(ostream& os, vtkIndent indent);
00036
00038
00039 vtkSetMacro(NumberOfPieces, int);
00040 vtkGetMacro(NumberOfPieces, int);
00042
00044
00045 vtkSetMacro(StartPiece, int);
00046 vtkGetMacro(StartPiece, int);
00047 vtkSetMacro(EndPiece, int);
00048 vtkGetMacro(EndPiece, int);
00050
00052
00053 vtkSetMacro(GhostLevel, int);
00054 vtkGetMacro(GhostLevel, int);
00056
00058
00061 virtual void SetWriteSummaryFile(int flag);
00062 vtkGetMacro(WriteSummaryFile, int);
00063 vtkBooleanMacro(WriteSummaryFile, int);
00065
00066 protected:
00067 vtkXMLPDataWriter();
00068 ~vtkXMLPDataWriter();
00069
00070
00071 virtual int WriteInternal();
00072
00073 virtual vtkXMLWriter* CreatePieceWriter(int index)=0;
00074
00075 virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent);
00076 int WriteData();
00077 virtual void WritePData(vtkIndent indent);
00078 virtual void WritePPieceAttributes(int index);
00079
00080 char* CreatePieceFileName(int index, const char* path=0);
00081 void SplitFileName();
00082 int WritePieces();
00083 int WritePiece(int index);
00084
00085
00086 static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
00087 void*);
00088
00089 virtual void ProgressCallback(vtkAlgorithm* w);
00090
00091 int StartPiece;
00092 int EndPiece;
00093 int NumberOfPieces;
00094 int GhostLevel;
00095 int WriteSummaryFile;
00096 int WriteSummaryFileInitialized;
00097
00098 char* PathName;
00099 char* FileNameBase;
00100 char* FileNameExtension;
00101 char* PieceFileNameExtension;
00102
00103
00104 vtkCallbackCommand* ProgressObserver;
00105
00106 private:
00107 vtkXMLPDataWriter(const vtkXMLPDataWriter&);
00108 void operator=(const vtkXMLPDataWriter&);
00109 };
00110
00111 #endif