| 1124 | |
| 1125 | |
| 1126 | Element * |
| 1127 | Domain::removeElement(int tag) |
| 1128 | { |
| 1129 | // remove the object from the container |
| 1130 | TaggedObject *mc = theElements->removeComponent(tag); |
| 1131 | |
| 1132 | // if not there return 0 |
| 1133 | if (mc == 0) |
| 1134 | return 0; |
| 1135 | |
| 1136 | // otherwise mark the domain as having changed |
| 1137 | this->domainChange(); |
| 1138 | |
| 1139 | // perform a downward cast to an Element (safe as only Element added to |
| 1140 | // this container, 0 the Elements DomainPtr and return the result of the cast |
| 1141 | Element *result = (Element *)mc; |
| 1142 | // result->setDomain(0); |
| 1143 | return result; |
| 1144 | } |
| 1145 | |
| 1146 | Node * |
| 1147 | Domain::removeNode(int tag) |
no test coverage detected