[vtk-developers] vtkAOSDataArrayTemplate annoying API change
Bill Lorensen
bill.lorensen at gmail.com
Thu Mar 24 13:41:25 EDT 2016
Why not
Set/Get/Insert/InsertNext/Tuple
SetTuple, GetTuple, InsertTuple and InsertMNextTuple are used in many
other classes.
On Wed, Mar 23, 2016 at 9:48 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> The new names don't make much sense to me.
>
> On Mar 23, 2016 8:51 PM, "David Gobbi" <david.gobbi at gmail.com> wrote:
>>
>> 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
>>
>>
>>
>
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtk-developers
mailing list