Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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 =========================================================================*/
    00042 #ifndef __vtkXMLUnstructuredGridReader_h
    00043 #define __vtkXMLUnstructuredGridReader_h
    00044
    00045 #include "vtkXMLUnstructuredDataReader.h"
    00046
    00047 class vtkUnstructuredGrid;
    00048
    00049 class VTK_IO_EXPORT vtkXMLUnstructuredGridReader : public vtkXMLUnstructuredDataReader
    00050 {
    00051 public:
    00052   vtkTypeRevisionMacro(vtkXMLUnstructuredGridReader,vtkXMLUnstructuredDataReader);
    00053   void PrintSelf(ostream& os, vtkIndent indent);
    00054   static vtkXMLUnstructuredGridReader *New();
    00055
    00057
    00058   void SetOutput(vtkUnstructuredGrid *output);
    00059   vtkUnstructuredGrid *GetOutput();
    00060   vtkUnstructuredGrid *GetOutput(int idx);
    00062
    00063 protected:
    00064   vtkXMLUnstructuredGridReader();
    00065   ~vtkXMLUnstructuredGridReader();
    00066
    00067   const char* GetDataSetName();
    00068   void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
    00069   void SetupOutputTotals();
    00070   void SetupPieces(int numPieces);
    00071   void DestroyPieces();
    00072
    00073   void SetupOutputData();
    00074   int ReadPiece(vtkXMLDataElement* ePiece);
    00075   void SetupNextPiece();
    00076   int ReadPieceData();
    00077
    00078   // Read a data array whose tuples coorrespond to cells.
    00079   int ReadArrayForCells(vtkXMLDataElement* da, vtkDataArray* outArray);
    00080
    00081   // The index of the cell in the output where the current piece
    00082   // begins.
    00083   vtkIdType StartCell;
    00084
    00085   // The Cells element for each piece.
    00086   vtkXMLDataElement** CellElements;
    00087   vtkIdType* NumberOfCells;
    00088
    00089 private:
    00090   vtkXMLUnstructuredGridReader(const vtkXMLUnstructuredGridReader&);  // Not implemented.
    00091   void operator=(const vtkXMLUnstructuredGridReader&);  // Not implemented.
    00092 };
    00093
    00094 #endif