- Timestamp:
- May 10, 2011, 11:37:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel2/src/modules/notifications/NotificationManager.h
r8374 r8445 67 67 virtual ~NotificationManager(); 68 68 69 virtual void preDestroy(void); // !<Is called before the object is destroyed.69 virtual void preDestroy(void); // Is called before the object is destroyed. 70 70 71 71 /** … … 75 75 static NotificationManager& getInstance() { return Singleton<NotificationManager>::getInstance(); } // tolua_export 76 76 77 virtual bool registerNotification(const std::string& message, const std::string& sender); 77 virtual bool registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type); 78 virtual bool executeCommand(notificationCommand::Value command, const std::string& sender); 78 79 79 bool registerNotification(Notification* notification); // !<Registers a Notification within the NotificationManager.80 void unregisterNotification(Notification* notification, NotificationQueue* queue); // !<Unregisters a Notification within the NotificationManager for a given NotificationQueue.80 bool registerNotification(Notification* notification); // Registers a Notification within the NotificationManager. 81 void unregisterNotification(Notification* notification, NotificationQueue* queue); // Unregisters a Notification within the NotificationManager for a given NotificationQueue. 81 82 82 void getNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); // !<Fetches the Notifications for a specific NotificationQueue in a specified timeframe and stores them in the input map.83 void getNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); // Fetches the Notifications for a specific NotificationQueue in a specified timeframe and stores them in the input map. 83 84 84 85 /** 85 @brief Fetches the Notifications for a specific NotificationQueue in a timeframe from now-timeDelayto now and stores them in the input map.86 @param listenerThe NotificationQueue the Notifications are fetched for.86 @brief Fetches the Notifications for a specific NotificationQueue in a timeframe from (now-timeDelay) to now and stores them in the input map. 87 @param queue The NotificationQueue the Notifications are fetched for. 87 88 @param map A pointer to a multimap, in which the notifications are stored. The map needs to have been allocated. 88 89 @param timeDelay The timespan. … … 92 93 { this->getNotifications(queue, map, std::time(0)-timeDelay, std::time(0)); } 93 94 94 void getNewestNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, int numberOfNotifications); // !<Fetches the newest Notifications for a specific NotificationQueue and stores them in the input map.95 void getNewestNotifications(NotificationQueue* queue, std::multimap<std::time_t, Notification*>* map, int numberOfNotifications); // Fetches the newest Notifications for a specific NotificationQueue and stores them in the input map. 95 96 96 void enterEditMode(void); // !<Enters the edit mode of the NotificationLayer.97 void enterEditMode(void); // Enters the edit mode of the NotificationLayer. 97 98 98 bool registerQueue(NotificationQueue* queue); // !<Registers a NotificationQueue.99 void unregisterQueue(NotificationQueue* queue); // !<Unregisters a NotificationQueue.99 bool registerQueue(NotificationQueue* queue); // Registers a NotificationQueue. 100 void unregisterQueue(NotificationQueue* queue); // Unregisters a NotificationQueue. 100 101 101 102 // tolua_begin 102 void loadQueues(void); // !<Loads all the NotificationQueues that should exist.103 void createQueue(const std::string& name); // !<Creates a new NotificationQueue.104 orxonox::NotificationQueue* getQueue(const std::string & name); // !<Get the NotificationQueue with the input name.103 void loadQueues(void); // Loads all the NotificationQueues that should exist. 104 void createQueue(const std::string& name); // Creates a new NotificationQueue. 105 orxonox::NotificationQueue* getQueue(const std::string & name); // Get the NotificationQueue with the input name. 105 106 // tolua_end 106 107 … … 113 114 std::map<const std::string, NotificationQueue*> queues_; //!< The list of NotificationQueues created by the NotificationManager. 114 115 115 bool removeNotification(Notification* notification, std::multimap<std::time_t, Notification*>& map); //!< Helper method that removes an input Notification form an input map. 116 bool removeNotification(Notification* notification, std::multimap<std::time_t, Notification*>& map); // Helper method that removes an input Notification form an input map. 117 118 // Commands 119 void commandClear(const std::string& sender); // The clear command. Clears all NotificationQueues that have its sender as a target. 116 120 117 121 }; // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.