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

Method CopySelections

Common/Core/vtkDataArraySelection.cxx:334–374  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

332
333//------------------------------------------------------------------------------
334void vtkDataArraySelection::CopySelections(vtkDataArraySelection* selections)
335{
336 if (this == selections)
337 {
338 return;
339 }
340
341 int needUpdate = 0;
342 int i;
343 const char* arrayName;
344 if (this->GetNumberOfArrays() != selections->GetNumberOfArrays())
345 {
346 needUpdate = 1;
347 }
348 else
349 {
350 for (i = 0; i < this->GetNumberOfArrays(); i++)
351 {
352 arrayName = this->GetArrayName(i);
353 if (!selections->ArrayExists(arrayName))
354 {
355 needUpdate = 1;
356 break;
357 }
358 if (selections->ArrayIsEnabled(arrayName) != this->ArrayIsEnabled(arrayName))
359 {
360 needUpdate = 1;
361 break;
362 }
363 }
364 }
365
366 if (!needUpdate)
367 {
368 return;
369 }
370
371 vtkDebugMacro("Copying arrays and settings from " << selections << ".");
372 this->Internal->Arrays = selections->Internal->Arrays;
373 this->Modified();
374}
375
376//------------------------------------------------------------------------------
377void vtkDataArraySelection::Union(vtkDataArraySelection* other, bool skipModified)

Callers 10

RequestDataMethod · 0.80
~MetadataGuardMethod · 0.80
ReadPieceDataMethod · 0.80
ReadDataObjectMethod · 0.80
RequestDataMethod · 0.80
ReduceMethod · 0.80
RequestDataMethod · 0.80

Calls 5

GetNumberOfArraysMethod · 0.95
GetArrayNameMethod · 0.95
ArrayIsEnabledMethod · 0.95
ArrayExistsMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected