------------------------------------------------------------------------------ Description: Used internally for the Bridge. Initialize the cell from a cell `c' and an `id'. \pre c_exists: c!=0
| 907 | // Initialize the cell from a cell `c' and an `id'. |
| 908 | // \pre c_exists: c!=0 |
| 909 | void vtkBridgeCell::InitWithCell(vtkCell* c, vtkIdType id) |
| 910 | { |
| 911 | assert("pre: c_exists" && c != nullptr); |
| 912 | |
| 913 | vtkSetObjectBodyMacro(DataSet, vtkBridgeDataSet, static_cast<vtkBridgeDataSet*>(nullptr)); |
| 914 | this->Id = id; |
| 915 | |
| 916 | // warning: do directly vtkSetObjectBodyMacro(Cell,vtkCell,c->NewInstance()) |
| 917 | // add memory leak because the text "c->NewInstance()" is copied several |
| 918 | // time in the macro... |
| 919 | |
| 920 | if (this->Cell) |
| 921 | { |
| 922 | this->Cell->Delete(); |
| 923 | } |
| 924 | this->Cell = c->NewInstance(); |
| 925 | |
| 926 | this->Cell->DeepCopy(c); |
| 927 | this->BoolIsInDataSet = 0; |
| 928 | |
| 929 | if (this->InternalIterator == nullptr) |
| 930 | { |
| 931 | this->InternalIterator = vtkBridgeCellIterator::New(); |
| 932 | } |
| 933 | this->InternalIterator->InitWithOneCell(this); |
| 934 | this->InternalIterator->Begin(); |
| 935 | } |
| 936 | |
| 937 | //------------------------------------------------------------------------------ |
| 938 | // Description: |
no test coverage detected