Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

IO/vtkXMLUnstructuredGridReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLUnstructuredGridReader.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 __vtkXMLUnstructuredGridReader_h
00033 #define __vtkXMLUnstructuredGridReader_h
00034 
00035 #include "vtkXMLUnstructuredDataReader.h"
00036 
00037 class vtkUnstructuredGrid;
00038 
00039 class VTK_IO_EXPORT vtkXMLUnstructuredGridReader : public vtkXMLUnstructuredDataReader
00040 {
00041 public:
00042   vtkTypeRevisionMacro(vtkXMLUnstructuredGridReader,vtkXMLUnstructuredDataReader);
00043   void PrintSelf(ostream& os, vtkIndent indent);  
00044   static vtkXMLUnstructuredGridReader *New();
00045   
00047 
00048   void SetOutput(vtkUnstructuredGrid *output);
00049   vtkUnstructuredGrid *GetOutput();
00050   vtkUnstructuredGrid *GetOutput(int idx);
00052   
00053 protected:
00054   vtkXMLUnstructuredGridReader();
00055   ~vtkXMLUnstructuredGridReader();
00056   
00057   const char* GetDataSetName();
00058   void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
00059   void SetupOutputTotals();
00060   void SetupPieces(int numPieces);
00061   void DestroyPieces();
00062   
00063   void SetupOutputData();
00064   int ReadPiece(vtkXMLDataElement* ePiece);
00065   void SetupNextPiece();
00066   int ReadPieceData();
00067   
00068   // Read a data array whose tuples coorrespond to cells.
00069   int ReadArrayForCells(vtkXMLDataElement* da, vtkDataArray* outArray);
00070   
00071   // The index of the cell in the output where the current piece
00072   // begins.
00073   vtkIdType StartCell;
00074   
00075   // The Cells element for each piece.
00076   vtkXMLDataElement** CellElements;
00077   vtkIdType* NumberOfCells;
00078   
00079 private:
00080   vtkXMLUnstructuredGridReader(const vtkXMLUnstructuredGridReader&);  // Not implemented.
00081   void operator=(const vtkXMLUnstructuredGridReader&);  // Not implemented.
00082 };
00083 
00084 #endif