- Timestamp:
- Sep 9, 2010, 10:59:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/notifications/src/modules/notifications/NotificationManager.h
r7354 r7395 28 28 29 29 /** 30 @file 30 @file NotificationManager.h 31 31 @brief Definition of the NotificationManager class. 32 32 */ … … 40 40 #include <map> 41 41 #include <string> 42 #include <vector>43 42 44 43 #include "util/Singleton.h" … … 55 54 Damian 'Mozork' Frick 56 55 */ 57 class _NotificationsExport NotificationManager 56 class _NotificationsExport NotificationManager // tolua_export 58 57 : public Singleton<NotificationManager>, public OrxonoxClass 59 58 { // tolua_export … … 75 74 void unregisterListener(NotificationListener* listener); //!< Unregisters a NotificationListener withing the NotificationManager. 76 75 77 bool getNotifications(NotificationListener* listener, std::multimap<std::time_t, Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationListener in a specified timeframe.76 bool getNotifications(NotificationListener* listener, std::multimap<std::time_t, Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationListener in a specified timeframe. 78 77 79 78 /** … … 84 83 @return Returns true if successful. 85 84 */ 86 bool getNotifications(NotificationListener* listener, std::multimap<std::time_t, Notification*>* map, int timeDelay)85 bool getNotifications(NotificationListener* listener, std::multimap<std::time_t, Notification*>* map, int timeDelay) 87 86 { return this->getNotifications(listener, map, std::time(0)-timeDelay, std::time(0)); } 88 87 89 88 void enterEditMode(void); 90 89 91 void createQueue(const std::string& name, const std::string& targets, unsigned int size, unsigned int displayTime); // tolua_export 90 // tolua_begin 91 void loadQueues(void); 92 93 void createQueue(const std::string& name); 94 orxonox::NotificationQueue* getQueue(const std::string & name); 95 // tolua_end 96 97 bool registerQueue(NotificationQueue* queue); 98 void unregisterQueue(NotificationQueue* queue); 92 99 93 100 private: 94 101 static NotificationManager* singletonPtr_s; 95 102 96 std:: vector<NotificationQueue*> queues_; //!< The list of NotificationQueues created by the NotificationManager.103 std::map<const std::string, NotificationQueue*> queues_; //!< The list of NotificationQueues created by the NotificationManager. 97 104 98 105 int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that no key appears twice. 99 106 100 std::multimap<std::time_t, Notification*> allNotificationsList_; //!< Container where all notifications are stored.101 std::map<NotificationListener*, int> listenerList_; //!< Container where all NotificationListeners are stored with a number as identifier.102 std::map<int,std::multimap<std::time_t, Notification*>*> notificationLists_; //!< Container where all Notifications, for each identifier (associated with a NotificationListener), are stored.107 std::multimap<std::time_t, Notification*> allNotificationsList_; //!< Container where all notifications are stored. 108 std::map<NotificationListener*, int> listenerList_; //!< Container where all NotificationListeners are stored with a number as identifier. 109 std::map<int,std::multimap<std::time_t, Notification*>*> notificationLists_; //!< Container where all Notifications, for each identifier (associated with a NotificationListener), are stored. 103 110 std::map<Notification*, unsigned int> listenerCounter_; //!< A container to store the number of NotificationListeners a Notification is registered with. 104 111
Note: See TracChangeset
for help on using the changeset viewer.