Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialog_HS17/src/modules/dialog/Question.h @ 11658

Last change on this file since 11658 was 11656, checked in by kuchlert, 7 years ago

fertig kommentierte version

File size: 1.6 KB
Line 
1#ifndef _Question_H__
2#define _Question_H__
3
4#include "core/BaseObject.h"
5#include "DialogPrereqs.h"
6#include "AnswerId.h"
7#include "core/XMLPort.h"
8#include "core/CoreIncludes.h"
9
10
11#include <string>
12
13namespace orxonox
14{
15
16        /**
17        @brief
18    class containing the npc side of the Dialog
19
20    this class contains one possible text option of the npc, it's id and the ids of possible player reactions (answers)
21        */
22
23        class _DialogExport Question : public BaseObject
24        {
25                public:
26                        Question(Context* context);
27
28                        virtual void XMLPort(Element& xmelement, XMLPort::Mode mode);
29
30                        void setQuestionId(const std::string& Id);      //xmlPort-Funktion, setzt Id
31                        const std::string& getQuestionId() const;       //xmlPort-Funktion, gibt Id string zuruek
32
33                        void setQuestion(const std::string& question);  //xmlPort-Funktion, setzt Fragen string
34                        const std::string& getQuestion() const; //xmlPort-Funktion, gibt Fragen string
35
36                        void addAnswerId(AnswerId* answerId);   //xmlPort-Funktion, nimmt AnswerIds von entsprechenden Objekten und fuegt sie in List ein.
37                        const AnswerId* getAnswerId() const;    //xmlPort-Funktion, gibt nichts zuruek
38
39                        /**
40                @brief
41                    gives pointer to possivle answerIds of this question
42
43                @return
44                        returns pointer to the array with ids of possible pc textoptions
45                */
46                        const std::vector<std::string>* getAnswerIds(); //returnt Pointer auf Vektor mit allen Ids
47
48
49
50                private:       
51                        std::string questionId_;        //!< id of npc textoption       
52                        std::string question_;  //!< string with npc text
53                        std::vector<std::string> answerIds_;    //!< vector with possible player reactions
54        };
55}
56
57#endif
Note: See TracBrowser for help on using the repository browser.