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

Method DataElementChanged

Common/Core/vtkVariantArray.cxx:1038–1060  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1036
1037//------------------------------------------------------------------------------
1038void vtkVariantArray::DataElementChanged(vtkIdType id)
1039{
1040 if (this->Lookup)
1041 {
1042 if (this->Lookup->Rebuild)
1043 {
1044 // We're already going to rebuild the lookup table. Do nothing.
1045 return;
1046 }
1047
1048 if (this->Lookup->CachedUpdates.size() > static_cast<size_t>(this->GetNumberOfTuples() / 10))
1049 {
1050 // At this point, just rebuild the full table.
1051 this->Lookup->Rebuild = true;
1052 }
1053 else
1054 {
1055 // Insert this change into the set of cached updates
1056 std::pair<const ValueType, vtkIdType> value(this->GetValue(id), id);
1057 this->Lookup->CachedUpdates.insert(value);
1058 }
1059 }
1060}
1061
1062//------------------------------------------------------------------------------
1063void vtkVariantArray::ClearLookup()

Callers 3

SetValueMethod · 0.95
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