Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/overlays/notifications/NotificationManager.cc

    r3196 r3370  
    4646    const std::string NotificationManager::NONE = "none";
    4747
    48     NotificationManager* NotificationManager::singletonRef_s = NULL;
     48    NotificationManager* NotificationManager::singletonPtr_s = NULL;
    4949
    5050    /**
     
    5555    {
    5656        RegisterRootObject(NotificationManager);
    57 
    58         assert(singletonRef_s == 0);
    59         singletonRef_s = this;
    6057
    6158        this->highestIndex_ = 0;
     
    7067    }
    7168
    72     /**
    73     @brief
    74         Returns the current (and single) instance of the NotificationManager. Creates one, if there isn't one to begin with.
    75     @return
    76         Returns a reference to the single instance of the NotificationManager.
    77     */
    78     /*static*/ NotificationManager & NotificationManager::getInstance()
    79     {
    80         assert(singletonRef_s);
    81         return *singletonRef_s;
    82     }
    83    
    8469    /**
    8570    @brief
  • code/trunk/src/orxonox/overlays/notifications/NotificationManager.h

    r3196 r3370  
    4040#include <map>
    4141#include <string>
     42
     43#include "util/Singleton.h"
    4244#include "core/OrxonoxClass.h"
    4345
     
    5254        Damian 'Mozork' Frick
    5355    */
    54     class _OrxonoxExport NotificationManager : public OrxonoxClass
     56    class _OrxonoxExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
    5557    {
     58            friend class Singleton<NotificationManager>;
    5659        public:
    5760            NotificationManager();
     
    6063            static const std::string ALL;
    6164            static const std::string NONE;
    62 
    63             static NotificationManager & getInstance(); //! Returns a reference to the single instance of the NotificationManager.
    6465
    6566            bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
     
    8889
    8990        private:
    90             static NotificationManager* singletonRef_s;
     91            static NotificationManager* singletonPtr_s;
    9192
    9293            int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that  no key appears twice.
Note: See TracChangeset for help on using the changeset viewer.