| 286 | |
| 287 | |
| 288 | bool EventHandler::RemoveEvent(EventClient* ec, const std::string& ciName) { |
| 289 | if (clientSet.find(ec) == clientSet.end()) { |
| 290 | return false; |
| 291 | } |
| 292 | EventMap::iterator it = eventMap.find(ciName); |
| 293 | if ((it == eventMap.end()) || (it->second.GetList() == NULL)) { |
| 294 | return false; |
| 295 | } |
| 296 | EventClientList* ecList = it->second.GetList(); |
| 297 | if (ecList->remove(ec)) { |
| 298 | dirtyLists.insert(ecList); |
| 299 | return true; |
| 300 | } |
| 301 | return false; |
| 302 | } |
| 303 | |
| 304 | |
| 305 | //============================================================================// |