[vtk-developers] vtkAOSDataArrayTemplate annoying API change

David Gobbi david.gobbi at gmail.com
Wed Mar 23 23:51:17 EDT 2016


On Wed, Mar 23, 2016 at 8:55 PM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:

> Recently the API for vtkAOSDataArrayTemplate was changed.
>
> Set/Get/Insert/InsertNextTupleValue was changed to
> Set/Get/Insert/InsertNextTypedTuple.
>
> What was the purpose of the name change?
>
> There are 13 c++ wiki examples that use the old API. I will need to
> #if the changed code so that it will still compile with older vtk
> versions. I do not turn on legacy options for the examples.
>
> Seems like an arbitrary change to me.
>

I was bitten by this as well.  But I can understand the rationale
behind the change.  The old name made little sense.

Actually, I recommend going even further: add new methods
called GetTypedValue() et al. and deprecate GetValue() et al.
Then, for VTK 8, I would love to see these method appear:

  double vtkDataArray::GetValue()
  vtkIdType vtkAbstractArray::GetNumberOfValues()

I would really like GetNumberOfValues() to make a comeback.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160323/8a6ef0c7/attachment.html>


More information about the vtk-developers mailing list