VTK
dox/IO/vtkCompositeDataReader.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 =========================================================================*/
00020 #ifndef __vtkCompositeDataReader_h
00021 #define __vtkCompositeDataReader_h
00022 
00023 #include "vtkDataReader.h"
00024 
00025 class vtkCompositeDataSet;
00026 class vtkMultiBlockDataSet;
00027 class vtkMultiPieceDataSet;
00028 class vtkHierarchicalBoxDataSet;
00029 
00030 class VTK_IO_EXPORT vtkCompositeDataReader : public vtkDataReader
00031 {
00032 public:
00033   static vtkCompositeDataReader* New();
00034   vtkTypeMacro(vtkCompositeDataReader, vtkDataReader);
00035   void PrintSelf(ostream& os, vtkIndent indent);
00036 
00038 
00039   vtkCompositeDataSet *GetOutput();
00040   vtkCompositeDataSet *GetOutput(int idx);
00041   void SetOutput(vtkCompositeDataSet *output);
00043 
00044 //BTX
00045 protected:
00046   vtkCompositeDataReader();
00047   ~vtkCompositeDataReader();
00048 
00049   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00050                           vtkInformationVector *);
00051 
00052   // Override ProcessRequest to handle request data object event
00053   virtual int ProcessRequest(vtkInformation *, vtkInformationVector **,
00054                              vtkInformationVector *);
00055 
00056   // Since the Outputs[0] has the same UpdateExtent format
00057   // as the generic DataObject we can copy the UpdateExtent
00058   // as a default behavior.
00059   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
00060                                   vtkInformationVector *);
00061 
00062   // Create output (a directed or undirected graph).
00063   virtual int RequestDataObject(vtkInformation *, vtkInformationVector **,
00064                                 vtkInformationVector *);
00065 
00066   virtual int FillOutputPortInformation(int, vtkInformation*);
00067 
00069   int ReadOutputType();
00070 
00071   bool ReadCompositeData(vtkMultiPieceDataSet*);
00072   bool ReadCompositeData(vtkMultiBlockDataSet*);
00073   bool ReadCompositeData(vtkHierarchicalBoxDataSet*);
00074   vtkDataObject* ReadChild();
00075 
00076 private:
00077   vtkCompositeDataReader(const vtkCompositeDataReader&); // Not implemented.
00078   void operator=(const vtkCompositeDataReader&); // Not implemented.
00079 //ETX
00080 };
00081 
00082 #endif