------------------------------------------------------------------------------ Insert the jth tuple in the source array, at ith location in this array. Note that memory allocation is performed as necessary to hold the data.
| 582 | // Insert the jth tuple in the source array, at ith location in this array. |
| 583 | // Note that memory allocation is performed as necessary to hold the data. |
| 584 | void vtkStringArray::InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source) |
| 585 | { |
| 586 | vtkStringArray* sa = vtkArrayDownCast<vtkStringArray>(source); |
| 587 | if (!sa) |
| 588 | { |
| 589 | vtkWarningMacro("Input and outputs array data types do not match."); |
| 590 | return; |
| 591 | } |
| 592 | |
| 593 | vtkIdType loci = i * this->NumberOfComponents; |
| 594 | vtkIdType locj = j * sa->GetNumberOfComponents(); |
| 595 | for (vtkIdType cur = 0; cur < this->NumberOfComponents; cur++) |
| 596 | { |
| 597 | this->InsertValue(loci + cur, sa->GetValue(locj + cur)); |
| 598 | } |
| 599 | this->DataChanged(); |
| 600 | } |
| 601 | |
| 602 | //------------------------------------------------------------------------------ |
| 603 | void vtkStringArray::InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) |
no test coverage detected