------------------------------------------------------------------------------
| 698 | |
| 699 | //------------------------------------------------------------------------------ |
| 700 | void vtkMultiProcessController::ProcessRMI( |
| 701 | int remoteProcessId, void* arg, int argLength, int rmiTag) |
| 702 | { |
| 703 | // we build the list of callbacks to call and then invoke them to handle the |
| 704 | // case where the callback removes the callback. |
| 705 | std::vector<vtkInternal::vtkRMICallback> callbacks; |
| 706 | |
| 707 | vtkInternal::RMICallbackMap::iterator iter = this->Internal->RMICallbacks.find(rmiTag); |
| 708 | if (iter != this->Internal->RMICallbacks.end()) |
| 709 | { |
| 710 | vtkInternal::RMICallbackVector::iterator iterVec; |
| 711 | for (iterVec = iter->second.begin(); iterVec != iter->second.end(); ++iterVec) |
| 712 | { |
| 713 | if (iterVec->Function) |
| 714 | { |
| 715 | callbacks.push_back(*iterVec); |
| 716 | } |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | if (callbacks.empty()) |
| 721 | { |
| 722 | vtkErrorMacro( |
| 723 | "Process " << this->GetLocalProcessId() << " Could not find RMI with tag " << rmiTag); |
| 724 | } |
| 725 | |
| 726 | std::vector<vtkInternal::vtkRMICallback>::iterator citer; |
| 727 | for (citer = callbacks.begin(); citer != callbacks.end(); ++citer) |
| 728 | { |
| 729 | (*citer->Function)(citer->LocalArgument, arg, argLength, remoteProcessId); |
| 730 | } |
| 731 | } |
| 732 | //------------------------------------------------------------------------------ |
| 733 | int vtkMultiProcessController::Reduce( |
| 734 | const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer, int destProcessId) |