Index: code/branches/libraries/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/branches/libraries/src/orxonox/OrxonoxPrereqs.h	(revision 5618)
+++ code/branches/libraries/src/orxonox/OrxonoxPrereqs.h	(revision 5619)
@@ -223,9 +223,4 @@
     class Pong;
 
-    class Scores;
-    class CreateLines;
-    class Scoreboard;
-    class Stats;
-
     // collision
     class CollisionShape;
@@ -257,4 +252,5 @@
     class InGameConsole;
     class Notification;
+    class NotificationListener;
     class NotificationManager;
     class NotificationOverlay;
@@ -268,7 +264,9 @@
     class KillMessage;
     class DeathMessage;
+    class Map;
+
     class CreateLines;
     class Scoreboard;
-    class Map;
+    class Stats;
 
     //sound
Index: code/branches/libraries/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/libraries/src/orxonox/gamestates/GSLevel.cc	(revision 5618)
+++ code/branches/libraries/src/orxonox/gamestates/GSLevel.cc	(revision 5619)
@@ -48,5 +48,5 @@
 #include "objects/Radar.h"
 #include "objects/quest/QuestManager.h"
-#include "overlays/notifications/NotificationManager.h"
+#include "objects/quest/notifications/NotificationManager.h"
 #include "CameraManager.h"
 #include "LevelManager.h"
Index: code/branches/libraries/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/branches/libraries/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 5618)
+++ code/branches/libraries/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 5619)
@@ -40,4 +40,5 @@
 #include "Tickable.h"
 #include "TimeFactorListener.h"
+#include "NotificationListener.h"
 
 #include "core/CoreIncludes.h"
@@ -108,3 +109,11 @@
         RegisterObject(Rewardable);
     }
+
+    //----------------------------
+    // NotificationListener
+    //----------------------------
+    NotificationListener::NotificationListener()
+    {
+        RegisterObject(NotificationListener);
+    }
 }
Index: code/branches/libraries/src/orxonox/interfaces/NotificationListener.h
===================================================================
--- code/branches/libraries/src/orxonox/interfaces/NotificationListener.h	(revision 5619)
+++ code/branches/libraries/src/orxonox/interfaces/NotificationListener.h	(revision 5619)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the NotificationListener class.
+*/
+
+#ifndef _NotificationListener_H__
+#define _NotificationListener_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <ctime>
+#include <set>
+#include <string>
+
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport NotificationListener : virtual public OrxonoxClass
+    {
+        public:
+            NotificationListener();
+            virtual ~NotificationListener() {}
+
+            virtual const std::set<std::string> & getTargetsSet() = 0;
+            virtual void update(void) = 0;
+            virtual void update(Notification* notification, const std::time_t & time) = 0;
+    };
+}
+
+#endif /* _NotificationListener_H__ */
Index: code/branches/libraries/src/orxonox/objects/quest/CMakeLists.txt
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/CMakeLists.txt	(revision 5618)
+++ code/branches/libraries/src/orxonox/objects/quest/CMakeLists.txt	(revision 5619)
@@ -18,2 +18,4 @@
   QuestNotification.cc
 )
+
+ADD_SUBDIRECTORY(notifications)
Index: code/branches/libraries/src/orxonox/objects/quest/QuestNotification.h
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/QuestNotification.h	(revision 5618)
+++ code/branches/libraries/src/orxonox/objects/quest/QuestNotification.h	(revision 5619)
@@ -26,5 +26,5 @@
  *
  */
- 
+
 #ifndef _QuestNotification_H__
 #define _QuestNotification_H__
@@ -33,5 +33,5 @@
 
 #include <string>
-#include "overlays/notifications/Notification.h"
+#include "notifications/Notification.h"
 
 namespace orxonox {
@@ -39,5 +39,5 @@
     /**
     @brief
-        
+
     @author
         Damian 'Mozork' Frick
@@ -49,12 +49,12 @@
             QuestNotification(const std::string & message);
             virtual ~QuestNotification();
-            
+
             bool send(void);
-     
+
         private:
             static const std::string SENDER;
-            
+
             void initialize(void);
- 
+
     };
 
Index: code/branches/libraries/src/orxonox/objects/quest/notifications/CMakeLists.txt
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/notifications/CMakeLists.txt	(revision 5619)
+++ code/branches/libraries/src/orxonox/objects/quest/notifications/CMakeLists.txt	(revision 5619)
@@ -0,0 +1,4 @@
+ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+  Notification.cc
+  NotificationManager.cc
+)
Index: code/branches/libraries/src/orxonox/objects/quest/notifications/Notification.cc
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/notifications/Notification.cc	(revision 5619)
+++ code/branches/libraries/src/orxonox/objects/quest/notifications/Notification.cc	(revision 5619)
@@ -0,0 +1,130 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thes
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Implementation of the Notification class.
+*/
+
+#include "Notification.h"
+
+#include "core/CoreIncludes.h"
+#include "NotificationManager.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Default constructor. Initializes the object.
+    */
+    Notification::Notification(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(Notification);
+        this->initialize();
+    }
+    
+    /**
+    @brief
+        Constructor. Creates a Notification with the input message.
+    @param message
+        The message of the Notification.
+    */
+    Notification::Notification(const std::string & message) : BaseObject(NULL)
+    {
+        this->message_ = message;
+    }
+    
+    /**
+    @brief
+        Destructor.
+    */
+    Notification::~Notification()
+    {
+    }
+    
+    /**
+    @brief
+        Registers the object and sets some default values.
+    */
+    void Notification::initialize(void)
+    {
+        this->message_ = "";
+        this->sender_ = NotificationManager::NONE;
+        this->sent_ = false;
+    }
+    
+    /**
+    @brief
+        Sends the Notification to the Notificationmanager, with sender NetificationManager::NONE.
+    @return
+        Returns true if successful.
+    */
+    bool Notification::send(void)
+    {
+        return this->send(NotificationManager::NONE);
+    }
+    
+    /**
+    @brief
+        Sends the Notification to the Notificationmanager, which then in turn distributes it to the different NotificationQueues.
+    @param sender
+        The sender the Notification was sent by. Used by the NotificationManager to distributes the notification to the correct NotificationQueues.
+    @return
+        Returns true if successful.
+    */
+    bool Notification::send(const std::string & sender)
+    {
+        this->sender_ = sender;
+        bool successful = NotificationManager::getInstance().registerNotification(this);
+        if(!successful)
+            return false;
+        this->sent_ = true;
+        
+        COUT(3) << "Notification \"" << this->getMessage() << "\" sent." << std::endl;
+        
+        return true;
+    }
+    
+    /**
+    @brief
+        Sets the message of the notification.
+    @param message
+        The message to be set.
+    @return
+        Returns true if successful.
+    */
+    bool Notification::setMessage(const std::string & message)
+    {
+        if(this->isSent()) //!< The message cannot be changed if the message has already been sent.
+            return false;
+        this->message_ = message;
+        return true;
+    }
+
+}
Index: code/branches/libraries/src/orxonox/objects/quest/notifications/Notification.h
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/notifications/Notification.h	(revision 5619)
+++ code/branches/libraries/src/orxonox/objects/quest/notifications/Notification.h	(revision 5619)
@@ -0,0 +1,90 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the Notification class.
+*/
+
+#ifndef _Notification_H__
+#define _Notification_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        A Notification is a short message used to inform the player about something that just happened. A Notification can be sent from any part of orxonox and is then displayed in the proper NotificationQueue (depending on which senders the specific NotificationQueue accepts).
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport Notification : public BaseObject
+    {
+        public:
+            Notification(BaseObject* creator);
+            Notification(const std::string & message);
+            virtual ~Notification();
+
+            bool send(void); //!< Sends the Notification to the Notificationmanager, with sender NotificationManager::NONE;
+            bool send(const std::string & sender); //!< Sends the Notification to the Notificationmanager.
+
+            /**
+            @brief Checks whether the Notification was sent.
+            @return Returns true if the Notification was sent already.
+            */
+            inline bool isSent(void) const
+                { return this->sent_; }
+            /**
+            @brief Returns the message of the Notification.
+            @return Returns the message of the Notification.
+            */
+            inline const std::string & getMessage(void) const
+                { return this->message_; }
+
+            inline const std::string & getSender(void) const
+                { return this->sender_; }
+
+            bool setMessage(const std::string & message); //!< Sets the message of the notification.
+
+        private:
+            std::string message_; //!< The Notification message.
+            std::string sender_; //!< The sender of the notification.
+            bool sent_; //!< Whether Notification has been sent, if so it cannot be changed.
+
+            void initialize(void);
+
+    };
+
+}
+
+#endif /* _Notification_H__ */
Index: code/branches/libraries/src/orxonox/objects/quest/notifications/NotificationManager.cc
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/notifications/NotificationManager.cc	(revision 5619)
+++ code/branches/libraries/src/orxonox/objects/quest/notifications/NotificationManager.cc	(revision 5619)
@@ -0,0 +1,190 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Implementation of the NotificationManager class.
+*/
+
+#include "NotificationManager.h"
+
+#include <set>
+
+#include "core/CoreIncludes.h"
+#include "Notification.h"
+#include "interfaces/NotificationListener.h"
+
+namespace orxonox
+{
+
+    const std::string NotificationManager::ALL = "all";
+    const std::string NotificationManager::NONE = "none";
+
+    NotificationManager* NotificationManager::singletonPtr_s = NULL;
+
+    /**
+    @brief
+        Constructor. Registers the Object.
+    */
+    NotificationManager::NotificationManager()
+    {
+        RegisterRootObject(NotificationManager);
+
+        this->highestIndex_ = 0;
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    NotificationManager::~NotificationManager()
+    {
+    }
+
+    /**
+    @brief
+        Registers a Notification within the NotificationManager and makes sure that the Notification is sent to all the NotificationListeners associated with its sender.
+    @param notification
+        The Notification to be registered.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationManager::registerNotification(Notification* notification)
+    {
+
+        if(notification == NULL) //!< A NULL-Notification cannot be registered.
+            return false;
+
+        std::time_t time = std::time(0); //TDO: Doesn't this expire? //!< Get current time.
+
+        this->allNotificationsList_.insert(std::pair<std::time_t,Notification*>(time,notification));
+
+        if(notification->getSender() == NONE) //!< If the sender has no specific name, then the Notification is only added to the list of all Notifications.
+            return true;
+
+        bool all = false;
+        if(notification->getSender() == ALL) //!< If all are the sender, then the Notifications is added to every NotificationListener.
+            all = true;
+
+        //!< Insert the notification in all listeners that have its sender as target.
+        for(std::map<NotificationListener*,int>::iterator it = this->listenerList_.begin(); it != this->listenerList_.end(); it++) //!< Iterate through all listeners.
+        {
+            std::set<std::string> set = it->first->getTargetsSet();
+            if(all || set.find(notification->getSender()) != set.end() || set.find(ALL) != set.end()) //TDO: Make sure this works.
+            {
+                this->notificationLists_[it->second]->insert(std::pair<std::time_t,Notification*>(time,notification)); //!< Insert the Notification in the Notifications list of the current NotificationListener.
+                it->first->update(notification, time); //!< Update the listener.
+            }
+        }
+
+        COUT(3) << "Notification registered with the NotificationManager." << std::endl;
+
+        return true;
+    }
+
+    /**
+    @brief
+        Registers a NotificationListener within the NotificationManager.
+    @param listener
+        The NotificationListener to be registered.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationManager::registerListener(NotificationListener* listener)
+    {
+        this->highestIndex_ += 1;
+        int index = this->highestIndex_;
+
+        this->listenerList_[listener] = index; //!< Add the NotificationListener to the list of listeners.
+
+        std::set<std::string> set = listener->getTargetsSet(); //TDO: Works this?
+
+        //! If all senders are the target of the listener, then the list of notification for that specific listener is te same as the list of all Notifications.
+        if(set.find(ALL) != set.end())
+        {
+            this->notificationLists_[index] = &this->allNotificationsList_;
+            COUT(3) << "NotificationListener registered with the NotificationManager." << std::endl;
+            return true;
+        }
+
+        this->notificationLists_[index] = new std::multimap<std::time_t,Notification*>;
+        std::multimap<std::time_t,Notification*> map = *this->notificationLists_[index];
+
+        //! Iterate through all Notifications to determine whether any of them should belong to the newly registered NotificationListener.
+        for(std::multimap<std::time_t,Notification*>::iterator it = this->allNotificationsList_.begin(); it != this->allNotificationsList_.end(); it++)
+        {
+            if(set.find(it->second->getSender()) != set.end()) //!< Checks whether the overlay has the sender of the current notification as target.
+            {
+                map.insert(std::pair<std::time_t,Notification*>(it->first, it->second));
+            }
+        }
+
+        listener->update(); //!< Update the listener.
+
+        COUT(3) << "NotificationListener registered with the NotificationManager." << std::endl;
+
+        return true;
+    }
+
+    /**
+    @brief
+        Fetches the Notifications for a specific NotificationListener in a specified timeframe.
+    @param listener
+        The NotificationListener the Notifications are fetched for.
+    @param map
+        A multimap, in which the notifications are stored.
+    @param timeFrameStart
+        The start time of the timeframe.
+    @param timeFrameEnd
+        The end time of the timeframe.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationManager::getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd)
+    {
+        if(listener == NULL || map == NULL)
+            return false;
+
+        std::multimap<std::time_t,Notification*>* notifications = this->notificationLists_[this->listenerList_[listener]]; //!< The Notifications for the input NotificationListener.
+
+        if(notifications == NULL) //!< Returns NULL, if there are no Notifications.
+            return true;
+
+        std::multimap<std::time_t,Notification*>::iterator it, itLowest, itHighest;
+        itLowest = notifications->lower_bound(timeFrameStart);
+        itHighest = notifications->upper_bound(timeFrameStart);
+
+        for(it = itLowest; it != itHighest; it++) //!< Iterate through the Notifications from the start of the time Frame to the end of it.
+        {
+            map->insert(std::pair<std::time_t,Notification*>(it->first,it->second)); //!< Add the found Notifications to the map.
+        }
+
+        return true;
+    }
+
+}
Index: code/branches/libraries/src/orxonox/objects/quest/notifications/NotificationManager.h
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/notifications/NotificationManager.h	(revision 5619)
+++ code/branches/libraries/src/orxonox/objects/quest/notifications/NotificationManager.h	(revision 5619)
@@ -0,0 +1,104 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the NotificationManager class.
+*/
+
+#ifndef _NotificationManager_H__
+#define _NotificationManager_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <ctime>
+#include <map>
+#include <string>
+
+#include "util/Singleton.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        The Singleton NotificationManager functions as a gateway between Notifications and NotificationListeners.
+        It receives, organizes Notifications and the redistributes them to the specific NotificationListeners.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
+    {
+            friend class Singleton<NotificationManager>;
+        public:
+            NotificationManager();
+            virtual ~NotificationManager();
+
+            static const std::string ALL;
+            static const std::string NONE;
+
+            bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
+            bool registerListener(NotificationListener* listener); //!< Registers a NotificationListener within the NotificationManager.
+
+            bool getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationListener in a specified timeframe.
+
+            /**
+            @brief Fetches the Notifications for a specific NotificationListener starting at a specified time.
+            @param listener The NotificationListener the Notifications are fetched for.
+            @param map A multimap, in which the notifications are stored.
+            @param timeFrameStart The start time the Notifications are fetched from.
+            @return Returns true if successful.
+            */
+            bool getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart)
+                { return this->getNotifications(listener, map, timeFrameStart, std::time(0)); }
+            /**
+            @brief Fetches the Notifications for a specific NotificationListener starting at a specified timespan before now.
+            @param listener The NotificationListener the Notifications are fetched for.
+            @param map A multimap, in which the notifications are stored.
+            @param timeDelay The timespan.
+            @return Returns true if successful.
+            */
+            bool getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, int timeDelay)
+                { return this->getNotifications(listener, map, std::time(0)-timeDelay, std::time(0)); }
+
+        private:
+            static NotificationManager* singletonPtr_s;
+
+            int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that  no key appears twice.
+
+            std::multimap<std::time_t,Notification*> allNotificationsList_; //!< Container where all notifications are stored (together with their respecive timestamps).
+            std::map<NotificationListener*,int> listenerList_; //!< Container where all NotificationListeners 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 NotificationListener), are stored.
+
+
+    };
+
+}
+
+#endif /* _NotificationManager_H__ */
Index: code/branches/libraries/src/orxonox/overlays/notifications/CMakeLists.txt
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/CMakeLists.txt	(revision 5618)
+++ code/branches/libraries/src/orxonox/overlays/notifications/CMakeLists.txt	(revision 5619)
@@ -1,5 +1,3 @@
 ADD_SOURCE_FILES(ORXONOX_SRC_FILES
-  Notification.cc
-  NotificationManager.cc
   NotificationOverlay.cc
   NotificationQueue.cc
Index: code/branches/libraries/src/orxonox/overlays/notifications/Notification.cc
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/Notification.cc	(revision 5618)
+++ 	(revision )
@@ -1,130 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thes
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the Notification class.
-*/
-
-#include "Notification.h"
-
-#include "core/CoreIncludes.h"
-#include "NotificationManager.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        Default constructor. Initializes the object.
-    */
-    Notification::Notification(BaseObject* creator) : BaseObject(creator)
-    {
-        RegisterObject(Notification);
-        this->initialize();
-    }
-    
-    /**
-    @brief
-        Constructor. Creates a Notification with the input message.
-    @param message
-        The message of the Notification.
-    */
-    Notification::Notification(const std::string & message) : BaseObject(NULL)
-    {
-        this->message_ = message;
-    }
-    
-    /**
-    @brief
-        Destructor.
-    */
-    Notification::~Notification()
-    {
-    }
-    
-    /**
-    @brief
-        Registers the object and sets some default values.
-    */
-    void Notification::initialize(void)
-    {
-        this->message_ = "";
-        this->sender_ = NotificationManager::NONE;
-        this->sent_ = false;
-    }
-    
-    /**
-    @brief
-        Sends the Notification to the Notificationmanager, with sender NetificationManager::NONE.
-    @return
-        Returns true if successful.
-    */
-    bool Notification::send(void)
-    {
-        return this->send(NotificationManager::NONE);
-    }
-    
-    /**
-    @brief
-        Sends the Notification to the Notificationmanager, which then in turn distributes it to the different NotificationQueues.
-    @param sender
-        The sender the Notification was sent by. Used by the NotificationManager to distributes the notification to the correct NotificationQueues.
-    @return
-        Returns true if successful.
-    */
-    bool Notification::send(const std::string & sender)
-    {
-        this->sender_ = sender;
-        bool successful = NotificationManager::getInstance().registerNotification(this);
-        if(!successful)
-            return false;
-        this->sent_ = true;
-        
-        COUT(3) << "Notification \"" << this->getMessage() << "\" sent." << std::endl;
-        
-        return true;
-    }
-    
-    /**
-    @brief
-        Sets the message of the notification.
-    @param message
-        The message to be set.
-    @return
-        Returns true if successful.
-    */
-    bool Notification::setMessage(const std::string & message)
-    {
-        if(this->isSent()) //!< The message cannot be changed if the message has already been sent.
-            return false;
-        this->message_ = message;
-        return true;
-    }
-
-}
Index: code/branches/libraries/src/orxonox/overlays/notifications/Notification.h
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/Notification.h	(revision 5618)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Definition of the Notification class.
-*/
-
-#ifndef _Notification_H__
-#define _Notification_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <string>
-#include "core/BaseObject.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        A Notification is a short message used to inform the player about something that just happened. A Notification can be sent from any part of orxonox and is then displayed in the proper NotificationQueue (depending on which senders the specific NotificationQueue accepts).
-    @author
-        Damian 'Mozork' Frick
-    */
-    class _OrxonoxExport Notification : public BaseObject
-    {
-        public:
-            Notification(BaseObject* creator);
-            Notification(const std::string & message);
-            virtual ~Notification();
-
-            bool send(void); //!< Sends the Notification to the Notificationmanager, with sender NotificationManager::NONE;
-            bool send(const std::string & sender); //!< Sends the Notification to the Notificationmanager.
-
-            /**
-            @brief Checks whether the Notification was sent.
-            @return Returns true if the Notification was sent already.
-            */
-            inline bool isSent(void) const
-                { return this->sent_; }
-            /**
-            @brief Returns the message of the Notification.
-            @return Returns the message of the Notification.
-            */
-            inline const std::string & getMessage(void) const
-                { return this->message_; }
-
-            inline const std::string & getSender(void) const
-                { return this->sender_; }
-
-            bool setMessage(const std::string & message); //!< Sets the message of the notification.
-
-        private:
-            std::string message_; //!< The Notification message.
-            std::string sender_; //!< The sender of the notification.
-            bool sent_; //!< Whether Notification has been sent, if so it cannot be changed.
-
-            void initialize(void);
-
-    };
-
-}
-
-#endif /* _Notification_H__ */
Index: code/branches/libraries/src/orxonox/overlays/notifications/NotificationManager.cc
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/NotificationManager.cc	(revision 5618)
+++ 	(revision )
@@ -1,190 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the NotificationManager class.
-*/
-
-#include "NotificationManager.h"
-
-#include <set>
-
-#include "core/CoreIncludes.h"
-#include "Notification.h"
-#include "NotificationQueue.h"
-
-namespace orxonox
-{
-
-    const std::string NotificationManager::ALL = "all";
-    const std::string NotificationManager::NONE = "none";
-
-    NotificationManager* NotificationManager::singletonPtr_s = NULL;
-
-    /**
-    @brief
-        Constructor. Registers the Object.
-    */
-    NotificationManager::NotificationManager()
-    {
-        RegisterRootObject(NotificationManager);
-
-        this->highestIndex_ = 0;
-    }
-
-    /**
-    @brief
-        Destructor.
-    */
-    NotificationManager::~NotificationManager()
-    {
-    }
-
-    /**
-    @brief
-        Registers a Notification within the NotificationManager and makes sure that the Notification is displayed in all the NotificationQueues associated with its sender.
-    @param notification
-        The Notification to be registered.
-    @return
-        Returns true if successful.
-    */
-    bool NotificationManager::registerNotification(Notification* notification)
-    {
-    
-        if(notification == NULL) //!< A NULL-Notification cannot be registered.
-            return false;
-        
-        std::time_t time = std::time(0); //TDO: Doesn't this expire? //!< Get current time.
-        
-        this->allNotificationsList_.insert(std::pair<std::time_t,Notification*>(time,notification));
-        
-        if(notification->getSender() == NONE) //!< If the sender has no specific name, then the Notification is only added to the list of all Notifications.
-            return true;
-        
-        bool all = false;
-        if(notification->getSender() == ALL) //!< If all are the sender, then the Notifications is added to every NotificationQueue.
-            all = true;
-        
-        //!< Insert the notification in all queues that have its sender as target.
-        for(std::map<NotificationQueue*,int>::iterator it = this->queueList_.begin(); it != this->queueList_.end(); it++) //!< Iterate through all queues.
-        {
-            std::set<std::string> set = it->first->getTargetsSet();
-            if(all || set.find(notification->getSender()) != set.end() || set.find(ALL) != set.end()) //TDO: Make sure this works.
-            {
-                this->notificationLists_[it->second]->insert(std::pair<std::time_t,Notification*>(time,notification)); //!< Insert the Notification in the Notifications list of the current NotificationQueue.
-                it->first->update(notification, time); //!< Update the queue.
-            }
-        }
-        
-        COUT(3) << "Notification registered with the NotificationManager." << std::endl;
-        
-        return true;
-    }
-    
-    /**
-    @brief
-        Registers a NotificationQueue within the NotificationManager.
-    @param queue
-        The NotificationQueue to be registered.
-    @return
-        Returns true if successful.
-    */
-    bool NotificationManager::registerQueue(NotificationQueue* queue)
-    {
-        this->highestIndex_ += 1;
-        int index = this->highestIndex_;
-        
-        this->queueList_[queue] = index; //!< Add the NotificationQueue to the list of queues.
-        
-        std::set<std::string> set = queue->getTargetsSet(); //TDO: Works this?
-        
-        //! If all senders are the target of the queue, then the list of notification for that specific queue is te same as the list of all Notifications.
-        if(set.find(ALL) != set.end())
-        {
-            this->notificationLists_[index] = &this->allNotificationsList_;
-            COUT(3) << "NotificationQueue registered with the NotificationManager." << std::endl;
-            return true;
-        }
-        
-        this->notificationLists_[index] = new std::multimap<std::time_t,Notification*>;
-        std::multimap<std::time_t,Notification*> map = *this->notificationLists_[index];
-        
-        //! Iterate through all Notifications to determine whether any of them should belong to the newly registered NotificationQueue.
-        for(std::multimap<std::time_t,Notification*>::iterator it = this->allNotificationsList_.begin(); it != this->allNotificationsList_.end(); it++)
-        {
-            if(set.find(it->second->getSender()) != set.end()) //!< Checks whether the overlay has the sender of the current notification as target.
-            {
-                map.insert(std::pair<std::time_t,Notification*>(it->first, it->second));
-            }
-        }
-        
-        queue->update(); //!< Update the queue.
-
-        COUT(3) << "NotificationQueue registered with the NotificationManager." << std::endl;
-        
-        return true;
-    }
-    
-    /**
-    @brief
-        Fetches the Notifications for a specific NotificationQueue in a specified timeframe.
-    @param queue
-        The NotificationQueue the Notifications are fetched for.
-    @param map
-        A multimap, in which the notifications are stored.
-    @param timeFrameStart
-        The start time of the timeframe.
-    @param timeFrameEnd
-        The end time of the timeframe.
-    @return
-        Returns true if successful.
-    */
-    bool NotificationManager::getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd)
-    {
-        if(queue == NULL || map == NULL)
-            return false;
-
-        std::multimap<std::time_t,Notification*>* notifications = this->notificationLists_[this->queueList_[queue]]; //!< The Notifications for the input NotificationQueue.
-        
-        if(notifications == NULL) //!< Returns NULL, if there are no Notifications.
-            return true;
-    
-        std::multimap<std::time_t,Notification*>::iterator it, itLowest, itHighest;
-        itLowest = notifications->lower_bound(timeFrameStart);
-        itHighest = notifications->upper_bound(timeFrameStart);
-        
-        for(it = itLowest; it != itHighest; it++) //!< Iterate through the Notifications from the start of the time Frame to the end of it.
-        {
-            map->insert(std::pair<std::time_t,Notification*>(it->first,it->second)); //!< Add the found Notifications to the map.
-        }
-        
-        return true;
-    }
-
-}
Index: code/branches/libraries/src/orxonox/overlays/notifications/NotificationManager.h
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/NotificationManager.h	(revision 5618)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Definition of the NotificationManager class.
-*/
-
-#ifndef _NotificationManager_H__
-#define _NotificationManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <ctime>
-#include <map>
-#include <string>
-
-#include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        The Singleton NotificationManager functions as a gateway between Notifications and NotificationQueues.
-        It receives, organizes Notifications and the redistributes them to the specific NotificationQueues.
-    @author
-        Damian 'Mozork' Frick
-    */
-    class _OrxonoxExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
-    {
-            friend class Singleton<NotificationManager>;
-        public:
-            NotificationManager();
-            virtual ~NotificationManager();
-
-            static const std::string ALL;
-            static const std::string NONE;
-
-            bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
-            bool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue within the NotificationManager.
-
-            bool getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationQueue in a specified timeframe.
-
-            /**
-            @brief Fetches the Notifications for a specific NotificationQueue starting at a specified time.
-            @param queue The NotificationQueue the Notifications are fetched for.
-            @param map A multimap, in which the notifications are stored.
-            @param timeFrameStart The start time the Notifications are fetched from.
-            @return Returns true if successful.
-            */
-            bool getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart)
-                { return this->getNotifications(queue, map, timeFrameStart, std::time(0)); }
-            /**
-            @brief Fetches the Notifications for a specific NotificationQueue starting at a specified timespan before now.
-            @param queue The NotificationQueue the Notifications are fetched for.
-            @param map A multimap, in which the notifications are stored.
-            @param timeDelay The timespan.
-            @return Returns true if successful.
-            */
-            bool getNotifications(NotificationQueue* queue, std::multimap<std::time_t,Notification*>* map, int timeDelay)
-                { return this->getNotifications(queue, map, std::time(0)-timeDelay, std::time(0)); }
-
-        private:
-            static NotificationManager* singletonPtr_s;
-
-            int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that  no key appears twice.
-
-            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.
-
-
-    };
-
-}
-
-#endif /* _NotificationManager_H__ */
Index: code/branches/libraries/src/orxonox/overlays/notifications/NotificationOverlay.cc
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/NotificationOverlay.cc	(revision 5618)
+++ code/branches/libraries/src/orxonox/overlays/notifications/NotificationOverlay.cc	(revision 5619)
@@ -36,5 +36,5 @@
 #include "util/Exception.h"
 #include "core/CoreIncludes.h"
-#include "Notification.h"
+#include "objects/quest/notifications/Notification.h"
 #include "NotificationQueue.h"
 
@@ -65,5 +65,5 @@
     {
         this->initialize();
-        
+
         if(notification == NULL || queue == NULL) //!> If either notification or queue are not given an Exception is thrown.
         {
@@ -73,8 +73,8 @@
         this->queue_ = queue;
         this->defineOverlay();
-        
+
         this->processNotification(notification);
     }
-    
+
     /**
     @brief
@@ -85,5 +85,5 @@
         this->queue_ = NULL;
     }
-    
+
     /**
     @brief
Index: code/branches/libraries/src/orxonox/overlays/notifications/NotificationQueue.cc
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/NotificationQueue.cc	(revision 5618)
+++ code/branches/libraries/src/orxonox/overlays/notifications/NotificationQueue.cc	(revision 5619)
@@ -39,5 +39,5 @@
 #include "core/XMLPort.h"
 #include "NotificationOverlay.h"
-#include "NotificationManager.h"
+#include "objects/quest/notifications/NotificationManager.h"
 
 namespace orxonox
@@ -80,5 +80,5 @@
         this->tickTime_ = 0.0;
 
-        NotificationManager::getInstance().registerQueue(this);
+        NotificationManager::getInstance().registerListener(this);
     }
 
Index: code/branches/libraries/src/orxonox/overlays/notifications/NotificationQueue.h
===================================================================
--- code/branches/libraries/src/orxonox/overlays/notifications/NotificationQueue.h	(revision 5618)
+++ code/branches/libraries/src/orxonox/overlays/notifications/NotificationQueue.h	(revision 5619)
@@ -45,4 +45,5 @@
 #include "interfaces/Tickable.h"
 #include "overlays/OverlayGroup.h"
+#include "interfaces/NotificationListener.h"
 
 namespace orxonox
@@ -57,5 +58,5 @@
         std::string name; //!< The name of the overlay.
     };
-    
+
     //! Struct to allow ordering of NotificationOverlayContainers.
     struct NotificationOverlayContainerCompare {
@@ -84,18 +85,18 @@
     */
 
-    class _OrxonoxExport NotificationQueue : public OverlayGroup, public Tickable
+    class _OrxonoxExport NotificationQueue : public OverlayGroup, public Tickable, public NotificationListener
     {
-    
+
         public:
             NotificationQueue(BaseObject* creator);
             virtual ~NotificationQueue();
-            
+
             virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); //!< Method for creating a NotificationQueue object through XML.
-            
+
             virtual void tick(float dt); //!< To update from time to time.
-            
+
             void update(void); //!< Updates the queue.
             void update(Notification* notification, const std::time_t & time); //!< Adds a Notification to the queue.
-            
+
             /**
             @brief Returns the maximum number of Notifications displayed.
@@ -140,5 +141,5 @@
             inline const std::string & getFont() const
                 { return this->font_; }
-                
+
             /**
             @brief Returns the targets of this queue, reps. the senders which Notifications are displayed in this queue.
@@ -148,14 +149,14 @@
                 { return this->targets_; }
             bool getTargets(std::string* string) const; //!< Returns a string consisting of the concatination of the targets.
-            
+
             /**
             @brief Sets the position of the NotificationQueue.
             @param pos The position.
             */
-            inline void setPosition(Vector2 pos) 
+            inline void setPosition(Vector2 pos)
                 { this->position_ = pos; this->positionChanged(); }
 
             void scroll(const Vector2 pos); //!< Scrolls the NotificationQueue, meaning all NotificationOverlays are moved the input vector.
-            
+
         private:
             static const int DEFAULT_SIZE = 5; //!< The default maximum number of Notifications displayed.
@@ -166,5 +167,5 @@
             static const std::string DEFAULT_FONT; //!< The default font.
             static const Vector2 DEFAULT_POSITION; //!< the default position.
-        
+
             int maxSize_; //!< The maximal number of Notifications displayed.
             int size_; //!< The number of Notifications displayed.
@@ -172,35 +173,35 @@
             int displayTime_; //!< The time a Notification is displayed.
             Vector2 position_; //!< The position of the NotificationQueue.
-            
+
             std::set<std::string> targets_; //!< The targets the Queue displays Notifications of.
-            
+
             float fontSize_; //!< The font size.
             std::string font_; //!< The font.
-            
+
             std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare> containers_; //!< Multiset, because the ordering is based on, not necessarily unique, timestamps.
             std::map<Notification*, NotificationOverlayContainer*> overlays_; //!< Mapping notifications to their corresponding overlay containers, for easier association and finding.
-            
+
             float tickTime_; //!< Helper variable, to not have to check for overlays that have been displayed too long, every tick.
             NotificationOverlayContainer timeLimit_; //!< Helper object to check against to determine whether Notifications have expired.
-            
+
             void initialize(void); //!< Initializes the object.
             void setDefaults(void); //!< Helper method to set the default values.
-            
+
             bool setMaxSize(int size); //!< Sets the maximum number of displayed Notifications.
             bool setNotificationLength(int length); //!< Sets the maximum number of characters a Notification message displayed by this queue is allowed to have.
             bool setDisplayTime(int time); //!< Sets the maximum number of seconds a Notification is displayed.
-            
+
             bool setTargets(const std::string & targets); //!< Set the targets of this queue.
-            
+
             bool setFontSize(float size); //!< Set the font size.
             bool setFont(const std::string & font); //!< Set the font.
 
             void positionChanged(void); //!< Aligns all the Notifications to the position of the NotificationQueue.
-            
+
             void addNotification(Notification* notification, const std::time_t & time); //!< Add a notification to the queue.
             bool removeContainer(NotificationOverlayContainer* container); //!< Remove a container from the queue.
-            
+
             void clear(void); //!< Clear the queue.
-    
+
     };
 
