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