Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkXMLPDataWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLPDataWriter.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00036 #ifndef __vtkXMLPDataWriter_h
00037 #define __vtkXMLPDataWriter_h
00038 
00039 #include "vtkXMLWriter.h"
00040 
00041 class vtkCallbackCommand;
00042 class vtkDataSet;
00043 
00044 class VTK_IO_EXPORT vtkXMLPDataWriter : public vtkXMLWriter
00045 {
00046 public:
00047   vtkTypeRevisionMacro(vtkXMLPDataWriter,vtkXMLWriter);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049   
00051 
00052   vtkSetMacro(NumberOfPieces, int);
00053   vtkGetMacro(NumberOfPieces, int);
00055   
00057 
00058   vtkSetMacro(StartPiece, int);
00059   vtkGetMacro(StartPiece, int);
00060   vtkSetMacro(EndPiece, int);
00061   vtkGetMacro(EndPiece, int);
00063   
00065 
00066   vtkSetMacro(GhostLevel, int);
00067   vtkGetMacro(GhostLevel, int);
00069   
00071 
00074   virtual void SetWriteSummaryFile(int flag);
00075   vtkGetMacro(WriteSummaryFile, int);
00076   vtkBooleanMacro(WriteSummaryFile, int);  
00078   
00079 protected:
00080   vtkXMLPDataWriter();
00081   ~vtkXMLPDataWriter();
00082   
00083   // Override writing method from superclass.
00084   virtual int WriteInternal();
00085   
00086   virtual vtkXMLWriter* CreatePieceWriter(int index)=0;
00087   
00088   virtual void WritePrimaryElementAttributes();
00089   int WriteData();
00090   virtual void WritePData(vtkIndent indent);
00091   virtual void WritePPieceAttributes(int index);
00092   
00093   char* CreatePieceFileName(int index, const char* path=0);
00094   void SplitFileName();
00095   int WritePieces();
00096   int WritePiece(int index);
00097   
00098   // Callback registered with the ProgressObserver.
00099   static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
00100                                        void*);
00101   // Progress callback from internal writer.
00102   virtual void ProgressCallback(vtkProcessObject* w);
00103   
00104   int StartPiece;
00105   int EndPiece;
00106   int NumberOfPieces;
00107   int GhostLevel;
00108   int WriteSummaryFile;
00109   int WriteSummaryFileInitialized;
00110   
00111   char* PathName;
00112   char* FileNameBase;
00113   char* FileNameExtension;
00114   char* PieceFileNameExtension;
00115   
00116   // The observer to report progress from the internal writer.
00117   vtkCallbackCommand* ProgressObserver;  
00118   
00119 private:
00120   vtkXMLPDataWriter(const vtkXMLPDataWriter&);  // Not implemented.
00121   void operator=(const vtkXMLPDataWriter&);  // Not implemented.
00122 };
00123 
00124 #endif