VTK
dox/IO/XML/vtkXMLPUnstructuredGridReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkXMLPUnstructuredGridReader.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 =========================================================================*/
00028 #ifndef __vtkXMLPUnstructuredGridReader_h
00029 #define __vtkXMLPUnstructuredGridReader_h
00030 
00031 #include "vtkIOXMLModule.h" // For export macro
00032 #include "vtkXMLPUnstructuredDataReader.h"
00033 
00034 class vtkUnstructuredGrid;
00035 
00036 class VTKIOXML_EXPORT vtkXMLPUnstructuredGridReader : public vtkXMLPUnstructuredDataReader
00037 {
00038 public:
00039   vtkTypeMacro(vtkXMLPUnstructuredGridReader,vtkXMLPUnstructuredDataReader);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041   static vtkXMLPUnstructuredGridReader *New();
00042 
00044 
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