00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkXMLUnstructuredGridWriter.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 =========================================================================*/ 00043 #ifndef __vtkXMLUnstructuredGridWriter_h 00044 #define __vtkXMLUnstructuredGridWriter_h 00045 00046 #include "vtkXMLUnstructuredDataWriter.h" 00047 00048 class vtkUnstructuredGrid; 00049 00050 class VTK_IO_EXPORT vtkXMLUnstructuredGridWriter : public vtkXMLUnstructuredDataWriter 00051 { 00052 public: 00053 vtkTypeRevisionMacro(vtkXMLUnstructuredGridWriter,vtkXMLUnstructuredDataWriter); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 static vtkXMLUnstructuredGridWriter* New(); 00056 00058 00059 void SetInput(vtkUnstructuredGrid* input); 00060 vtkUnstructuredGrid* GetInput(); 00062 00064 const char* GetDefaultFileExtension(); 00065 00066 protected: 00067 vtkXMLUnstructuredGridWriter(); 00068 ~vtkXMLUnstructuredGridWriter(); 00069 00070 const char* GetDataSetName(); 00071 void SetInputUpdateExtent(int piece, int numPieces, int ghostLevel); 00072 00073 void WriteInlinePieceAttributes(); 00074 void WriteInlinePiece(vtkIndent indent); 00075 00076 void WriteAppendedMode(vtkIndent indent); 00077 void WriteAppendedPieceAttributes(int index); 00078 void WriteAppendedPiece(int index, vtkIndent indent); 00079 void WriteAppendedPieceData(int index); 00080 00081 // Positions of attributes for each piece. 00082 unsigned long* NumberOfCellsPositions; 00083 unsigned long** CellsPositions; 00084 00085 private: 00086 vtkXMLUnstructuredGridWriter(const vtkXMLUnstructuredGridWriter&); // Not implemented. 00087 void operator=(const vtkXMLUnstructuredGridWriter&); // Not implemented. 00088 }; 00089 00090 #endif