Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 11, 2010, 5:05:47 PM (14 years ago)
Author:
dafrick
Message:

Removing some TODO comments.
Better handling of duplicate name in Notificationlayer.lua.
Moving StringCompare object from NotificationListener to StringUtils.

Location:
code/trunk/src/modules/notifications
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/notifications/Notification.cc

    r7410 r7413  
    104104    @brief
    105105        Sends the Notification to the Notificationmanager, which then in turn distributes it to the different NotificationQueues.
    106     @param clientID
     106    @param clientId
    107107        The id of the client that this Notification is sent to.
    108108    @param sender
  • code/trunk/src/modules/notifications/NotificationManager.cc

    r7403 r7413  
    129129        for(std::map<NotificationListener*, unsigned int>::iterator it = this->listenerList_.begin(); it != this->listenerList_.end(); it++) // Iterate through all NotificationListeners.
    130130        {
    131             std::set<std::string, NotificationListenerStringCompare> set = it->first->getTargetsSet();
     131            std::set<std::string, StringCompare> set = it->first->getTargetsSet();
    132132            bool bAll = set.find(NotificationManager::ALL) != set.end();
    133133            // If either the Notification has as sender 'all', the NotificationListener displays all Notifications or the NotificationListener has the sender of the Notification as target.
     
    210210        this->listenerList_[listener] = index; // Add the NotificationListener to the list of NotificationListeners.
    211211
    212         std::set<std::string, NotificationListenerStringCompare> set = listener->getTargetsSet();
     212        std::set<std::string, StringCompare> set = listener->getTargetsSet();
    213213
    214214        // If all senders are the target of the NotificationListener, then the list of Notifications for that specific NotificationListener is the same as the list of all Notifications.
     
    248248        assert(listener);
    249249
    250         //TODO: Make unsigned int.
    251250        unsigned int identifier = this->listenerList_.find(listener)->second;
    252251        std::multimap<std::time_t, Notification*>* map = this->notificationLists_.find(identifier)->second;
  • code/trunk/src/modules/notifications/NotificationQueue.cc

    r7412 r7413  
    6969        // Initialize.
    7070        this->size_ = 0;
    71         this->tickTime_ = 0.0;
     71        this->tickTime_ = 0.0f;
    7272
    7373        // Sets the input values.
     
    7777        this->setDisplayTime(displayTime);
    7878
    79         //TODO: Destroy if registration fails?
    80 
    8179        // Register the NotificationQueue with the NotificationManager.
    8280        bool queueRegistered = NotificationManager::getInstance().registerQueue(this);
     
    8583        {
    8684            this->registered_ = false;
    87             COUT(1) << "Error: Notification Queue '" << this->getName() << "' could not be registered." << std::endl;
     85            COUT(1) << "Error: NotificationQueue '" << this->getName() << "' could not be registered." << std::endl;
    8886            return;
    8987        }
     
    9997            GUIManager::getInstance().getLuaState()->doString("NotificationLayer.removeQueue(\"" + this->getName() +  "\")");
    10098            NotificationManager::getInstance().unregisterQueue(this);
    101             COUT(1) << "Error: Notification Queue '" << this->getName() << "' could not be registered." << std::endl;
     99            COUT(1) << "Error: NotificationQueue '" << this->getName() << "' could not be registered." << std::endl;
    102100            return;
    103101        }
     
    358356        bool first = true;
    359357        // Iterate through the set of targets.
    360         for(std::set<std::string, NotificationListenerStringCompare>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
     358        for(std::set<std::string, StringCompare>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
    361359        {
    362360            if(!first)
  • code/trunk/src/modules/notifications/NotificationQueue.h

    r7412 r7413  
    124124            @return Returns a set of strings holding the different targets.
    125125            */
    126             inline const std::set<std::string, NotificationListenerStringCompare> & getTargetsSet()
     126            inline const std::set<std::string, StringCompare> & getTargetsSet()
    127127                { return this->targets_; }
    128128
     
    144144            bool registered_; //!< Helper variable to remember whether the NotificationQueue is registered already.
    145145
    146             std::set<std::string, NotificationListenerStringCompare> targets_; //!< The targets the NotificationQueue displays Notifications of.
     146            std::set<std::string, StringCompare> targets_; //!< The targets the NotificationQueue displays Notifications of.
    147147
    148148            std::multiset<NotificationContainer*, NotificationContainerCompare> ordering_; //!< The NotificationContainers ordered by the time they were registered.
Note: See TracChangeset for help on using the changeset viewer.