35 #ifndef _NotificationManager_H__ 36 #define _NotificationManager_H__ 78 {
return this->message_; }
85 {
return this->sender_; }
92 {
return this->type_; }
99 void initialize(
void);
122 virtual void preDestroy(
void)
override;
136 void getNotifications(
NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map,
const std::time_t & timeFrameStart,
const std::time_t & timeFrameEnd);
146 { this->getNotifications(queue, map, std::time(0)-timeDelay, std::time(0)); }
148 void getNewestNotifications(
NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map,
int numberOfNotifications);
153 void loadQueues(
void);
163 std::map<const std::string, NotificationQueue*>
queues_;
165 bool removeNotification(
Notification* notification, std::multimap<std::time_t, Notification*>& map);
void destroy(void)
Destroys the Notification.
Definition: NotificationManager.h:70
::std::string string
Definition: gtest-port.h:756
NotificationCommand
Definition: NotificationListener.h:62
void getNotifications(NotificationQueue *queue, std::multimap< std::time_t, Notification * > *map, int timeDelay)
Fetches the Notifications for a specific NotificationQueue in a timeframe from (now-timeDelay) to now...
Definition: NotificationManager.h:145
std::string message_
The Notification message.
Definition: NotificationManager.h:95
NotificationListener interface.
Definition: NotificationListener.h:83
Definition of the NotificationListener class.
static NotificationManager & getInstance()
Get the instance of the NotificationManager Singleton.
Definition: NotificationManager.h:128
The Singleton NotificationManager is a NotificationListener and functions as a gateway between Notifi...
Definition: NotificationManager.h:114
std::string sender_
The sender of the notification.
Definition: NotificationManager.h:96
Output level, used for messages directed to the user (e.g. "Press any key to continue") ...
Definition: OutputDefinitions.h:89
#define _NotificationsExport
Definition: NotificationsPrereqs.h:60
std::multimap< std::time_t, Notification * > allNotificationsList_
Container where all Notifications are stored.
Definition: NotificationManager.h:160
static NotificationManager * singletonPtr_s
Definition: NotificationManager.h:158
Displays Notifications from specific senders.
Definition: NotificationQueue.h:92
const std::string & getMessage(void) const
Get the message of the Notification.
Definition: NotificationManager.h:77
Base for singleton classes.
Definition: Singleton.h:114
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI() command(const std::string &fragment)
Returns a list of commands and groups and also supports auto-completion of the arguments of these com...
Definition: ArgumentCompletionFunctions.cc:178
Shared library macros, enums, constants and forward declarations for the questsystem module ...
const std::string & getSender(void) const
Get the sender of the Notification.
Definition: NotificationManager.h:84
A Notification represents a short message used to inform the player about something that just happene...
Definition: NotificationManager.h:61
Definition of the Singleton template that is used as base class for classes that allow only one insta...
NotificationMessageType getType(void) const
Get the type of the Notification.
Definition: NotificationManager.h:91
NotificationMessageType
Definition: NotificationListener.h:51
static T & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118
NotificationMessageType type_
The type of the notification.
Definition: NotificationManager.h:97
std::map< const std::string, NotificationQueue * > queues_
The list of NotificationQueues created by the NotificationManager.
Definition: NotificationManager.h:163
std::map< const std::string, std::multimap< std::time_t, Notification * > * > notificationLists_
Container where all Notifications, for each identifier (associated with a NotificationQueue), are stored.
Definition: NotificationManager.h:161