00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00022 #ifndef __vtkXMLPVDWriter_h
00023 #define __vtkXMLPVDWriter_h
00024
00025 #include "vtkXMLWriter.h"
00026
00027 class vtkCallbackCommand;
00028 class vtkXMLPVDWriterInternals;
00029
00030 class VTK_EXPORT vtkXMLPVDWriter : public vtkXMLWriter
00031 {
00032 public:
00033 static vtkXMLPVDWriter* New();
00034 vtkTypeRevisionMacro(vtkXMLPVDWriter,vtkXMLWriter);
00035 void PrintSelf(ostream& os, vtkIndent indent);
00036
00038 virtual const char* GetDefaultFileExtension();
00039
00041
00043 vtkGetMacro(Piece, int);
00044 vtkSetMacro(Piece, int);
00046
00048
00049 vtkGetMacro(NumberOfPieces, int);
00050 vtkSetMacro(NumberOfPieces, int);
00052
00054
00056 vtkGetMacro(GhostLevel, int);
00057 vtkSetMacro(GhostLevel, int);
00059
00061 void AddInput(vtkDataObject *);
00062
00064
00065 vtkGetMacro(WriteCollectionFile, int);
00066 virtual void SetWriteCollectionFile(int flag);
00068
00069
00070 int ProcessRequest(vtkInformation*,
00071 vtkInformationVector**,
00072 vtkInformationVector*);
00073
00074 protected:
00075 vtkXMLPVDWriter();
00076 ~vtkXMLPVDWriter();
00077
00078
00079 virtual int FillInputPortInformation(int port, vtkInformation* info);
00080
00081
00082 int RequestData(vtkInformation* , vtkInformationVector** , vtkInformationVector*);
00083 virtual int WriteData();
00084 virtual const char* GetDataSetName();
00085
00086
00087 void CreateWriters();
00088 vtkXMLWriter* GetWriter(int index);
00089
00090
00091 void SplitFileName();
00092 const char* GetFilePrefix();
00093 const char* GetFilePath();
00094
00095
00096 void AppendEntry(const char* entry);
00097 void DeleteAllEntries();
00098
00099
00100 int WriteCollectionFileIfRequested();
00101
00102
00103 void MakeDirectory(const char* name);
00104
00105
00106 void RemoveADirectory(const char* name);
00107
00108
00109 vtkXMLPVDWriterInternals* Internal;
00110
00111
00112 int Piece;
00113
00114
00115 int NumberOfPieces;
00116
00117
00118 int GhostLevel;
00119
00120
00121 int WriteCollectionFile;
00122 int WriteCollectionFileInitialized;
00123
00124
00125 static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
00126 void*);
00127
00128 virtual void ProgressCallback(vtkAlgorithm* w);
00129
00130
00131 vtkCallbackCommand* ProgressObserver;
00132
00133
00134 virtual void ReportReferences(vtkGarbageCollector*);
00135 private:
00136 vtkXMLPVDWriter(const vtkXMLPVDWriter&);
00137 void operator=(const vtkXMLPVDWriter&);
00138 };
00139
00140 #endif