------------------------------------------------------------------------------ Description: Recursive duplication of `other' in `this'.
| 291 | // Description: |
| 292 | // Recursive duplication of `other' in `this'. |
| 293 | void vtkGenericAttributeCollection::DeepCopy(vtkGenericAttributeCollection* other) |
| 294 | { |
| 295 | assert("pre: other_exists" && other != nullptr); |
| 296 | assert("pre: not_self" && other != this); |
| 297 | |
| 298 | this->AttributeInternalVector->Vector.resize(other->AttributeInternalVector->Vector.size()); |
| 299 | |
| 300 | this->AttributeIndices->Vector.resize(other->AttributeIndices->Vector.size()); |
| 301 | |
| 302 | int c = static_cast<int>(this->AttributeInternalVector->Vector.size()); |
| 303 | for (int i = 0; i < c; i++) |
| 304 | { |
| 305 | if (this->AttributeInternalVector->Vector[i] == nullptr) |
| 306 | { |
| 307 | this->AttributeInternalVector->Vector[i] = |
| 308 | other->AttributeInternalVector->Vector[i]->NewInstance(); |
| 309 | } |
| 310 | this->AttributeInternalVector->Vector[i]->DeepCopy(other->AttributeInternalVector->Vector[i]); |
| 311 | // Don't need to copy the contents of AttributeIndices: it will be |
| 312 | // recomputed because of the following Moditied call. |
| 313 | } |
| 314 | this->Modified(); |
| 315 | |
| 316 | assert("post: same_size" && this->GetNumberOfAttributes() == other->GetNumberOfAttributes()); |
| 317 | } |
| 318 | |
| 319 | //------------------------------------------------------------------------------ |
| 320 | // Description: |
nothing calls this directly
no test coverage detected