Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
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   // Override writing method from superclass.
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   // Callback registered with the ProgressObserver.
00086   static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
00087                                        void*);
00088   // Progress callback from internal writer.
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   // The observer to report progress from the internal writer.
00104   vtkCallbackCommand* ProgressObserver;  
00105   
00106 private:
00107   vtkXMLPDataWriter(const vtkXMLPDataWriter&);  // Not implemented.
00108   void operator=(const vtkXMLPDataWriter&);  // Not implemented.
00109 };
00110 
00111 #endif

Generated on Mon Jan 21 23:07:32 2008 for VTK by  doxygen 1.4.3-20050530