[vtk-developers] Reparented reader classes

Will Schroeder will.schroeder at kitware.com
Thu Nov 30 08:05:18 EST 2000


Hi Folks-

I reparented the reader classes (vtkPolyDataReader, 
vtkStructuredPointsReader, vtkUnstructuredGridReader, 
vtkRectilinearGridReader, vtkStructuredGridReader, vtkDataSetReader, 
vtkDataObjectReader). The superclass of these classes is now
vtkDataReader, and vtkDataReader's new superclass is vtkSource.

It turns out that this design change (suggested by Ken), eliminated several 
hundreds lines of code. And since the readers used to delegate to 
vtkDataReader, many recently added methods in vtkDataReader were not being 
properly delegated by the readers. There were several other nice clean-ups 
including removal of static variables, no need to delegate internal methods 
(like DebugOn), etc.

Previously, the readers were subclasses of a source, vtkPolyDataReader 
subclassed from vtkPolyDataSource. But essentially all the source did was 
define the GetOutput()/SetOutput() methods. These represented a lot less 
code than was previously delegated to in vtkDataReader. (We don't do 
multiple inheritance in vtk)

Let me know if there are any problems.

Will





More information about the vtk-developers mailing list