26 assert(
map_.empty() ==
true);
54 if (map_it ==
map_.end()) {
60 it != list.end(); it++) {
78 map_[handle->key()].push_back(handle);
94 if (map_it ==
map_.end()) {
99 std::find(map_it->second.begin(), map_it->second.end(), handle);
100 if (it == map_it->second.end()) {
103 map_it->second.erase(it);
105 if (map_it->second.empty()) {
114 type_(type), handle_ptr_(ptr) {
#define kEventNotifierTask
EventNotifyHandle(KeyPtr key, Callback cb)
void NotifyInternal(KeyPtr key)
WorkQueueMessage(Type type, EventNotifyHandle::Ptr handle)
boost::function< bool(void)> Callback
EventNotifyKey(Type type)
boost::function< bool(void)> Callback
void DeRegisterSubscriberInternal(EventNotifyHandle::Ptr ptr)
boost::shared_ptr< EventNotifyKey > KeyPtr
std::vector< EventNotifyHandle::Ptr > SubscribersList
virtual ~EventNotifyKey()
WorkQueue< WorkQueueMessage::Ptr > work_queue_
virtual bool IsLess(const EventNotifyKey &rhs) const
void Notify(EventNotifyKey *key)
bool Process(WorkQueueMessage::Ptr data)
tbb::atomic< int > ref_count_
NotifyMap::iterator NotifyMapIter
bool Enqueue(WorkQueueMessage::Ptr data)
boost::shared_ptr< EventNotifyHandle > Ptr
void DeregisterSubscriber(EventNotifyHandle::Ptr ptr)
SubscribersList::iterator SubscribersListIter
virtual ~EventNotifyHandle()
EventNotifyHandle::Ptr RegisterSubscriber(EventNotifyKey *key, Callback callback)
EventNotifier(Agent *agent)
void RegisterSubscriberInternal(EventNotifyHandle::Ptr ptr)
boost::shared_ptr< EventNotifyKey > KeyPtr
boost::shared_ptr< WorkQueueMessage > Ptr