<div dir="ltr"><div style>The reasoning for adding this was because I needed to use something like a Get/Set with vtkAMRBox which is a light-weight object and does not inherit from vtkObject. As you mentioned, this was added before the gerrit workflow was in place and therefore did not go through the normal review process, which would have caught any issues.</div>

<div style><br></div><div style>That said, I don&#39;t have any use for the vtkSetNGetMacro anymore and I don&#39;t think vtkAMRBox uses that any longer. I am agnostic as to whether you remove it or not. </div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Mar 25, 2013 at 11:05 PM, David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi All,<br>
<br>
I clicked on a dashboard compile error today and saw something that<br>
was like finding a cockroach in my salad.<br>
<br>
A new macro.<br>
<br>
Someone snuck a new macro called vtkSetNGetMacro into vtkSetGet.h.<br>
<br>
I won&#39;t go into the reasons why macros are bad.  Every C++ programmer<br>
already knows.  In VTK, we generally try to keep our macros caged in<br>
a little file called vtkSetGet.h where they have sat mostly unchanged<br>
for a dozen years.  We don&#39;t let our macros breed.<br>
<br>
Here are problems with vtkSetNGetMacro:<br>
<br>
1) It isn&#39;t, as its name suggests, the same as having a SetMacro and<br>
a GetMacro.  How is it different?  It doesn&#39;t call &quot;Modified&quot; on the<br>
object.  And it&#39;s very important for Set methods to call Modified.<br>
(To be fair, the documentation does state &quot;this macro can be used on<br>
non-vtkObject classes&quot; but it should also state &quot;this macro should<br>
_not_ be used on vtkObject-derived classes&quot;).<br>
<br>
2) The macros in vtkSetGet.h are hard-coded into the wrappers.  This<br>
is historical and will eventually be fixed.  But for now, using a new<br>
macro to define your class interface is likely to make your class<br>
unwrappable.<br>
<br>
3) The biggest problem, however, it is that it is a new macro, and if<br>
people plan to add new macros, I think they should check with Berk,<br>
Brad, or Will first.<br>
<br>
 - David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br></div>