5 #ifndef event_notifier_h
6 #define event_notifier_h
10 #include <boost/shared_ptr.hpp>
57 typedef boost::shared_ptr<EventNotifyKey>
KeyPtr;
58 typedef boost::shared_ptr<EventNotifyHandle>
Ptr;
76 typedef boost::shared_ptr<EventNotifyKey>
KeyPtr;
82 typedef std::map<KeyPtr, SubscribersList, Comparator>
NotifyMap;
99 typedef boost::shared_ptr<WorkQueueMessage>
Ptr;
123 #endif //event_notifier_h
std::map< KeyPtr, SubscribersList, Comparator > NotifyMap
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()
DISALLOW_COPY_AND_ASSIGN(EventNotifier)
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)
SmartPointerComparator< EventNotifyKey, boost::shared_ptr > Comparator
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
EventNotifyHandle::Ptr handle_ptr_
boost::shared_ptr< WorkQueueMessage > Ptr