00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkXMLPUnstructuredGridReader.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 =========================================================================*/ 00032 #ifndef __vtkXMLPUnstructuredGridReader_h 00033 #define __vtkXMLPUnstructuredGridReader_h 00034 00035 #include "vtkXMLPUnstructuredDataReader.h" 00036 00037 class vtkUnstructuredGrid; 00038 00039 class VTK_IO_EXPORT vtkXMLPUnstructuredGridReader : public vtkXMLPUnstructuredDataReader 00040 { 00041 public: 00042 vtkTypeRevisionMacro(vtkXMLPUnstructuredGridReader,vtkXMLPUnstructuredDataReader); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 static vtkXMLPUnstructuredGridReader *New(); 00045 00047 00048 void SetOutput(vtkUnstructuredGrid *output); 00049 vtkUnstructuredGrid *GetOutput(); 00051 00052 protected: 00053 vtkXMLPUnstructuredGridReader(); 00054 ~vtkXMLPUnstructuredGridReader(); 00055 00056 const char* GetDataSetName(); 00057 void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel); 00058 void SetupOutputTotals(); 00059 00060 void SetupOutputData(); 00061 void SetupNextPiece(); 00062 int ReadPieceData(); 00063 00064 void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray); 00065 vtkXMLDataReader* CreatePieceReader(); 00066 00067 // The index of the cell in the output where the current piece 00068 // begins. 00069 vtkIdType StartCell; 00070 00071 private: 00072 vtkXMLPUnstructuredGridReader(const vtkXMLPUnstructuredGridReader&); // Not implemented. 00073 void operator=(const vtkXMLPUnstructuredGridReader&); // Not implemented. 00074 }; 00075 00076 #endif