Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 30, 2009, 11:07:06 AM (15 years ago)
Author:
rgrieder
Message:

Added preUpdate and postUpdate methods for all classes inheriting Singleton. Replaced update() with preUpdate except for the GraphicsManager (postUpdate).
However this does not apply to the Client and Server singletons in the network library. We should think about putting them in a scope as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/IOConsole.cc

    r6181 r6183  
    116116
    117117        // Make sure we make way for the status lines
    118         this->update(Game::getInstance().getGameClock());
     118        this->preUpdate(Game::getInstance().getGameClock());
    119119    }
    120120
     
    122122    {
    123123        // Empty all buffers
    124         this->update(Game::getInstance().getGameClock());
     124        this->preUpdate(Game::getInstance().getGameClock());
    125125        // Erase input and status lines
    126126        this->cout_ << "\033[1G\033[J";
     
    139139    }
    140140
    141     void IOConsole::update(const Clock& time)
     141    void IOConsole::preUpdate(const Clock& time)
    142142    {
    143143        unsigned char c;
     
    495495        this->cursorChanged();
    496496        this->lastRefreshTime_ = Game::getInstance().getGameClock().getRealMicroseconds();
    497         this->update(Game::getInstance().getGameClock());
     497        this->preUpdate(Game::getInstance().getGameClock());
    498498
    499499        this->shell_->registerListener(this);
     
    505505        this->shell_->unregisterListener(this);
    506506        // Empty all buffers
    507         this->update(Game::getInstance().getGameClock());
     507        this->preUpdate(Game::getInstance().getGameClock());
    508508
    509509        // Erase input and status lines
     
    523523
    524524    //! Processes the pending input key strokes, refreshes the status lines and handles std::cout (redirected)
    525     void IOConsole::update(const Clock& time)
     525    void IOConsole::preUpdate(const Clock& time)
    526526    {
    527527        // Process input
Note: See TracChangeset for help on using the changeset viewer.