VTK
dox/IO/vtkGraphReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGraphReader.h
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 =========================================================================*/
00030 #ifndef __vtkGraphReader_h
00031 #define __vtkGraphReader_h
00032 
00033 #include "vtkDataReader.h"
00034 
00035 class vtkGraph;
00036 
00037 class VTK_IO_EXPORT vtkGraphReader : public vtkDataReader
00038 {
00039 public:
00040   static vtkGraphReader *New();
00041   vtkTypeMacro(vtkGraphReader,vtkDataReader);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00046   vtkGraph *GetOutput();
00047   vtkGraph *GetOutput(int idx);
00048   void SetOutput(vtkGraph *output);
00050   
00051 protected:
00052   vtkGraphReader();
00053   ~vtkGraphReader();
00054 
00055   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00056                           vtkInformationVector *);
00057 
00058   // Override ProcessRequest to handle request data object event
00059   virtual int ProcessRequest(vtkInformation *, vtkInformationVector **,
00060                              vtkInformationVector *);
00061 
00062   // Since the Outputs[0] has the same UpdateExtent format
00063   // as the generic DataObject we can copy the UpdateExtent
00064   // as a default behavior.
00065   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
00066                                   vtkInformationVector *);
00067 
00068   // Create output (a directed or undirected graph).
00069   virtual int RequestDataObject(vtkInformation *, vtkInformationVector **,
00070                                 vtkInformationVector *);
00071 
00072   // Read beginning of file to determine whether the graph is directed.
00073   virtual int ReadGraphDirectedness(bool & directed);
00074 
00075   
00076   virtual int FillOutputPortInformation(int, vtkInformation*);
00077 private:
00078   vtkGraphReader(const vtkGraphReader&);  // Not implemented.
00079   void operator=(const vtkGraphReader&);  // Not implemented.
00080 };
00081 
00082 #endif
00083 
00084