enum ivars aren't really a problem.... but enum types in method signatures are not recognized for wrapping into tcl and python...<br><br>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.<br>
<br>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.<br>
<br>Personally, I do not have the time to do this right now.<br><br>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 replacements...?<br>
<br>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 better way"...<br>
<br><br>Just my 2 cents,<br>David<br><br><br><div class="gmail_quote">On Fri, Jun 27, 2008 at 1:33 PM, David C Thompson <<a href="mailto:dcthomp@sandia.gov">dcthomp@sandia.gov</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">> And... the enums are still there. They are just not used as the data<br>
> member type in vtkGetMacro/vtkSetMacro so that wrapping works. In the<br>
> cxx file, you are still free to use the enum type in a local variable,<br>
> for example.<br>
</div>Yes, but since the ivars are now declared as integers instead of enums,<br>
you must remember to cast them to enums in order to be warned about<br>
switch statements with missing enums... which is unlikely to happen if<br>
you remember to cast it to an enum in the first place.<br>
<br>
Is it worth adding a new Get/Set macro like<br>
   vtkSetEnumMacro(ivar,enumName);<br>
   vtkGetEnumMacro(ivar,enumName);<br>
so that the wrapper can deal with enum ivars? It would be trivial to<br>
have the wrapper parse it and cast to an int.<br>
<font color="#888888"><br>
        David<br>
<br>
<br>
</font></blockquote></div><br>