- Timestamp:
- Sep 3, 2010, 11:30:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/notifications/src/modules/notifications/NotificationQueue.cc
r7342 r7343 176 176 /** 177 177 @brief 178 Adds a Notification , to the queue.178 Adds a Notification to the NotificationQueue. 179 179 It inserts it into the storage containers, creates a corresponding container and pushes the Notification message to the GUI. 180 180 @param notification … … 234 234 /** 235 235 @brief 236 Clears the queue by removing all containers.236 Clears the queue by removing all Notifications. 237 237 */ 238 238 void NotificationQueue::clear(void) … … 240 240 this->ordering_.clear(); 241 241 for(std::vector<NotificationContainer*>::iterator it = this->notifications_.begin(); it != this->notifications_.end(); it++) 242 {243 242 delete *it; 244 } 243 245 244 this->notifications_.clear(); 246 245 this->size_ = 0; … … 250 249 /** 251 250 @brief 251 Adjusts the NotificationQueue, when the position has changed. 252 */ 253 void NotificationQueue::positionChanged(void) 254 { 255 GUIManager::getInstance().getLuaState()->doString("NotificationLayer.changePosition(\"" + this->getName() + "\", " + multi_cast<std::string>(this->getPosition().x) + ", " + multi_cast<std::string>(this->getPosition().y) + ")"); 256 } 257 258 /** 259 @brief 252 260 Sets the name of the NotificationQueue. 253 261 @param name … … 274 282 { 275 283 this->maxSize_ = size; 284 this->sizeChanged(); 285 } 286 287 /** 288 @brief 289 Adjusts the NotificationQueue, when the maximum size has changed. 290 */ 291 void NotificationQueue::sizeChanged(void) 292 { 293 GUIManager::getInstance().getLuaState()->doString("NotificationLayer.changeSize(\"" + this->getName() + "\", " + multi_cast<std::string>(this->getSize()) + ")"); 276 294 this->update(); 277 295 } … … 308 326 string->clear(); 309 327 bool first = true; 310 for(std::set<std::string>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++) // !<Iterate through the set of targets.328 for(std::set<std::string>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++) // Iterate through the set of targets. 311 329 { 312 330 if(!first) 313 {314 331 *string += ','; 315 }316 332 else 317 {318 333 first = false; 319 }320 334 *string += *it; 321 335 } … … 339 353 std::string* pTemp; 340 354 unsigned int index = 0; 341 while( index < targets.size() ) //!<Go through the string, character by character until the end is reached.355 while(index < targets.size()) // Go through the string, character by character until the end is reached. 342 356 { 343 357 pTemp = new std::string(); … … 354 368 } 355 369 356 /**357 @brief358 Aligns all the Notifications to the position of the NotificationQueue.359 */360 void NotificationQueue::positionChanged(void)361 {362 GUIManager::getInstance().getLuaState()->doString("NotificationLayer.changePosition(\"" + this->getName() + "\", " + multi_cast<std::string>(this->getPosition().x) + ", " + multi_cast<std::string>(this->getPosition().y) + ")");363 }364 365 370 }
Note: See TracChangeset
for help on using the changeset viewer.