Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 29, 2009, 10:19:38 PM (15 years ago)
Author:
landauf
Message:

merged libraries branch back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/quest/QuestListener.h

    r3280 r5693  
    3535#define _QuestListener_H__
    3636
    37 #include "OrxonoxPrereqs.h"
     37#include "objects/quest/QuestPrereqs.h"
    3838
    3939#include <string>
     
    5858    @brief
    5959        Provides a way to react to the starting, completing and failing of Quests.
    60        
     60
    6161        The XML representation goes as follows:
    6262        You can use the QuestListener as if it were a Trigger or EventListener, that fires an Event when the status (depending on the set mode) of the given Quest changes.
    63        
     63
    6464        <BaseObject> // The object that should react to the status change of a Quest.
    6565            <events>
    66                 <function> // Where function is the method of the object that schould be executed. Normally this would be visibility or activity.
     66                <function> // Where function is the method of the object that should be executed. Normally this would be visibility or activity.
    6767                    <QuestListener questId="someQuestId" mode="someMode" /> // Where someQuestId is the identifier for the Quest the QuestListener is reacting to, and someMode is the kind of status change the QUestListener reacts to (all, start, complete or fail).
    6868                </function>
     
    7272    Damian 'Mozork' Frick
    7373    */
    74     class _OrxonoxExport QuestListener : public BaseObject
     74    class _QuestExport QuestListener : public BaseObject
    7575    {
    7676    public:
    7777        QuestListener(BaseObject* creator);
    7878        virtual ~QuestListener();
    79        
     79
    8080        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestListener object through XML.
    81        
     81
    8282        static void advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status); //!< Makes all QuestListener in the list aware that a certain status change has occured.
    83        
     83
    8484        bool setQuestId(const std::string & id); //!< Sets the questId of the Quest the QuestListener reacts to.
    8585        bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener.
    86        
     86
    8787        std::string getMode(void); //!< Get the mode of the QuestListener.
    88        
    89         const std::string & getQuestId(void);       
     88
     89        const std::string & getQuestId(void);
    9090        bool execute(void); //!< Executes the QuestListener, resp. fires an Event.
    91        
     91
    9292    private:
    9393        QuestListenerMode::Value mode_; //!< The mode of the QuestListener.
    9494        Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to.
    95    
     95
    9696    };
    9797
Note: See TracChangeset for help on using the changeset viewer.