[11607] | 1 | #ifndef _Question_H__ |
---|
| 2 | #define _Question_H__ |
---|
| 3 | |
---|
[11579] | 4 | #include "core/BaseObject.h" |
---|
[11611] | 5 | #include "DialogPrereqs.h" |
---|
[11579] | 6 | #include "AnswerId.h" |
---|
| 7 | #include "core/XMLPort.h" |
---|
[11607] | 8 | #include "core/CoreIncludes.h" |
---|
[11579] | 9 | |
---|
[11611] | 10 | |
---|
[11579] | 11 | #include <string> |
---|
| 12 | |
---|
| 13 | namespace orxonox |
---|
| 14 | { |
---|
[11656] | 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 | |
---|
[11611] | 23 | class _DialogExport Question : public BaseObject |
---|
[11579] | 24 | { |
---|
| 25 | public: |
---|
| 26 | Question(Context* context); |
---|
[11611] | 27 | |
---|
[11579] | 28 | virtual void XMLPort(Element& xmelement, XMLPort::Mode mode); |
---|
| 29 | |
---|
[11644] | 30 | void setQuestionId(const std::string& Id); //xmlPort-Funktion, setzt Id |
---|
| 31 | const std::string& getQuestionId() const; //xmlPort-Funktion, gibt Id string zuruek |
---|
[11579] | 32 | |
---|
[11644] | 33 | void setQuestion(const std::string& question); //xmlPort-Funktion, setzt Fragen string |
---|
| 34 | const std::string& getQuestion() const; //xmlPort-Funktion, gibt Fragen string |
---|
[11579] | 35 | |
---|
[11644] | 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 |
---|
[11579] | 38 | |
---|
[11656] | 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 | */ |
---|
[11644] | 46 | const std::vector<std::string>* getAnswerIds(); //returnt Pointer auf Vektor mit allen Ids |
---|
[11579] | 47 | |
---|
| 48 | |
---|
| 49 | |
---|
[11656] | 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 |
---|
[11579] | 54 | }; |
---|
[11607] | 55 | } |
---|
| 56 | |
---|
| 57 | #endif |
---|