[vtk-developers] Recent change to vtkTexture.h adds compiler warnings
david.cole at kitware.com
Sat Jun 28 09:18:42 EDT 2008
enum ivars aren't really a problem.... but enum types in method signatures
are not recognized for wrapping into tcl and python...
Whether it would be "worth it" or not to undertake trying to get enums
recognized as full-fledged wrappable entities in VTK probably depends on who
you talk to and how you think.
If somebody out there would like to develop a patch that proves it's do-able
to wrap a method with an enum type in the signature into tcl, python *and*
java, (with corresponding tests that prove the methods execute properly from
all the wrapper layers) I would certainly be willing to review it.
Personally, I do not have the time to do this right now.
And if we did do it, we would still have all the old-style "must-have-int"
methods that would suddenly look silly next to the shiny new "enum-friendly"
methods... This is where all the actual time would end up being spent. Could
all the old methods be converted in a backwards-compatible way? Or would we
end up with a very large set of deprecated methods and their new
I would only encourage it's adoption into CVS HEAD VTK if there were a
reasonable automatic backwards-compatibility strategy. Because if there's
not, we'll end up with two ways of doing it forever... "one way of doing it"
is better in terms of documenting or explaining how VTK works, even if that
one way involves casting to int and being less elegant than the "newer
Just my 2 cents,
On Fri, Jun 27, 2008 at 1:33 PM, David C Thompson <dcthomp at sandia.gov>
> > And... the enums are still there. They are just not used as the data
> > member type in vtkGetMacro/vtkSetMacro so that wrapping works. In the
> > cxx file, you are still free to use the enum type in a local variable,
> > for example.
> Yes, but since the ivars are now declared as integers instead of enums,
> you must remember to cast them to enums in order to be warned about
> switch statements with missing enums... which is unlikely to happen if
> you remember to cast it to an enum in the first place.
> Is it worth adding a new Get/Set macro like
> so that the wrapper can deal with enum ivars? It would be trivial to
> have the wrapper parse it and cast to an int.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtk-developers