Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

IO/vtkXMLPDataWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLPDataWriter.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00038 #ifndef __vtkXMLPDataWriter_h
00039 #define __vtkXMLPDataWriter_h
00040 
00041 #include "vtkXMLWriter.h"
00042 
00043 class vtkDataSet;
00044 
00045 class VTK_IO_EXPORT vtkXMLPDataWriter : public vtkXMLWriter
00046 {
00047 public:
00048   vtkTypeRevisionMacro(vtkXMLPDataWriter,vtkXMLWriter);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050   
00052 
00053   vtkSetMacro(NumberOfPieces, int);
00054   vtkGetMacro(NumberOfPieces, int);
00056   
00058 
00059   vtkSetMacro(StartPiece, int);
00060   vtkGetMacro(StartPiece, int);
00061   vtkSetMacro(EndPiece, int);
00062   vtkGetMacro(EndPiece, int);
00064   
00066 
00067   vtkSetMacro(GhostLevel, int);
00068   vtkGetMacro(GhostLevel, int);
00070   
00072 
00075   virtual void SetWriteSummaryFile(int flag);
00076   vtkGetMacro(WriteSummaryFile, int);
00077   vtkBooleanMacro(WriteSummaryFile, int);  
00079   
00081   int Write();
00082 protected:
00083   vtkXMLPDataWriter();
00084   ~vtkXMLPDataWriter();
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   int StartPiece;
00099   int EndPiece;
00100   int NumberOfPieces;
00101   int GhostLevel;
00102   int WriteSummaryFile;
00103   int WriteSummaryFileInitialized;
00104   
00105   char* PathName;
00106   char* FileNameBase;
00107   char* FileNameExtension;
00108   char* PieceFileNameExtension;
00109   
00110 private:
00111   vtkXMLPDataWriter(const vtkXMLPDataWriter&);  // Not implemented.
00112   void operator=(const vtkXMLPDataWriter&);  // Not implemented.
00113 };
00114 
00115 #endif