[vtk-developers] Abstract trouble today

David Gobbi dgobbi at imaging.robarts.ca
Fri Jul 5 16:53:23 EDT 2002


Yes, static methods are a little bit problematic wrt wrapping
languages, since the concept of 'static method' doesn't
exist in tcl or python.  In python I've made a special
'vtkclass' type that allows things like

>>> vtkObject.GlobalWarningDisplayOff()

even though python's native classes allow no such thing
(native python classes don't allow method calls unless
you provide an instantiated object to do the call from).

P.S. JB:  I started wrapping abstract classes in python
because I had this dream that the python wrappers would
eventually support proper subclassing of all VTK classes,
including virtual method hooks and the whole bit.  Alas,
it is still just a dream.


On 5 Jul 2002, Andy Cedilnik wrote:

> Hi John,
>
> Rough 4th of July... In any case, things seems to work now.
> I think vtkObject should definitely stay non-abstract.
>
> vtkObject rtTempObject;
> rtTempObject GlobalWarningDisplayOff;
>
> 		Andy
>
>
> On Fri, 2002-07-05 at 06:12, John Biddiscombe wrote:
> > > I guess vtkcommon will have to be changed too (it is checking for
> > vtkObject)
> >
> > As Andy mentioned, I see that several scripts use a vtkObject instance to
> > enable Global warnings etc. I've implemented a "manual" workaround for
> > vtkObject in my wrapping code, so I'm happy to leave it alone. (Of course,
> > the purist in me is itching to make it abstract, but its probably more
> > trouble than its worth) - does anyone really want it to be abstract other
> > than myself?
> >
> > JB
> > (Apologies to David for making him change his python stuff to handle an
> > abstract vtkObject last year).
> >
> > _______________________________________________
> > vtk-developers mailing list
> > vtk-developers at public.kitware.com
> > http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtk-developers
>




More information about the vtk-developers mailing list