[vtk-developers] vtk macros

Bill Lorensen bill.lorensen at gmail.com
Mon Jul 9 15:40:08 EDT 2012


vtkSetObjectMacro should never be used, slicer code or not. Perhaps we
should replace the vtkSetObjectMacro to report an error and tell the
developer how to use vtkCxxSetObjectMacro.

On Mon, Jul 9, 2012 at 3:35 PM, Jean-Christophe Fillion-Robin <
jchris.fillionr at kitware.com> wrote:

>
> From the VTK coding standard page:
>
> "Avoid using vtkSetObjectMacro since it will require including the header
> file of another class. Use the vtkCxxSetObjectMacro instead."
>
> (( When writing Slicer related  code, do NOT use vtkSetObjectMacro))
>
> Hth
> Jc
>
> On Mon, Jul 9, 2012 at 3:23 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
>
>> There is no vtkCxxSetMacro used in VTK. There is a vtkCxxSetObjectMacro
>> and the explanation on the coding standards page you mentioned describes
>> why it should be used.
>>
>> On Mon, Jul 9, 2012 at 10:44 AM, Laurent Chauvin <
>> lchauvin at bwh.harvard.edu> wrote:
>>
>>> Hello,
>>>
>>> I have a quick question.
>>> Is there a difference between vtkSetMacro and vtkCxxSetMacro.
>>>
>>> I read from here (http://www.vtk.org/Wiki/VTK_Coding_Standards) to use
>>> vtkCxxSetMacro,
>>> but here (http://www.vtk.org/Wiki/VTK/Examples/Developers/Macros) there
>>> is only vtkSetMacro.
>>>
>>> Thank you.
>>>   -Laurent
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>>
>>
>
>
> --
> +1 919 869 8849
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120709/b19c9670/attachment.html>


More information about the vtk-developers mailing list