Exemple #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);
    }
}
Exemple #2
0
void EventHandler::push(EventSource& eventSource)
{
    iters[eventSource.getID()]=eventSource.handlers.insert(eventSource.handlers.begin(), this);
}