[Paraview-developers] Removal of ExecuteData(...)

Berk Geveci berk.geveci at kitware.com
Fri May 1 09:21:15 EDT 2015


Ahhhh! If a filter has RequestData(), which does not call another method
such as Execute() or ExecuteData(), it is 100% safe to remove those. Only
RequestData() would be called by the superclass and any other method that
were there for legacy reasons will never get called. Sorry for being dense
:-)

-berk


On Fri, May 1, 2015 at 2:23 AM, Schlottke, Michael <
M.Schlottke at aia.rwth-aachen.de> wrote:

>  The filter *does* something in RequestData, but the Execute() method is a
> stub (probably implemented back when it still carried some purpose and
> never removed).
>
>  I was asking because I’ve already encountered the situation once before
> that the removal of a (trivial) virtual method caused the parent class
> method to change the observable behavior in unexpected ways. A quick search
> of the current VTK sources, however, seems to indicate that the Execute()
> method is not used anywhere anymore, so I guess I should be safe.
>
>  Michael
>
>  On 30 Apr 2015, at 22:58 , Berk Geveci <berk.geveci at kitware.com> wrote:
>
>  Hi Michael,
>
>  If it is no-op, by all means remove it. What is the purpose of this
> filter, if it pretty much does nothing? :-)
>
>  -berk
>
> On Thu, Apr 30, 2015 at 1:12 AM, Schlottke, Michael <
> M.Schlottke at aia.rwth-aachen.de> wrote:
>
>> Hi Berk,
>>
>>  Thank you for your answer. What do you mean by “minor changes” (other
>> than that I somehow have to obtain the correct output pointer)? And do I
>> really need to pass data to Execute()? As far as I can tell, the particular
>> filter I’m looking at does nothing in Execute() (really a no-op), so it
>> seems like a good candidate to be removed completely.
>>
>>  Michale
>>
>>  On 28 Apr 2015, at 15:52 , Berk Geveci <berk.geveci at kitware.com> wrote:
>>
>>  Hi Michael,
>>
>>  You will need some minor changes but yes you can move that to
>> RequestData(). You will have to pass the input and output to Execute()
>> somehow.
>>
>>  Best,
>> -berk
>>
>> On Tue, Apr 28, 2015 at 5:37 AM, Schlottke, Michael <
>> M.Schlottke at aia.rwth-aachen.de> wrote:
>>
>>>  Hi again,
>>>
>>>  I am trying to follow the VTK guide (
>>> http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_Execute) on
>>> migrating a set of ParaView plugins from VTK 5 to VTK 6.
>>>
>>>  Just to be sure, what would be the correct way to replace the
>>> following implementation:
>>>
>>>
>>> /////////////////////////////////////////////////////////////////////////
>>>  void vtkMyAlgorithmSubclass::ExecuteData(vtkDataObject *output)
>>>
>>> {
>>>
>>>   if (output && this->UpdateExtentIsEmpty(output))
>>>
>>>     {
>>>
>>>     output->Initialize();
>>>
>>>     return;
>>>
>>>     }
>>>
>>>
>>>
>>>   this->Execute();
>>>
>>> }
>>>
>>> /////////////////////////////////////////////////////////////////////////
>>>
>>>  Can I just move this whole code into RequestData (and use the
>>> vtkDataObject* output as a downcast from my output info object)? Is the
>>> call to Execute() still needed in this case?
>>>
>>>  Thanks!
>>>
>>>  Michael
>>>
>>>
>>>  --
>>> Michael Schlottke
>>>
>>> Chair of Fluid Mechanics and Institute of Aerodynamics
>>> RWTH Aachen University
>>> Wüllnerstraße 5a
>>> 52062 Aachen
>>> Germany
>>>
>>> Phone: +49 (241) 80 95188
>>> Fax: +49 (241) 80 92257
>>> Mail: m.schlottke at aia.rwth-aachen.de
>>> Web: http://www.aia.rwth-aachen.de
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Search the list archives at:
>>> http://markmail.org/search/?q=Paraview-developers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20150501/8495c3fa/attachment.html>


More information about the Paraview-developers mailing list