<br>+1 from me. I prefer vtkClassMacro.<br><br><div class="gmail_quote">On Thu, Sep 13, 2012 at 11:01 AM, Robert Maynard <span dir="ltr"><<a href="mailto:robert.maynard@kitware.com" target="_blank">robert.maynard@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+1 I fully support any reduction in the amount of boilerplate code in each VTK class header, and this also decreases the number<div>
of mistakes that developers have while writing new classes.<div><div class="h5"><br><br><div class="gmail_quote">

On Thu, Sep 13, 2012 at 10:58 AM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


On Thu, Sep 13, 2012 at 10:16 AM, Aashish Chaudhary<br>
<div><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>> wrote:<br>
> On Thu, Sep 13, 2012 at 9:53 AM, Kyle Lutz <<a href="mailto:kyle.lutz@kitware.com" target="_blank">kyle.lutz@kitware.com</a>> wrote:<br>
>><br>
>> On Thu, Sep 13, 2012 at 6:48 AM, Aashish Chaudhary<br>
>> <<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>> wrote:<br>
>> > +1, can we add virtual keyword in front of the ~className()?<br>
>> ><br>
>> > Or are you going to rely on the fact that the parent class has defined<br>
>> > its<br>
>> > destructor virtual (like vtkObject?)<br>
>><br>
>> The macro is only intended for classes deriving from vtkObject (really<br>
>> vtkObjectBase) so declaring the destructor as virtual would be<br>
>> redundant.<br>
><br>
> Yes, but in general IMO, it is not a good practice to leave virtual keyword<br>
> out just because base class has declared virtual destructor.  Also implicit<br>
> something is not good unless properly documented. Since we are talking about<br>
> a macro, I don't think its too bad to have virtual keyword in front of the<br>
> desctructor.<br>
><br>
</div>I am in favor of adding the macro, and disagree with Utkarsh in that<br>
we already have the type macro etc and it will remove the need for a<br>
lot of boiler plate code in each class declaration. I really agree<br>
with Kyle - it is only intended for (and would only work) with<br>
vtkObjectBase derived classes and so the virtual keyword is redundant.<br>
<br>
This has bothered me for a long time, and I never found time to write<br>
the macro. I think it would be a great addition, the vtkObjectMacro<br>
was inspired by the Q_OBJECT macro, vtkClassMacro and<br>
vtkAbstractClassMacro sound good to me. We wanted to get consensus on<br>
the common case before extending it to the abstract case.<br>
<br>
I think removing PrintSelf would be reasonable, as David states not<br>
all classes will have ivars and the developer of the class must<br>
implement the function body as Utkarsh pointed out.<br>
<br>
My $0.03.<br>
<span><font color="#888888"><br>
Marcus<br>
</font></span><div><div>_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Robert Maynard<br>
</font></span></div>
<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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>