Refactor ConcurrentMap

* Add operator[] to ConcurrentMap which returns a TValue reference
* BTTV/FFZ channel emotes are now stored in the Emote Manager, and each Channel object has a reference to their own BTTV/FFZ channel emote map.
* Restructure EmoteManager a bit (simplify the ConcurrentMap havoc).
* Add EmoteData struct which can store emote data (for now only messages::LazyLoadedImage*)
* Add CompletionManager that does nothing
This commit is contained in:
Rasmus Karlsson
2017-07-09 17:58:59 +02:00
parent 1f1b0d7f03
commit 5aa892e834
11 changed files with 239 additions and 139 deletions
+5 -5
View File
@@ -1,6 +1,7 @@
#pragma once
#include "concurrentmap.hpp"
#include "emotemanager.hpp"
#include "logging/loggingchannel.hpp"
#include "messages/lazyloadedimage.hpp"
#include "messages/limitedqueue.hpp"
@@ -19,7 +20,6 @@ class Message;
}
class WindowManager;
class EmoteManager;
class IrcManager;
class Channel
@@ -32,8 +32,8 @@ public:
boost::signals2::signal<void(messages::SharedMessage &)> messageAppended;
// properties
ConcurrentMap<QString, messages::LazyLoadedImage *> &getBttvChannelEmotes();
ConcurrentMap<QString, messages::LazyLoadedImage *> &getFfzChannelEmotes();
EmoteManager::EmoteMap &getBTTVChannelEmotes();
EmoteManager::EmoteMap &getFFZChannelEmotes();
bool isEmpty() const;
const QString &getName() const;
@@ -64,8 +64,8 @@ private:
QString _name;
ConcurrentMap<QString, messages::LazyLoadedImage *> _bttvChannelEmotes;
ConcurrentMap<QString, messages::LazyLoadedImage *> _ffzChannelEmotes;
EmoteManager::EmoteMap &bttvChannelEmotes;
EmoteManager::EmoteMap &ffzChannelEmotes;
QString _subLink;
QString _channelLink;