Index: code/trunk/src/orxonox/objects/quest/Quest.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/Quest.h	(revision 2096)
+++ code/trunk/src/orxonox/objects/quest/Quest.h	(revision 2261)
@@ -26,5 +26,13 @@
  *
  */
-
+ 
+/**
+    @file Quest.h
+    @brief
+    Definition of the Quest class.
+    
+    The Quest is the parent class of LocalQuest and GlobalQuest.
+*/
+ 
 #ifndef _Quest_H__
 #define _Quest_H__
@@ -36,4 +44,5 @@
 
 #include "core/XMLPort.h"
+
 #include "QuestItem.h"
 
@@ -41,4 +50,5 @@
 {
 
+    //!Different states of a Quest.
     enum Enum
     {
@@ -53,11 +63,13 @@
 namespace orxonox {
 
-    class Player; //Forward declaration, remove when fully integrated into the objecthirarchy.
-
     /**
     @brief
-        Represents a quest in the game.
-        A quest has a list of subquests and a parentquest (if it is not a rootquest).
-        Each quest exists only once but it has a different status (inactive, active, failed or completed) for each player.
+        Represents a Quest in the game.
+        A Quest has a list of subquests and a parentquest (if it is not a rootquest).
+        Each Quest exists only once but it has a different status (inactive, active, failed or completed) for each player.
+        A Quest has several hints (QuestHint) that can be unlocked through QuestEffects and then display aid in solving the Quest.
+        A Quest has a list of QuestEffects that are invoked when the quest is failed and also a list of QuestEffects that are invoked, when the Quest is completed.
+        
+        Quest itself should not be instantiated, if you want to create a quest either go for LocalQuest or GlobalQuest, whichever suits you needs better.
     @author
         Damian 'Mozork' Frick
@@ -69,49 +81,78 @@
             virtual ~Quest();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Quest object through XML.
 
-            inline Quest* getParentQuest(void) const //!< Returns the parent quest of the quest.
+            /**
+            @brief Returns the parentquest of the Quest.
+            @return Returns a pointer to the parentquest of the Quest.
+            */
+            inline Quest* getParentQuest(void) const
                 { return this->parentQuest_; }
-            inline const std::list<Quest*> & getSubQuestList(void) const //!< Returns the list of sub quests.
-                { return this->subQuests_; }
-
-            bool isInactive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
-            bool isActive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'active'.
-            bool isFailed(const Player* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
-            bool isCompleted(const Player* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
-
-            bool start(Player* player); //!< Sets a quest to active.
-            bool fail(Player* player); //!< Fails the quest.
-            bool complete(Player* player); //!< Completes the quest.
+                
+	    /**
+	    @brief Returns the list of subquests.
+	    @return Returns a reference to the list of subquests of the quest.
+	    */
+	    inline const std::list<Quest*> & getSubQuestList(void) const
+		{ return this->subQuests_; }
+		    
+	    /**
+	    @brief Returns the list of all QuestHints of this Quest.
+	    @return Returns a reference to the list of QuestHints of the Quest.
+	    */
+	    inline const std::list<QuestHint*> & getHintsList(void) const
+		{ return this->hints_; }
+	    
+	    bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
+	    bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'.
+	    bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
+	    bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
+	    
+	    bool start(PlayerInfo* player); //!< Sets a Quest to active.
+	    virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest.
+	    virtual bool complete(PlayerInfo* player) = 0; //!< Completes the Quest.
 
         protected:
-            void initialize(void); //!< Initialized the object.
+            virtual bool isStartable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be started.
+            virtual bool isFailable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be failed.
+            virtual bool isCompletable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be completed.
 
-            virtual bool isStartable(const Player* player) const = 0; //!< Checks whether the quest can be started.
-            virtual bool isFailable(const Player* player) const = 0; //!< Checks whether the quest can be failed.
-            virtual bool isCompletable(const Player* player) const = 0; //!< Checks whether the quest can be completed.
+            const Quest* getParentQuest(void); //!< Returns the parentquest of the Quest.
+            const Quest* getSubQuest(unsigned int index) const; //!<Returns the subquest at the given index.
+            const QuestHint* getHint(unsigned int index) const; //!< Returns the QuestHint at the given index.
+            const QuestEffect* getFailEffect(unsigned int index) const; //!< Returns the fail QuestEffect at the given index.
+            const QuestEffect* getCompleteEffect(unsigned int index) const; //!< Returns the complete QuestEffect at the given index.
+            
+            /**
+            @brief Returns the list of fail QuestEffects.
+            @return Returns a reference to the list of fail QuestEffects.
+            */
+            inline std::list<QuestEffect*> & getFailEffectList(void)
+                { return this->failEffects_; }
+                
+	    /**
+	    @brief Returns the list of complete QuestEffects.
+	    @return Returns a reference to the list of complete QuestEffects.
+	    */
+	    inline std::list<QuestEffect*> & getCompleteEffectList(void)
+                { return this->completeEffects_; }
 
-            bool setParentQuest(Quest* quest); //!< Sets the parent quest of the quest.
-            bool addSubQuest(Quest* quest); //!< Adds a sub quest to the quest.
-            bool addHint(QuestHint* hint); //!< Add a hint to the list of hints.
-            bool addFailEffect(QuestEffect* effect);
-            bool addCompleteEffect(QuestEffect* effect);
+            virtual questStatus::Enum getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.
+            virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
+            
+    private:
+            Quest* parentQuest_; //!< Pointer to the parentquest.
+            std::list<Quest*> subQuests_; //!< List of all the subquests.
 
-            const Quest* getParentQuest(void);
-            const Quest* getSubQuests(unsigned int index) const;
-            const QuestHint* getHints(unsigned int index) const;
-            const QuestEffect* getFailEffects(unsigned int index) const;
-            const QuestEffect* getCompleteEffects(unsigned int index) const;
+            std::list<QuestHint*> hints_; //!< A list of all the QuestHints tied to this Quest.
 
-            virtual questStatus::Enum getStatus(const Player* player) const = 0; //!< Returns the status of the quest for a specific player.
-            virtual bool setStatus(Player* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
-
-            Quest* parentQuest_; //!< Pointer to the parent quest.
-            std::list<Quest*> subQuests_; //!< List of all the sub quests.
-
-            std::list<QuestHint*> hints_; //!< A list of all the hints tied to this quest.
-
-            std::list<QuestEffect*> failEffects_; //!< A list of all effects to be invoked, when the quest has been failed.
-            std::list<QuestEffect*> completeEffects_; //!< A list of effects to be invoked, when the quest has been completed.
+            std::list<QuestEffect*> failEffects_; //!< A list of all QuestEffects to be invoked, when the Quest has been failed.
+            std::list<QuestEffect*> completeEffects_; //!< A list of QuestEffects to be invoked, when the Quest has been completed.
+            
+            bool setParentQuest(Quest* quest); //!< Sets the parentquest of the Quest.
+            bool addSubQuest(Quest* quest); //!< Adds a subquest to the Quest.
+            bool addHint(QuestHint* hint); //!< Add a QuestHint to the list of QuestHints.
+            bool addFailEffect(QuestEffect* effect); //!< Adds an QuestEffect to the list of fail QuestEffects.
+            bool addCompleteEffect(QuestEffect* effect); //!< Adds an QuestEffect to the list of complete QuestEffects.
 
     };
