- Timestamp:
- Sep 9, 2010, 10:59:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/notifications/src/modules/notifications/NotificationQueue.h
r7354 r7395 46 46 #include "NotificationManager.h" 47 47 48 namespace orxonox 49 { 48 namespace orxonox // tolua_export 49 { // tolua_export 50 50 51 51 //! Container to allow easy handling. … … 68 68 Damian 'Mozork' Frick 69 69 */ 70 class _NotificationsExport NotificationQueue : public Tickable, public NotificationListener 71 { 70 class _NotificationsExport NotificationQueue // tolua_export 71 : public Tickable, public NotificationListener 72 { // tolua_export 72 73 73 74 public: … … 80 81 void update(Notification* notification, const std::time_t & time); //!< Adds a Notification to the queue. 81 82 83 // tolua_begin 82 84 /** 83 85 @brief Get the name of the NotificationQueue. … … 87 89 { return this->name_; } 88 90 91 void setMaxSize(unsigned int size); //!< Sets the maximum number of displayed Notifications. 89 92 /** 90 93 @brief Returns the maximum number of Notifications displayed. … … 93 96 inline unsigned int getMaxSize() const 94 97 { return this->maxSize_; } 98 99 void setDisplayTime(unsigned int time); //!< Sets the maximum number of seconds a Notification is displayed. 100 /** 101 @brief Returns the time interval the Notification is displayed. 102 @return Returns the display time. 103 */ 104 inline float getDisplayTime() const 105 { return this->displayTime_; } 106 // tolua_end 107 95 108 /** 96 109 @brief Returns the current number of Notifications displayed. … … 99 112 inline unsigned int getSize() const 100 113 { return this->size_; } 101 /**102 @brief Returns the time interval the Notification is displayed.103 @return Returns the display time.104 */105 inline float getDisplayTime() const106 { return this->displayTime_; }107 114 108 115 /** … … 110 117 @return Retuns a set of string holding the different targets. 111 118 */ 112 inline const std::set<std::string > & getTargetsSet()119 inline const std::set<std::string, NotificationListenerStringCompare> & getTargetsSet() 113 120 { return this->targets_; } 114 bool getTargets(std::string* string) const; //!< Returns a string consisting of the concatination of the targets. 121 122 // tolua_begin 123 bool setTargets(const std::string & targets); //!< Set the targets of this NotificationQueue. 124 const std::string& getTargets(void) const; //!< Returns a string consisting of the concatination of the targets. 125 // tolua_end 115 126 116 127 private: … … 124 135 unsigned int displayTime_; //!< The time a Notification is displayed. 125 136 126 std::set<std::string > targets_; //!< The targets the Queue displays Notifications of.137 std::set<std::string, NotificationListenerStringCompare> targets_; //!< The targets the Queue displays Notifications of. 127 138 128 139 std::multiset<NotificationContainer*, NotificationContainerCompare> ordering_; //!< The NotificationContainers ordered by the time they were registered. //TODO: Would set work as well? … … 139 150 bool setName(const std::string& name); //!< Sets the name of the NotificationQueue. 140 151 141 void setMaxSize(unsigned int size); //!< Sets the maximum number of displayed Notifications.142 void setDisplayTime(unsigned int time); //!< Sets the maximum number of seconds a Notification is displayed.143 144 bool setTargets(const std::string & targets); //!< Set the targets of this NotificationQueue.145 146 152 void sizeChanged(void); //!< Adjusts the NotificationQueue, when the maximum size has changed. 147 153 … … 152 158 void clear(void); //!< Clears the queue by removing all Notifications. 153 159 154 }; 160 }; // tolua_export 155 161 156 } 162 } // tolua_export 157 163 158 164 #endif /* _NotificationOverlay_H__ */
Note: See TracChangeset
for help on using the changeset viewer.