Index: code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationManager.h
===================================================================
--- code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationManager.h	(revision 2779)
+++ code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationManager.h	(revision 2785)
@@ -50,5 +50,5 @@
     /**
     @brief
-        The NotificationManager functions as a gateway between Notifications and NotificationQueues.
+        The Singleton NotificationManager functions as a gateway between Notifications and NotificationQueues.
         It receives, organizes Notifications and the redistributes them to the specific NotificationQueues.
     @author
@@ -57,6 +57,8 @@
     class _OrxonoxExport NotificationManager : public BaseObject
     {
+        protected:
+            NotificationManager();
+
         public:
-            NotificationManager(BaseObject* creator);
             virtual ~NotificationManager();
 	        
@@ -64,9 +66,11 @@
             static const std::string NONE;
          
+            static NotificationManager & getInstance(); //! Returns a reference to the single instance of the NotificationManager.
+
             //TDO: Visibility?
-            static bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
-            static bool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue within the NotificationManager.
+            bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
+            bool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue within the NotificationManager.
             
-            static std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationQueue in a specified timeframe.
+            std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationQueue in a specified timeframe.
             
             /**
@@ -76,6 +80,6 @@
             @return Returns a time-ordered list of Notifications.
             */
-            static std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart)
-                { return NotificationManager::getNotifications(queue, timeFrameStart, std::time(0)); }
+            std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart)
+                { return this->getNotifications(queue, timeFrameStart, std::time(0)); }
             /**
             @brief Fetches the Notifications for a specific NotificationQueue starting at a specified timespan before now.
@@ -84,13 +88,15 @@
             @return Returns a time-ordered list of Notifications.
             */
-            static std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, int timeDelay)
-                { return NotificationManager::getNotifications(queue, std::time(0)-timeDelay, std::time(0)); }
+            std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, int timeDelay)
+                { return this->getNotifications(queue, std::time(0)-timeDelay, std::time(0)); }
      
-	       private:
-            static int highestIndex_s; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that  no key appears twice.
+        private:
+            static NotificationManager* singletonRef_s;
+
+            int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that  no key appears twice.
         
-            static std::multimap<std::time_t,Notification*> allNotificationsList_s; //!< Container where all notifications are stored (together with their respecive timestamps).
-            static std::map<NotificationQueue*,int> queueList_s; //!< Container where all NotificationQueues are stored with a number as identifier.
-            static std::map<int,std::multimap<std::time_t,Notification*>*> notificationLists_s; //!< Container where all Notifications, for each identifier (associated with a NotificationQueue), are stored.
+            std::multimap<std::time_t,Notification*> allNotificationsList_; //!< Container where all notifications are stored (together with their respecive timestamps).
+            std::map<NotificationQueue*,int> queueList_; //!< Container where all NotificationQueues are stored with a number as identifier.
+            std::map<int,std::multimap<std::time_t,Notification*>*> notificationLists_; //!< Container where all Notifications, for each identifier (associated with a NotificationQueue), are stored.
             
 
