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

Method DataElementChanged

Common/Core/vtkStringArray.cxx:969–991  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

967
968//------------------------------------------------------------------------------
969void vtkStringArray::DataElementChanged(vtkIdType id)
970{
971 if (this->Lookup)
972 {
973 if (this->Lookup->Rebuild)
974 {
975 // We're already going to rebuild the lookup table. Do nothing.
976 return;
977 }
978
979 if (this->Lookup->CachedUpdates.size() > static_cast<size_t>(this->GetNumberOfTuples() / 10))
980 {
981 // At this point, just rebuild the full table.
982 this->Lookup->Rebuild = true;
983 }
984 else
985 {
986 // Insert this change into the set of cached updates
987 std::pair<const ValueType, vtkIdType> value(this->GetValue(id), id);
988 this->Lookup->CachedUpdates.insert(value);
989 }
990 }
991}
992
993//------------------------------------------------------------------------------
994void vtkStringArray::ClearLookup()

Callers 2

InsertValueMethod · 0.95
InsertNextValueMethod · 0.95

Calls 4

sizeMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetValueMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected