Index: code/branches/releasetodo/src/orxonox/LevelInfo.h
===================================================================
--- code/branches/releasetodo/src/orxonox/LevelInfo.h	(revision 7614)
+++ code/branches/releasetodo/src/orxonox/LevelInfo.h	(revision 7625)
@@ -27,4 +27,10 @@
  */
 
+/**
+    @file LevelInfo.h
+    @brief Definition of the LevelInfo and LevelInfoItem class.
+    @ingroup Orxonox
+*/
+
 #ifndef _LevelInfo_H__
 #define _LevelInfo_H__
@@ -34,39 +40,153 @@
 #include <set>
 #include <string>
+
 #include "core/BaseObject.h"
+#include "core/OrxonoxClass.h"
 
-namespace orxonox // tolua_export
-{  // tolua_export
-    class _OrxonoxExport LevelInfo  // tolua_export
-        : public BaseObject
-    { // tolua_export
-    
+namespace orxonox
+{
+
+    /**
+    @brief
+        The LevelInfoItem class stores information regarding a @ref orxonox::Level "Level" and makes that information it accessible trough the @ref orxonox::LevelManager "LevelManager".
+        A LevelInfoItem object is commonly created from a @ref orxonox::LevelInfo "LevelInfo" object, using its <code>copy()</code> method.
+
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport LevelInfoItem : virtual public OrxonoxClass
+    {
+        public:
+            LevelInfoItem(); //!< Default constructor.
+            LevelInfoItem(const std::string& name, const std::string filename); //!< Constructor. Initializes the object.
+            virtual ~LevelInfoItem(); //!< Destructor.
+
+            /**
+            @brief Set the name of the Level.
+            @param name The name to be set.
+            */
+            inline void setName(const std::string& name)
+                { this->name_ = std::string(name); }
+            /**
+            @brief Get the name of the Level.
+            @return Returns the name of the Level.
+            */
+            inline const std::string& getName(void)
+                { return this->name_; }
+
+            /**
+            @brief Set the description of the Level.
+            @param description The description to be set.
+            */
+            inline void setDescription(const std::string& description)
+                { this->description_ = std::string(description); }
+            /**
+            @brief Get the description of the Level.
+            @return Returns the description of the Level.
+            */
+            inline const std::string& getDescription() const
+                { return this->description_; }
+
+            void setTags(const std::string& tags); //!< Set the tags the Level is tagged with.
+            bool addTag(const std::string& tag, bool update = true); //!< Add a tag to the set of tags the Level is tagged with.
+            /**
+            @brief Get the lis of the tags the Level is tagged with.
+            @return Returns a comma-seperated string of all the tags the Level is tagged with.
+            */
+            inline const std::string& getTags(void) const
+                { return this->tagsString_; }
+            /**
+            @brief Get whether the Level has a specific tag.
+            @param tag The tag for which is checked.
+            @return Returns true if the Level is tagged with the input tag.
+            */
+            bool hasTag(const std::string& tag) const
+                { return this->tags_.find(tag) != this->tags_.end(); }
+
+            /**
+            @brief Get the XML-filename of the Level.
+            @return Returns the XML-filename (including *.oxw extension) of the Level.
+            */
+            inline const std::string& getXMLFilename(void)
+                { return this->xmlfilename_; }
+
+        protected:
+            /**
+            @brief Set the XML-filename of the Level.
+            @param filename The XML-filename to be set.
+            */
+            inline void setXMLFilename(const std::string& filename)
+                { this->xmlfilename_ = std::string(filename); }
+
+            std::string xmlfilename_; //!< The XML-filename of the Level.
+
+        private:
+            void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
+
+            std::string name_; //!< The name of the Level.
+            std::string description_; //!< The description of the Level.
+            std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
+            std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
+    };
+
+    /**
+    @brief
+        The LevelInfo class can be used to store information regarding a @ref orxonox::Level "Level" in its level file.
+        The following parameters can be specified:
+        - @b name The name of the level.
+        - @b description The description of the level.
+        - @b tags A comma-seperated string of tags.
+
+        An example would be:
+        @code
+        <LevelInfo
+            name = "Levelname"
+            description = "This is just some awesome level."
+            tags = "test, awesome"
+        />
+        @endcode
+        The LevelInfo is best located at the top of the level file.
+
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport LevelInfo : public BaseObject, public LevelInfoItem
+    {
         public:
             LevelInfo(BaseObject* creator);
             virtual ~LevelInfo();
-            
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML.
+
+            /**
+            @brief Set the description of the Level.
+            @param description The description to be set.
+            */
             inline void setDescription(const std::string& description)
-                { this->description_ = description; }
-            inline const std::string& getDescription() const // tolua_export
-                { return this->description_; }
-                
-            void setTags(const std::string& tags);
-            inline bool addTag(const std::string& tag)
-                { bool success = this->tags_.insert(tag).second; if(success) this->tagsUpdated(); return success; }
+                { this->LevelInfoItem::setDescription(description); }
+            /**
+            @brief Get the description of the Level.
+            @return Returns the description of the Level.
+            */
+            inline const std::string& getDescription() const
+                { return this->LevelInfoItem::getDescription(); }
+
+            /**
+            @brief Set the tags the Level is tagged with.
+            @param tags A comma-seperated string of all the tags to be set.
+            */
+            inline void setTags(const std::string& tags)
+                { this->LevelInfoItem::setTags(tags); }
+            /**
+            @brief Get the lis of the tags the Level is tagged with.
+            @return Returns a comma-seperated string of all the tags the Level is tagged with.
+            */
             inline const std::string& getTags(void) const
-                { return this->tagsString_; }
-            bool hasTag(const std::string& tag) { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export
-            
-        private:
-            void tagsUpdated(void);
-        
-            std::string description_;
-            std::set<std::string> tags_;
-            std::string tagsString_;
-            
-    }; // tolua_export
-} // tolua_export
+                { return this->LevelInfoItem::getTags(); }
 
-#endif /* _Level_H__ */
+            LevelInfoItem* copy(void); //!< Copies the contents of this LevelInfo object to a new LevelInfoItem object.
+
+    };
+}
+
+#endif /* _LevelInfo_H__ */
