| 522 | |
| 523 | |
| 524 | Element * |
| 525 | ShadowSubdomain::removeElement(int tag) |
| 526 | { |
| 527 | int loc = theElements.removeValue(tag); |
| 528 | if (loc < 0) |
| 529 | return 0; |
| 530 | else { // the element is there go get it |
| 531 | // send a message to remove the object from the actor |
| 532 | msgData(0) = ShadowActorSubdomain_removeElement; |
| 533 | msgData(1) = tag; |
| 534 | this->sendID(msgData); |
| 535 | |
| 536 | numElements--; |
| 537 | // this->Domain::domainChange(); |
| 538 | |
| 539 | // get the element from the actor |
| 540 | this->recvID(msgData); |
| 541 | int theType = msgData(0); |
| 542 | |
| 543 | if (theType == -1) // the ele was not there! |
| 544 | return 0; |
| 545 | |
| 546 | Element *theEle = theObjectBroker->getNewElement(theType); |
| 547 | if (theEle != 0) |
| 548 | this->recvObject(*theEle); |
| 549 | |
| 550 | return theEle; |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | Node * |
| 555 | ShadowSubdomain::removeNode(int tag) |
no test coverage detected