Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 3, 2010, 11:30:24 PM (14 years ago)
Author:
dafrick
Message:

Some documenting and adjustment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/notifications/src/modules/notifications/NotificationQueue.cc

    r7342 r7343  
    176176    /**
    177177    @brief
    178         Adds a Notification, to the queue.
     178        Adds a Notification to the NotificationQueue.
    179179        It inserts it into the storage containers, creates a corresponding container and pushes the Notification message to the GUI.
    180180    @param notification
     
    234234    /**
    235235    @brief
    236         Clears the queue by removing all containers.
     236        Clears the queue by removing all Notifications.
    237237    */
    238238    void NotificationQueue::clear(void)
     
    240240        this->ordering_.clear();
    241241        for(std::vector<NotificationContainer*>::iterator it = this->notifications_.begin(); it != this->notifications_.end(); it++)
    242         {
    243242            delete *it;
    244         }
     243
    245244        this->notifications_.clear();
    246245        this->size_ = 0;
     
    250249    /**
    251250    @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
    252260        Sets the name of the NotificationQueue.
    253261    @param name
     
    274282    {
    275283        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()) + ")");
    276294        this->update();
    277295    }
     
    308326        string->clear();
    309327        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.
    311329        {
    312330            if(!first)
    313             {
    314331                *string += ',';
    315             }
    316332            else
    317             {
    318333                first = false;
    319             }
    320334            *string += *it;
    321335        }
     
    339353        std::string* pTemp;
    340354        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.
    342356        {
    343357            pTemp = new std::string();
     
    354368    }
    355369
    356     /**
    357     @brief
    358         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 
    365370}
Note: See TracChangeset for help on using the changeset viewer.