Changeset 2858 for code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationManager.h
- Timestamp:
- Mar 26, 2009, 9:45:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationManager.h
r2788 r2858 66 66 static NotificationManager & getInstance(); //! Returns a reference to the single instance of the NotificationManager. 67 67 68 //TDO: Visibility?69 68 bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager. 70 69 bool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue within the NotificationManager. 71 70 72 std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationQueue in a specified timeframe.71 bool getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationQueue in a specified timeframe. 73 72 74 73 /** 75 74 @brief Fetches the Notifications for a specific NotificationQueue starting at a specified time. 76 75 @param queue The NotificationQueue the Notifications are fetched for. 76 @param map A multimap, in which the notifications are stored. 77 77 @param timeFrameStart The start time the Notifications are fetched from. 78 @return Returns a time-ordered list of Notifications.78 @return Returns true if successful. 79 79 */ 80 std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart)81 { return this->getNotifications(queue, timeFrameStart, std::time(0)); }80 bool getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart) 81 { return this->getNotifications(queue, map, timeFrameStart, std::time(0)); } 82 82 /** 83 83 @brief Fetches the Notifications for a specific NotificationQueue starting at a specified timespan before now. 84 84 @param queue The NotificationQueue the Notifications are fetched for. 85 @param map A multimap, in which the notifications are stored. 85 86 @param timeDelay The timespan. 86 @return Returns a time-ordered list of Notifications.87 @return Returns true if successful. 87 88 */ 88 std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, int timeDelay)89 { return this->getNotifications(queue, std::time(0)-timeDelay, std::time(0)); }89 bool getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, int timeDelay) 90 { return this->getNotifications(queue, map, std::time(0)-timeDelay, std::time(0)); } 90 91 91 92 private:
Note: See TracChangeset
for help on using the changeset viewer.