示例#1
0
文件: Event.cpp 项目: pibomb/crowbot
void EventHandler::pull(EventSource& eventSource)
{
    auto it=iters.find(eventSource.getID());
    if(it!=iters.end())
    {
        eventSource.handlers.erase(it->second);
        iters.erase(it);
    }
}
示例#2
0
文件: Event.cpp 项目: pibomb/crowbot
void EventHandler::push(EventSource& eventSource)
{
    iters[eventSource.getID()]=eventSource.handlers.insert(eventSource.handlers.begin(), this);
}