| 34 | } // end anon namespace |
| 35 | |
| 36 | VTK_ABI_NAMESPACE_BEGIN |
| 37 | //------------------------------------------------------------------------------ |
| 38 | void vtkDataArray::SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) |
| 39 | { |
| 40 | vtkDataArray* srcDA = vtkDataArray::FastDownCast(source); |
| 41 | if (!srcDA) |
| 42 | { |
| 43 | vtkErrorMacro( |
| 44 | "Source array must be a vtkDataArray subclass (got " << source->GetClassName() << ")."); |
| 45 | return; |
| 46 | } |
| 47 | |
| 48 | if (source->GetNumberOfComponents() != this->GetNumberOfComponents()) |
| 49 | { |
| 50 | vtkErrorMacro("Number of components do not match: Source: " |
| 51 | << source->GetNumberOfComponents() << " Dest: " << this->GetNumberOfComponents()); |
| 52 | return; |
| 53 | } |
| 54 | |
| 55 | SetTupleArrayWorker worker(srcTupleIdx, dstTupleIdx); |
| 56 | if (!vtkArrayDispatch::Dispatch2::Execute(srcDA, this, worker)) |
| 57 | { |
| 58 | worker(srcDA, this); |
| 59 | } |
| 60 | } |
| 61 | VTK_ABI_NAMESPACE_END |
nothing calls this directly
no test coverage detected