mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
22 lines
424 B
C++
22 lines
424 B
C++
#include "event_sub.h"
|
|
|
|
void EventSubscriptionWatcher::Subscribe(const std::string &event_name)
|
|
{
|
|
m_subs[event_name] = 1;
|
|
}
|
|
|
|
void EventSubscriptionWatcher::Unsubscribe(const std::string &event_name)
|
|
{
|
|
m_subs[event_name] = 0;
|
|
}
|
|
|
|
bool EventSubscriptionWatcher::IsSubscribed(const std::string &event_name) const
|
|
{
|
|
auto iter = m_subs.find(event_name);
|
|
if (iter != m_subs.end()) {
|
|
return iter->second;
|
|
}
|
|
|
|
return false;
|
|
}
|