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

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