VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/ParallelXML/vtkXMLPStructuredDataWriter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkXMLPStructuredDataWriter.h
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 =========================================================================*/
00022 #ifndef vtkXMLPStructuredDataWriter_h
00023 #define vtkXMLPStructuredDataWriter_h
00024 
00025 #include "vtkIOParallelXMLModule.h" // For export macro
00026 #include "vtkXMLPDataWriter.h"
00027 
00028 #include <map> // for keeping track of extents
00029 #include <vector> // for keeping track of extents
00030 
00031 class vtkXMLStructuredDataWriter;
00032 
00033 class VTKIOPARALLELXML_EXPORT vtkXMLPStructuredDataWriter : public vtkXMLPDataWriter
00034 {
00035 public:
00036   vtkTypeMacro(vtkXMLPStructuredDataWriter,vtkXMLPDataWriter);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00039   // See the vtkAlgorithm for a description of what these do
00040   virtual int ProcessRequest(vtkInformation* request,
00041                              vtkInformationVector** inputVector,
00042                              vtkInformationVector* outputVector);
00043 
00044 protected:
00045   vtkXMLPStructuredDataWriter();
00046   ~vtkXMLPStructuredDataWriter();
00047 
00048   virtual vtkXMLStructuredDataWriter* CreateStructuredPieceWriter()=0;
00049   void WritePrimaryElementAttributes(ostream &os, vtkIndent indent);
00050   void WritePPieceAttributes(int index);
00051   vtkXMLWriter* CreatePieceWriter(int index);
00052 
00053   virtual int RequestUpdateExtent(vtkInformation* request,
00054                                   vtkInformationVector** inputVector,
00055                                   vtkInformationVector* outputVector);
00056 
00057   virtual int WriteInternal();
00058 
00059   virtual int WritePieces();
00060   virtual int WritePiece(int index);
00061 
00062 private:
00063   vtkXMLPStructuredDataWriter(const vtkXMLPStructuredDataWriter&);  // Not implemented.
00064   void operator=(const vtkXMLPStructuredDataWriter&);  // Not implemented.
00065 
00066   typedef std::map<int, std::vector<int> > ExtentsType;
00067   ExtentsType Extents;
00068 };
00069 
00070 #endif