------------------------------------------------------------------------------ Description: Recursive copy of `other' into `this'. \pre other_exists: other!=0 \pre other_differ: this!=other
| 940 | // \pre other_exists: other!=0 |
| 941 | // \pre other_differ: this!=other |
| 942 | void vtkBridgeCell::DeepCopy(vtkBridgeCell* other) |
| 943 | { |
| 944 | assert("pre: other_exists" && other != nullptr); |
| 945 | assert("pre: other_differ" && this != other); |
| 946 | |
| 947 | vtkCell* tmp; |
| 948 | |
| 949 | if (this->InternalIterator == nullptr) |
| 950 | { |
| 951 | this->InternalIterator = vtkBridgeCellIterator::New(); |
| 952 | } |
| 953 | this->Id = other->Id; |
| 954 | this->BoolIsInDataSet = other->BoolIsInDataSet; |
| 955 | if (other->BoolIsInDataSet) |
| 956 | { |
| 957 | vtkSetObjectBodyMacro(DataSet, vtkBridgeDataSet, other->DataSet); |
| 958 | tmp = this->DataSet->Implementation->GetCell(this->Id); |
| 959 | vtkSetObjectBodyMacro(Cell, vtkCell, tmp); |
| 960 | this->InternalIterator->InitWithOneCell(this); |
| 961 | this->InternalIterator->Begin(); |
| 962 | } |
| 963 | else |
| 964 | { |
| 965 | vtkSetObjectBodyMacro(DataSet, vtkBridgeDataSet, static_cast<vtkBridgeDataSet*>(nullptr)); |
| 966 | tmp = other->Cell->NewInstance(); |
| 967 | vtkSetObjectBodyMacro(Cell, vtkCell, tmp); |
| 968 | this->Cell->Delete(); // because newinstance+macro=2 ref |
| 969 | this->Cell->DeepCopy(other->Cell); |
| 970 | this->InternalIterator->InitWithOneCell(this); |
| 971 | this->InternalIterator->Begin(); |
| 972 | } |
| 973 | this->Modified(); |
| 974 | } |
| 975 | |
| 976 | //------------------------------------------------------------------------------ |
| 977 | vtkBridgeCell::vtkBridgeCell() |