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

Method Process

Common/DataModel/vtkCellArray.cxx:271–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270 template <typename SourceArrayT, typename TargetArrayT>
271 bool Process(SourceArrayT* src, TargetArrayT* dst) const
272 {
273 // check if we can shallow copy it first
274 if (src->IsA(dst->GetClassName()))
275 {
276 dst->ShallowCopy(src);
277 return true;
278 }
279 // Check that allocation succeeds:
280 if (!dst->Resize(src->GetNumberOfTuples()))
281 {
282 return false;
283 }
284
285 // Copy data:
286 dst->DeepCopy(src);
287
288 // Free old memory:
289 src->Resize(0);
290
291 return true;
292 }
293};
294
295struct IsHomogeneousImpl : public vtkCellArray::DispatchUtilities

Callers 1

operator()Method · 0.95

Calls 6

IsAMethod · 0.80
GetClassNameMethod · 0.45
ShallowCopyMethod · 0.45
ResizeMethod · 0.45
GetNumberOfTuplesMethod · 0.45
DeepCopyMethod · 0.45

Tested by

no test coverage detected