MCPcopy Create free account
hub / github.com/Kitware/VTK / InsertTuplesStartingAt

Method InsertTuplesStartingAt

Common/Core/vtkStringArray.cxx:640–670  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

638
639//------------------------------------------------------------------------------
640void vtkStringArray::InsertTuplesStartingAt(
641 vtkIdType dstStart, vtkIdList* srcIds, vtkAbstractArray* source)
642{
643 vtkStringArray* sa = vtkArrayDownCast<vtkStringArray>(source);
644 if (!sa)
645 {
646 vtkWarningMacro("Input and outputs array data types do not match.");
647 return;
648 }
649
650 if (this->NumberOfComponents != source->GetNumberOfComponents())
651 {
652 vtkWarningMacro("Input and output component sizes do not match.");
653 return;
654 }
655
656 vtkIdType numIds = srcIds->GetNumberOfIds();
657
658 for (vtkIdType idIndex = 0; idIndex < numIds; ++idIndex)
659 {
660 vtkIdType numComp = this->NumberOfComponents;
661 vtkIdType srcLoc = srcIds->GetId(idIndex) * this->NumberOfComponents;
662 vtkIdType dstLoc = (dstStart + idIndex) * this->NumberOfComponents;
663 while (numComp-- > 0)
664 {
665 this->InsertValue(dstLoc++, sa->GetValue(srcLoc++));
666 }
667 }
668
669 this->DataChanged();
670}
671
672//------------------------------------------------------------------------------
673void vtkStringArray::InsertTuples(

Callers

nothing calls this directly

Calls 6

InsertValueMethod · 0.95
DataChangedMethod · 0.95
GetNumberOfComponentsMethod · 0.45
GetNumberOfIdsMethod · 0.45
GetIdMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected