[vtk-developers] Recent change to vtkTexture.h adds compiler warnings

David C Thompson dcthomp at sandia.gov
Fri Jun 27 13:33:08 EDT 2008


> 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
   vtkSetEnumMacro(ivar,enumName);
   vtkGetEnumMacro(ivar,enumName);
so that the wrapper can deal with enum ivars? It would be trivial to
have the wrapper parse it and cast to an int.

	David





More information about the vtk-developers mailing list