------------------------------------------------------------------------------ Description: Update `this' using fields of `other'.
| 320 | // Description: |
| 321 | // Update `this' using fields of `other'. |
| 322 | void vtkGenericAttributeCollection::ShallowCopy(vtkGenericAttributeCollection* other) |
| 323 | { |
| 324 | assert("pre: other_exists" && other != nullptr); |
| 325 | assert("pre: not_self" && other != this); |
| 326 | |
| 327 | this->AttributeInternalVector->Vector = other->AttributeInternalVector->Vector; |
| 328 | this->AttributeIndices->Vector = other->AttributeIndices->Vector; |
| 329 | int c = static_cast<int>(this->AttributeInternalVector->Vector.size()); |
| 330 | for (int i = 0; i < c; ++i) |
| 331 | { |
| 332 | if (this->AttributeInternalVector->Vector[i] != nullptr) |
| 333 | { |
| 334 | this->AttributeInternalVector->Vector[i]->Register(this); |
| 335 | } |
| 336 | } |
| 337 | this->Modified(); |
| 338 | |
| 339 | assert("post: same_size" && this->GetNumberOfAttributes() == other->GetNumberOfAttributes()); |
| 340 | } |
| 341 | |
| 342 | //------------------------------------------------------------------------------ |
| 343 | // Description: |
nothing calls this directly
no test coverage detected