summaryrefslogtreecommitdiff
path: root/src/depricatedevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/depricatedevent.cpp')
-rw-r--r--src/depricatedevent.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/depricatedevent.cpp b/src/depricatedevent.cpp
index 11ea29311..b303db4dd 100644
--- a/src/depricatedevent.cpp
+++ b/src/depricatedevent.cpp
@@ -21,12 +21,12 @@
#include "depricatedevent.h"
-#include "listener.h"
+#include "depricatedlistener.h"
#include "variabledata.h"
#include "debug.h"
-ListenMap DepricatedEvent::mBindings;
+DepricatedListenMap DepricatedEvent::mBindings;
DepricatedEvent::~DepricatedEvent()
{
@@ -107,15 +107,15 @@ double DepricatedEvent::getFloat(const std::string &key) const
void DepricatedEvent::trigger(const Channels channel,
const DepricatedEvent &event)
{
- const ListenMap::const_iterator it = mBindings.find(channel);
+ const DepricatedListenMap::const_iterator it = mBindings.find(channel);
// Make sure something is listening
if (it == mBindings.end())
return;
// Loop though all listeners
- ListenerSet::const_iterator lit = it->second.begin();
- const ListenerSet::const_iterator lit_end = it->second.end();
+ DepricatedListenerSet::const_iterator lit = it->second.begin();
+ const DepricatedListenerSet::const_iterator lit_end = it->second.end();
while (lit != lit_end)
{
if (*lit)
@@ -124,9 +124,9 @@ void DepricatedEvent::trigger(const Channels channel,
}
}
-void DepricatedEvent::remove(Listener *const listener)
+void DepricatedEvent::remove(DepricatedListener *const listener)
{
- ListenMap::iterator it = mBindings.begin();
+ DepricatedListenMap::iterator it = mBindings.begin();
while (it != mBindings.end())
{
it->second.erase(listener);
@@ -134,12 +134,14 @@ void DepricatedEvent::remove(Listener *const listener)
}
}
-void DepricatedEvent::bind(Listener *const listener, const Channels channel)
+void DepricatedEvent::bind(DepricatedListener *const listener,
+ const Channels channel)
{
mBindings[channel].insert(listener);
}
-void DepricatedEvent::unbind(Listener *const listener, const Channels channel)
+void DepricatedEvent::unbind(DepricatedListener *const listener,
+ const Channels channel)
{
mBindings[channel].erase(listener);
}