Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 30, 2009, 11:07:06 AM (14 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/util/Singleton.h

    r5929 r6183  
    5656
    5757        //! Update method called by ClassSingletonManager (if used)
    58         void updateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->update(time); }
     58        void preUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->preUpdate(time); }
    5959        //! Empty update method for the static polymorphism
    60         void update(const Clock& time) { }
     60        void preUpdate(const Clock& time) { }
     61        //! Update method called by ClassSingletonManager (if used)
     62        void postUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->postUpdate(time); }
     63        //! Empty update method for the static polymorphism
     64        void postUpdate(const Clock& time) { }
    6165
    6266    protected:
Note: See TracChangeset for help on using the changeset viewer.