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