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

Method Initialize

Common/DataModel/vtkCellGridSidesQuery.cxx:45–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45bool vtkCellGridSidesQuery::Initialize()
46{
47 bool ok = this->Superclass::Initialize(); // Reset Pass number.
48 // If we don't have a side-cache, make one as responders should be able to
49 // assume it exists. But warn if we have to create one; this is really the
50 // job of the filter.
51 if (!this->SideCache)
52 {
53 this->TemporarySideCache = true;
54 auto* sideCache = vtkCellGridSidesCache::New();
55 this->SideCache = sideCache;
56 vtkWarningMacro("No side cache was provided; creating a temporary.");
57 }
58 else
59 {
60 // If the cache is older than the query, reset the cache.
61 // Otherwise, allow responders to skip hashing their sides.
62 if (this->GetMTime() > this->SideCache->GetMTime())
63 {
64 this->SideCache->Initialize();
65 }
66 }
67
68 return ok;
69}
70
71void vtkCellGridSidesQuery::StartPass()
72{

Callers

nothing calls this directly

Calls 2

NewFunction · 0.50
GetMTimeMethod · 0.45

Tested by

no test coverage detected