Exemplo n.º 1
0
void EventHandler::pull(EventSource& eventSource)
{
    auto it=iters.find(eventSource.getID());
    if(it!=iters.end())
    {
        eventSource.handlers.erase(it->second);
        iters.erase(it);
    }
}
Exemplo n.º 2
0
void EventHandler::push(EventSource& eventSource)
{
    iters[eventSource.getID()]=eventSource.handlers.insert(eventSource.handlers.begin(), this);
}