7 #include <boost/optional.hpp> 10 #include <unordered_map> 40 class EmoteMap :
public std::unordered_map<EmoteName, EmotePtr>
54 EmoteMap::const_iterator findEmote(
const QString &emoteNameHint,
55 const QString &emoteID)
const;
57 using EmoteIdMap = std::unordered_map<EmoteId, EmotePtr>;
58 using WeakEmoteMap = std::unordered_map<EmoteName, std::weak_ptr<const Emote>>;
59 using WeakEmoteIdMap = std::unordered_map<EmoteId, std::weak_ptr<const Emote>>;
61 static const std::shared_ptr<const EmoteMap> EMPTY_EMOTE_MAP = std::make_shared<
67 std::unordered_map<EmoteId, std::weak_ptr<const Emote>> &
cache,
68 std::mutex &mutex,
const EmoteId &
id);
Tooltip tooltip
Definition: Emote.hpp:17
ImageSet images
Definition: Emote.hpp:16
const QString & getCopyString() const
Definition: Emote.hpp:29
Definition: Application.cpp:48
Url homePage
Definition: Emote.hpp:18
Definition: ImageSet.hpp:7
std::shared_ptr< const Emote > EmotePtr
Definition: Emote.hpp:38
boost::optional< EmoteName > baseName
Definition: Emote.hpp:26
EmoteAuthor author
Definition: Emote.hpp:21
EmoteName name
Definition: Emote.hpp:15
std::unordered_map< EmoteId, EmotePtr > EmoteIdMap
Definition: Emote.hpp:57
std::unordered_map< EmoteId, std::weak_ptr< const Emote > > WeakEmoteIdMap
Definition: Emote.hpp:59
bool operator==(const Emote &a, const Emote &b)
Definition: Emote.cpp:7
bool zeroWidth
Definition: Emote.hpp:19
EmotePtr cachedOrMakeEmotePtr(Emote &&emote, const EmoteMap &cache)
Definition: Emote.cpp:18
std::unordered_map< EmoteName, std::weak_ptr< const Emote > > WeakEmoteMap
Definition: Emote.hpp:58
EmoteId id
Definition: Emote.hpp:20
bool operator!=(const Emote &a, const Emote &b)
Definition: Emote.cpp:13
Definition: lrucache.hpp:16