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

Method UpdateCache

Filters/Temporal/vtkDataObjectMeshCache.cxx:302–324  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

300
301//------------------------------------------------------------------------------
302void vtkDataObjectMeshCache::UpdateCache(vtkDataObject* output)
303{
304 if (!output)
305 {
306 vtkWarningMacro("Cannot update from nullptr");
307 return;
308 }
309
310 bool isSupported = this->IsSupportedData(output);
311 if (!isSupported)
312 {
313 vtkWarningMacro("Cannot update from unsupported data type: " << output->GetClassName());
314 return;
315 }
316
317 this->Cache.TakeReference(output->NewInstance());
318 this->Cache->ShallowCopy(output);
319 this->CachedOriginalMeshTime = this->GetOriginalMeshTime();
320 this->CachedConsumerTime = this->Consumer->GetMTime();
321
322 vtkCacheLog(INFO, "Update Cache: " << this->Cache.GetPointer());
323 this->Modified();
324}
325
326//------------------------------------------------------------------------------
327void vtkDataObjectMeshCache::InvalidateCache()

Callers 4

TestCacheInitializationFunction · 0.45
TestModifiedTimeFunction · 0.45
TestUnsupportedCallsFunction · 0.45
InitializeCacheMethod · 0.45

Calls 9

IsSupportedDataMethod · 0.95
GetOriginalMeshTimeMethod · 0.95
GetClassNameMethod · 0.45
TakeReferenceMethod · 0.45
NewInstanceMethod · 0.45
ShallowCopyMethod · 0.45
GetMTimeMethod · 0.45
GetPointerMethod · 0.45
ModifiedMethod · 0.45

Tested by 3

TestCacheInitializationFunction · 0.36
TestModifiedTimeFunction · 0.36
TestUnsupportedCallsFunction · 0.36