Index: code/branches/tutoriallevel3/src/modules/notifications/NotificationQueue.h
===================================================================
--- code/branches/tutoriallevel3/src/modules/notifications/NotificationQueue.h	(revision 8453)
+++ code/branches/tutoriallevel3/src/modules/notifications/NotificationQueue.h	(revision 8636)
@@ -45,4 +45,5 @@
 #include "NotificationManager.h"
 
+#include "core/BaseObject.h"
 #include "tools/interfaces/Tickable.h"
 
@@ -88,15 +89,17 @@
     @ingroup Notifications
     */
-    class _NotificationsExport NotificationQueue : public Tickable
+    class _NotificationsExport NotificationQueue : public BaseObject, public Tickable
     {
 
         public:
-            NotificationQueue(const std::string& name, const std::string& senders = NotificationListener::ALL, unsigned int size = NotificationQueue::DEFAULT_SIZE, unsigned int displayTime = NotificationQueue::DEFAULT_DISPLAY_TIME);
+            NotificationQueue(BaseObject* creator);
+            NotificationQueue(BaseObject* creator, const std::string& name, const std::string& senders = NotificationListener::ALL, unsigned int size = NotificationQueue::DEFAULT_SIZE, unsigned int displayTime = NotificationQueue::DEFAULT_DISPLAY_TIME);
             virtual ~NotificationQueue();
 
-            virtual void tick(float dt); //!< To update from time to time.
-
-            void update(void); //!< Updates the NotificationQueue.
-            void update(Notification* notification, const std::time_t & time); //!< Updates the NotificationQueue by adding an new Notification.
+            virtual void tick(float dt); // To update from time to time.
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void update(void); // Updates the NotificationQueue.
+            void update(Notification* notification, const std::time_t & time); // Updates the NotificationQueue by adding an new Notification.
 
             // tolua_begin
@@ -105,21 +108,21 @@
             @return Returns the name.
             */
-            inline const std::string& getName() const
-                { return this->name_; }
-
-            void setMaxSize(unsigned int size); //!< Sets the maximum number of displayed Notifications.
+            inline const std::string& getName(void) const
+                { return this->BaseObject::getName(); }
+
+            void setMaxSize(unsigned int size); // Sets the maximum number of displayed Notifications.
             /**
             @brief Returns the maximum number of Notifications displayed.
             @return Returns maximum size.
             */
-            inline unsigned int getMaxSize() const
+            inline unsigned int getMaxSize(void) const
                 { return this->maxSize_; }
 
-            void setDisplayTime(int time); //!< Sets the maximum number of seconds a Notification is displayed.
+            void setDisplayTime(int time); // Sets the maximum number of seconds a Notification is displayed.
             /**
             @brief Returns the time interval the Notification is displayed.
             @return Returns the display time.
             */
-            inline int getDisplayTime() const
+            inline int getDisplayTime(void) const
                 { return this->displayTime_; }
             // tolua_end
@@ -129,5 +132,5 @@
             @return Returns the size of the NotificationQueue.
             */
-            inline unsigned int getSize() const
+            inline unsigned int getSize(void) const
                 { return this->size_; }
 
@@ -136,9 +139,16 @@
             @return Returns a set of strings holding the different targets.
             */
-            inline const std::set<std::string> & getTargetsSet()
+            inline const std::set<std::string> & getTargetsSet(void)
                 { return this->targets_; }
 
-            void setTargets(const std::string & targets); //!< Set the targets of this NotificationQueue.
-            const std::string& getTargets(void) const; //!< Returns a string consisting of the concatenation of the targets.
+            void setTargets(const std::string & targets); // Set the targets of this NotificationQueue.
+            const std::string& getTargets(void) const; // Returns a string consisting of the concatenation of the targets.
+
+            /**
+            @brief Check whether the NotificationQueue is registered with the NotificationManager.
+            @return Returns true if it is registered, false if not.
+            */
+            inline bool isRegistered(void)
+                { return this->registered_; }
 
             bool tidy(void); // Pops all Notifications from the NotificationQueue.
@@ -160,5 +170,5 @@
             virtual void notificationRemoved(unsigned int index) {}
             
-            virtual void clear(bool noGraphics = false); //!< Clears the NotificationQueue by removing all NotificationContainers.
+            virtual void clear(bool noGraphics = false); // Clears the NotificationQueue by removing all NotificationContainers.
 
         protected:
@@ -167,7 +177,11 @@
             static const int INF = -1; //!< Constant denoting infinity.
 
+            virtual void create(void); // Creates the NotificationQueue.
+
         private:
-            std::string name_; //!< The name of the NotificationQueue.
-
+            void initialize(void); // Initializes the NotificationQueue.
+
+            time_t creationTime_; // The time this NotificationQueue was created.
+            
             unsigned int maxSize_; //!< The maximal number of Notifications displayed.
             unsigned int size_; //!< The number of Notifications displayed.
@@ -186,7 +200,7 @@
             void setName(const std::string& name); //!< Sets the name of the NotificationQueue.
 
-            void push(Notification* notification, const std::time_t & time); //!< Adds (pushes) a Notification to the NotificationQueue.
-            void pop(void); //!< Removes (pops) the least recently added Notification form the NotificationQueue.
-            void remove(const std::multiset<NotificationContainer*, NotificationContainerCompare>::iterator& containerIterator); //!< Removes the Notification that is stored in the input NotificationContainer.
+            void push(Notification* notification, const std::time_t & time); // Adds (pushes) a Notification to the NotificationQueue.
+            void pop(void); // Removes (pops) the least recently added Notification form the NotificationQueue.
+            void remove(const std::multiset<NotificationContainer*, NotificationContainerCompare>::iterator& containerIterator); // Removes the Notification that is stored in the input NotificationContainer.
 
     };
