Changeset 3034 for code/trunk/src/orxonox/overlays
- Timestamp:
- May 23, 2009, 10:05:58 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/overlays
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/OverlayGroup.cc
r2911 r3034 113 113 } 114 114 115 115 /** 116 116 @brief 117 117 Removes an element from the map. -
code/trunk/src/orxonox/overlays/notifications/Notification.h
r2911 r3034 56 56 Notification(const std::string & message); 57 57 virtual ~Notification(); 58 58 59 59 bool send(void); //!< Sends the Notification to the Notificationmanager, with sender NotificationManager::NONE; 60 60 bool send(const std::string & sender); //!< Sends the Notification to the Notificationmanager. 61 61 62 62 /** 63 63 @brief Checks whether the Notification was sent. … … 72 72 inline const std::string & getMessage(void) const 73 73 { return this->message_; } 74 74 75 75 inline const std::string & getSender(void) const 76 76 { return this->sender_; } 77 77 78 78 bool setMessage(const std::string & message); //!< Sets the message of the notification. 79 79 80 80 private: 81 81 std::string message_; //!< The Notification message. 82 82 std::string sender_; //!< The sender of the notification. 83 83 bool sent_; //!< Whether Notification has been sent, if so it cannot be changed. 84 84 85 85 void initialize(void); 86 86 87 87 }; 88 88 -
code/trunk/src/orxonox/overlays/notifications/NotificationManager.h
r2911 r3034 60 60 NotificationManager(); 61 61 virtual ~NotificationManager(); 62 62 63 63 static const std::string ALL; 64 64 static const std::string NONE; 65 65 66 66 static NotificationManager & getInstance(); //! Returns a reference to the single instance of the NotificationManager. 67 67 68 68 bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager. 69 69 bool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue within the NotificationManager. 70 70 71 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. 72 72 73 73 /** 74 74 @brief Fetches the Notifications for a specific NotificationQueue starting at a specified time. … … 89 89 bool getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, int timeDelay) 90 90 { return this->getNotifications(queue, map, std::time(0)-timeDelay, std::time(0)); } 91 91 92 92 private: 93 93 static NotificationManager* singletonRef_s; 94 94 95 95 int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that no key appears twice. 96 96 97 97 std::multimap<std::time_t,Notification*> allNotificationsList_; //!< Container where all notifications are stored (together with their respecive timestamps). 98 98 std::map<NotificationQueue*,int> queueList_; //!< Container where all NotificationQueues are stored with a number as identifier. 99 99 std::map<int,std::multimap<std::time_t,Notification*>*> notificationLists_; //!< Container where all Notifications, for each identifier (associated with a NotificationQueue), are stored. 100 100 101 101 102 102 };
Note: See TracChangeset
for help on using the changeset viewer.