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

# IO/vtkXMLPDataReader.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkXMLPDataReader.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 =========================================================================*/
    00040 #ifndef __vtkXMLPDataReader_h
    00041 #define __vtkXMLPDataReader_h
    00042
    00043 #include "vtkXMLReader.h"
    00044
    00045 class vtkDataArray;
    00046 class vtkDataSet;
    00047 class vtkXMLDataReader;
    00048
    00049 class VTK_IO_EXPORT vtkXMLPDataReader : public vtkXMLReader
    00050 {
    00051 public:
    00052   vtkTypeRevisionMacro(vtkXMLPDataReader,vtkXMLReader);
    00053   void PrintSelf(ostream& os, vtkIndent indent);
    00054
    00056
    00057   vtkGetMacro(NumberOfPieces, int);
    00059
    00060 protected:
    00061   vtkXMLPDataReader();
    00062   ~vtkXMLPDataReader();
    00063
    00064   // Pipeline execute information driver.  Called by vtkXMLReader.
    00065   void ReadXMLInformation();
    00066   int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
    00067
    00068   vtkDataSet* GetPieceInputAsDataSet(int piece);
    00069   void SetupOutputInformation();
    00070   void SetupOutputData();
    00071
    00072   virtual vtkXMLDataReader* CreatePieceReader()=0;
    00073   virtual vtkIdType GetNumberOfPoints()=0;
    00074   virtual vtkIdType GetNumberOfCells()=0;
    00075   virtual void CopyArrayForPoints(vtkDataArray* inArray,
    00076                                   vtkDataArray* outArray)=0;
    00077   virtual void CopyArrayForCells(vtkDataArray* inArray,
    00078                                  vtkDataArray* outArray)=0;
    00079
    00080   virtual void SetupPieces(int numPieces);
    00081   virtual void DestroyPieces();
    00082   int ReadPiece(vtkXMLDataElement* ePiece, int index);
    00083   virtual int ReadPiece(vtkXMLDataElement* ePiece);
    00084   int ReadPieceData(int index);
    00085   virtual int ReadPieceData();
    00086   int CanReadPiece(int index);
    00087
    00088   char* CreatePieceFileName(const char* fileName);
    00089   void SplitFileName();
    00090
    00091   // Pieces from the input summary file.
    00092   int NumberOfPieces;
    00093
    00094   // The ghost level available on each input piece.
    00095   int GhostLevel;
    00096
    00097   // The piece currently being read.
    00098   int Piece;
    00099
    00100   // The path to the input file without the file name.
    00101   char* PathName;
    00102
    00103   // Information per-piece.
    00104   vtkXMLDataElement** PieceElements;
    00105   vtkXMLDataReader** PieceReaders;
    00106   int* CanReadPieceFlag;
    00107
    00108   // The PPointData and PCellData element representations.
    00109   vtkXMLDataElement* PPointDataElement;
    00110   vtkXMLDataElement* PCellDataElement;
    00111
    00112 private:
    00113   vtkXMLPDataReader(const vtkXMLPDataReader&);  // Not implemented.
    00114   void operator=(const vtkXMLPDataReader&);  // Not implemented.
    00115 };
    00116
    00117 #endif