| 33 | } |
| 34 | |
| 35 | void EventDispatcher::registerObserver(EventType type, EventObserver* observer) |
| 36 | { |
| 37 | for (list<pair<EventType, EventObserver*> >::iterator i = observerList_.begin(); i != observerList_.end(); i++) |
| 38 | i->second->notifyRegistration(observer); |
| 39 | |
| 40 | observerList_.push_back(make_pair(type, observer)); |
| 41 | } |
| 42 | |
| 43 | void EventDispatcher::dispatchEvent(const Event& event, int timeoutSeconds) |
| 44 | { |