summaryrefslogtreecommitdiff
path: root/src/depricatedevent.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-18 18:49:27 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-18 18:49:27 +0300
commit25a143ac11baebc9ecaf5c2c05d4808f20d54e3c (patch)
treeab48fe5020a74aab2d3b6e73d0cf5b99c09307ac /src/depricatedevent.cpp
parentc7a122c9d12d4ba6c08aed06291ebebf6bcdd1ed (diff)
downloadmanaplus-25a143ac11baebc9ecaf5c2c05d4808f20d54e3c.tar.gz
manaplus-25a143ac11baebc9ecaf5c2c05d4808f20d54e3c.tar.bz2
manaplus-25a143ac11baebc9ecaf5c2c05d4808f20d54e3c.tar.xz
manaplus-25a143ac11baebc9ecaf5c2c05d4808f20d54e3c.zip
rename listender to depricatedlistener.
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);
}