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 void SetOutput(vtkUnstructuredGrid *output); 00045 vtkUnstructuredGrid *GetOutput(); 00046 vtkUnstructuredGrid *GetOutput(int idx); 00048 00049 protected: 00050 vtkXMLPUnstructuredGridReader(); 00051 ~vtkXMLPUnstructuredGridReader(); 00052 00053 const char* GetDataSetName(); 00054 void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel); 00055 void SetupOutputTotals(); 00056 00057 void SetupOutputData(); 00058 void SetupNextPiece(); 00059 int ReadPieceData(); 00060 00061 void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray); 00062 vtkXMLDataReader* CreatePieceReader(); 00063 virtual int FillOutputPortInformation(int, vtkInformation*); 00064 00065 // The index of the cell in the output where the current piece 00066 // begins. 00067 vtkIdType StartCell; 00068 00069 private: 00070 vtkXMLPUnstructuredGridReader(const vtkXMLPUnstructuredGridReader&); // Not implemented. 00071 void operator=(const vtkXMLPUnstructuredGridReader&); // Not implemented. 00072 }; 00073 00074 #endif