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

Method InsertNextTuple

Common/Core/vtkStringArray.cxx:715–731  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Insert the jth tuple in the source array, at the end in this array. Note that memory allocation is performed as necessary to hold the data. Returns the location at which the data was inserted.

Source from the content-addressed store, hash-verified

713// Note that memory allocation is performed as necessary to hold the data.
714// Returns the location at which the data was inserted.
715vtkIdType vtkStringArray::InsertNextTuple(vtkIdType j, vtkAbstractArray* source)
716{
717 vtkStringArray* sa = vtkArrayDownCast<vtkStringArray>(source);
718 if (!sa)
719 {
720 vtkWarningMacro("Input and outputs array data types do not match.");
721 return -1;
722 }
723
724 vtkIdType locj = j * sa->GetNumberOfComponents();
725 for (vtkIdType cur = 0; cur < this->NumberOfComponents; cur++)
726 {
727 this->InsertNextValue(sa->GetValue(locj + cur));
728 }
729 this->DataChanged();
730 return (this->GetNumberOfTuples() - 1);
731}
732
733//------------------------------------------------------------------------------
734const vtkStringArray::ValueType& vtkStringArray::GetValue(vtkIdType id) const

Callers

nothing calls this directly

Calls 5

InsertNextValueMethod · 0.95
DataChangedMethod · 0.95
GetNumberOfComponentsMethod · 0.45
GetValueMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected