[Paraview] Multiple inheritance in filter writing

Benjamin Schindler bschindler at student.ethz.ch
Tue Jan 6 11:20:18 EST 2009


Hi

I've got a filter which is shared among a paraview plugin and some other 
tools. That's why it inherits a basic threading class to simplify 
writing threaded filters.

The filter is defined as follows:

class vtkMyFilter: public vtkUnstructuredGridAlgorithm, public 
vtkThreadedFilter

The ThreadedFilter class has a vtk prefix to make the parser happy.... 
Anyway, I run this filter, because in the generated file:
vtkMyFilterClientServer.cxx, there is a function defined and used called:

int vtkThreadedFilterCommand(vtkClientServerInterpreter*, 
vtkObjectBase*, const char*, const vtkClientServerStream&, 
vtkClientServerStream& resultStream);

Obviously, such a function is defined for every base class - but the one 
above does not exist because vtkThreadedFilter is not wrapped. The easy 
solution would be to wrap vtkThreadedFilter, but this requires the 
definition of the New, SafeDownCast etc macros like in every other vtk 
object. However, since vtkThreadedFilter is not a vtk Object by 
themselves, it does not have a vtk baseclass and therefore, I cannot 
declare the macro vtkTypeRevisionMacro.

Is there a simple solution to this mess?

Thanks
Benjamin


More information about the ParaView mailing list