VTK
dox/IO/XML/vtkXMLGenericDataObjectReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile$
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 __vtkXMLGenericDataObjectReader_h
00029 #define __vtkXMLGenericDataObjectReader_h
00030 
00031 #include "vtkIOXMLModule.h" // For export macro
00032 #include "vtkXMLDataReader.h"
00033 
00034 class vtkHierarchicalBoxDataSet;
00035 class vtkHyperOctree;
00036 class vtkMultiBlockDataSet;
00037 class vtkImageData;
00038 class vtkPolyData;
00039 class vtkRectilinearGrid;
00040 class vtkStructuredGrid;
00041 class vtkUnstructuredGrid;
00042 
00043 class VTKIOXML_EXPORT vtkXMLGenericDataObjectReader : public vtkXMLDataReader
00044 {
00045 public:
00046   vtkTypeMacro(vtkXMLGenericDataObjectReader,vtkXMLDataReader);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048   static vtkXMLGenericDataObjectReader *New();
00049 
00051 
00052   vtkDataObject *GetOutput();
00053   vtkDataObject *GetOutput(int idx);
00055 
00057 
00062   vtkHierarchicalBoxDataSet *GetHierarchicalBoxDataSetOutput();
00063   vtkHyperOctree *GetHyperOctreeOutput();
00064   vtkImageData *GetImageDataOutput();
00065   vtkMultiBlockDataSet *GetMultiBlockDataSetOutput();
00066   vtkPolyData *GetPolyDataOutput();
00067   vtkRectilinearGrid *GetRectilinearGridOutput();
00068   vtkStructuredGrid *GetStructuredGridOutput();
00069   vtkUnstructuredGrid *GetUnstructuredGridOutput();
00071 
00073   vtkIdType GetNumberOfPoints();
00074 
00076   vtkIdType GetNumberOfCells();
00077 
00079   void SetupEmptyOutput();
00080 
00083   virtual int ReadOutputType(const char *name, bool &parallel);
00084 
00085 protected:
00086   vtkXMLGenericDataObjectReader();
00087   ~vtkXMLGenericDataObjectReader();
00088 
00090   const char* GetDataSetName();
00091 
00092 
00093   virtual int RequestDataObject(vtkInformation *, vtkInformationVector **,
00094                                 vtkInformationVector *);
00095   virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
00096                                  vtkInformationVector *);
00097   virtual int RequestUpdateExtent(vtkInformation *request,
00098                                   vtkInformationVector **inputVector,
00099                                   vtkInformationVector *outputVector);
00100 
00101   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00102                           vtkInformationVector *);
00103   virtual int FillOutputPortInformation(int, vtkInformation *);
00104 
00105   vtkXMLReader *Reader; // actual reader
00106 
00107 private:
00108   vtkXMLGenericDataObjectReader(const vtkXMLGenericDataObjectReader&);  // Not implemented.
00109   void operator=(const vtkXMLGenericDataObjectReader&);  // Not implemented.
00110 };
00111 
00112 #endif