35 #ifndef _NotificationOueue_H__ 36 #define _NotificationOueue_H__ 99 virtual void tick(
float dt)
override;
102 virtual void changedName(
void)
override;
115 void setMaxSize(
unsigned int size);
121 {
return this->maxSize_; }
123 void setDisplayTime(
int time);
129 {
return this->displayTime_; }
131 void maxSizeChanged(
void);
132 void displayTimeChanged(
void);
139 {
return this->size_; }
146 {
return this->targets_; }
150 void targetsChanged(
void);
157 {
return this->registered_; }
162 void registerVariables();
179 virtual void clear(
bool noGraphics =
false);
182 static const unsigned int DEFAULT_SIZE = 5;
183 static const unsigned int DEFAULT_DISPLAY_TIME = 30;
184 static const int INF = -1;
186 virtual void create(
void);
199 std::multiset<NotificationContainer*, NotificationContainerCompare>
ordering_;
207 void push(
Notification* notification,
const std::time_t & time);
209 void remove(
const std::multiset<NotificationContainer*, NotificationContainerCompare>::iterator& containerIterator);
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
Container to allow easy handling of the Notifications.
Definition: NotificationQueue.h:60
int getDisplayTime(void) const
Returns the time interval the Notification is displayed.
Definition: NotificationQueue.h:128
std::multiset< NotificationContainer *, NotificationContainerCompare > ordering_
The NotificationContainers ordered by the time they were registered.
Definition: NotificationQueue.h:199
This class is the base class of all the Objects in the universe that need to be synchronised over the...
Definition: Synchronisable.h:142
Declaration of the Tickable interface.
int displayTime_
The time a Notification is displayed.
Definition: NotificationQueue.h:193
const std::set< std::string > & getTargetsSet(void)
Returns the targets of this NotificationQueue, reps.
Definition: NotificationQueue.h:145
::std::string string
Definition: gtest-port.h:756
virtual void notificationRemoved(unsigned int index)
Is called when a notification was removed.
Definition: NotificationQueue.h:177
#define _NotificationsExport
Definition: NotificationsPrereqs.h:60
unsigned int size_
The number of Notifications displayed.
Definition: NotificationQueue.h:192
Displays Notifications from specific senders.
Definition: NotificationQueue.h:92
virtual void notificationPushed(Notification *notification)
Is called when a notification was pushed.
Definition: NotificationQueue.h:168
Definition of the NotificationManager class.
std::vector< NotificationContainer * > notifications_
The NotificationContainers in the order they were added to the NotificationQueue. ...
Definition: NotificationQueue.h:200
NotificationContainer timeLimit_
Helper object to check against to determine whether Notifications have expired.
Definition: NotificationQueue.h:203
xmlelement
Definition: Super.h:519
unsigned int maxSize_
The maximal number of Notifications displayed.
Definition: NotificationQueue.h:191
const std::string & getName() const
Returns the name of the object.
Definition: BaseObject.h:96
unsigned int getMaxSize(void) const
Returns the maximum number of Notifications displayed.
Definition: NotificationQueue.h:120
std::set< std::string > targets_
The targets the NotificationQueue displays Notifications of.
Definition: NotificationQueue.h:197
bool registered_
Helper variable to remember whether the NotificationQueue is registered already.
Definition: NotificationQueue.h:195
float tickTime_
Helper variable, to not have to check for Notifications that have been displayed too long...
Definition: NotificationQueue.h:202
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Shared library macros, enums, constants and forward declarations for the questsystem module ...
Mode
Definition: CorePrereqs.h:102
time_t creationTime_
The time this NotificationQueue was created.
Definition: NotificationQueue.h:189
Declaration of BaseObject, the base class of all objects in Orxonox.
const std::string & getName(void) const
Get the name of the NotificationQueue.
Definition: NotificationQueue.h:112
bool isRegistered(void)
Check whether the NotificationQueue is registered with the NotificationManager.
Definition: NotificationQueue.h:156
A Notification represents a short message used to inform the player about something that just happene...
Definition: NotificationManager.h:61
Notification * notification
The Notification displayed.
Definition: NotificationQueue.h:62
The Tickable interface provides a tick(dt) function, that gets called every frame.
Definition: Tickable.h:52
time_t time
The time the Notification was sent and thus first displayed.
Definition: NotificationQueue.h:63
Struct to allow ordering of NotificationContainers.
Definition: NotificationQueue.h:72
unsigned int getSize(void) const
Returns the current number of Notifications displayed.
Definition: NotificationQueue.h:138
virtual void notificationPopped(void)
Is called when a notification was popped.
Definition: NotificationQueue.h:172