Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2011, 5:24:04 PM (13 years ago)
Author:
dafrick
Message:

Anotehr step towards networked notifications.

File:
1 edited

Legend:

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

    r8656 r8662  
    5656        RegisterObject(NotificationQueue);
    5757
    58         this->initialize();
     58        this->size_ = 0;
     59        this->tickTime_ = 0.0f;
     60        this->maxSize_ = NotificationQueue::DEFAULT_SIZE;
     61        this->displayTime_ = NotificationQueue::DEFAULT_DISPLAY_TIME;
     62
     63        this->creationTime_ = std::time(0);
     64       
    5965        this->registerVariables();
    6066    }
     
    96102    /**
    97103    @brief
    98         Initializes the NotificationQueue.
    99     */
    100     void NotificationQueue::initialize(void)
    101     {
    102         this->size_ = 0;
    103         this->tickTime_ = 0.0f;
    104         this->maxSize_ = NotificationQueue::DEFAULT_SIZE;
    105         this->displayTime_ = NotificationQueue::DEFAULT_DISPLAY_TIME;
    106 
    107         this->creationTime_ = std::time(0);
     104        Is called when the name of the NotificationQueue has changed.
     105        Clears and re-creates the NotificationQueue.
     106    */
     107    void NotificationQueue::changedName(void)
     108    {
     109        SUPER(NotificationQueue, changedName);
     110
     111        if(this->isRegistered())
     112            this->clear();
     113           
     114        this->create();
     115
     116        this->targetsChanged();
     117        this->maxSizeChanged();
     118        this->displayTimeChanged();
    108119    }
    109120
     
    159170        XMLPortParam(NotificationQueue, "size", setMaxSize, getMaxSize, xmlelement, mode);
    160171        XMLPortParam(NotificationQueue, "displayTime", setDisplayTime, getDisplayTime, xmlelement, mode);
    161 
    162         this->create();
    163172    }
    164173   
Note: See TracChangeset for help on using the changeset viewer.