------------------------------------------------------------------------------ Set the tuple at the ith location using the jth tuple in the source array. This method assumes that the two arrays have the same type and structure. Note that range checking and memory allocation is not performed; use in conjunction with SetNumberOfTuples() to allocate space.
| 561 | // and structure. Note that range checking and memory allocation is not |
| 562 | // performed; use in conjunction with SetNumberOfTuples() to allocate space. |
| 563 | void vtkStringArray::SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source) |
| 564 | { |
| 565 | vtkStringArray* sa = vtkArrayDownCast<vtkStringArray>(source); |
| 566 | if (!sa) |
| 567 | { |
| 568 | vtkWarningMacro("Input and outputs array data types do not match."); |
| 569 | return; |
| 570 | } |
| 571 | |
| 572 | vtkIdType loci = i * this->NumberOfComponents; |
| 573 | vtkIdType locj = j * sa->GetNumberOfComponents(); |
| 574 | for (vtkIdType cur = 0; cur < this->NumberOfComponents; cur++) |
| 575 | { |
| 576 | this->SetValue(loci + cur, sa->GetValue(locj + cur)); |
| 577 | } |
| 578 | this->DataChanged(); |
| 579 | } |
| 580 | |
| 581 | //------------------------------------------------------------------------------ |
| 582 | // Insert the jth tuple in the source array, at ith location in this array. |
nothing calls this directly
no test coverage detected