Changeset 11611 for code/branches/Dialog_HS17/src/modules/dialog/Dialog.h
- Timestamp:
- Nov 30, 2017, 9:33:27 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialog_HS17/src/modules/dialog/Dialog.h
r11607 r11611 3 3 4 4 #include "core/BaseObject.h" 5 #include "DialogPrereqs.h" 5 6 #include "Question.h" 6 7 #include "Answer.h" … … 9 10 #include "overlays/OrxonoxOverlay.h" 10 11 12 #include <map> 13 #include <vector> 11 14 #include <string> 12 15 13 16 namespace orxonox 14 17 { 15 class Dialog : public BaseObject18 class _DialogExport Dialog : public BaseObject 16 19 { 17 20 public: 18 21 Dialog(Context* context); 19 // virtual ~Dialog(); 22 20 23 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 21 24 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); … … 30 33 void addAnswer(Answer* answer); //fuegt Answer der Map hinzu 31 34 32 Question* getQuestion(unsigned int index) const; // tolua_export //returned string der momentanen Frage33 Answer* getAnswer(unsigned int index) const; // tolua_export //returned string der momentanen Frage34 std::vector<std::string> getAnswers(); //tolua_export// returned vector mit allen momentanen AntwortenIds35 Question* getQuestion(unsigned int index) const; // returned string der momentanen Frage 36 Answer* getAnswer(unsigned int index) const; // returned string der momentanen Frage 37 std::vector<std::string> getAnswers(); // returned vector mit allen momentanen AntwortenIds 35 38 36 39 bool execute(bool bTriggered, BaseObject* trigger); 37 40 38 void update(std::string givenAnswer); //tolua_export41 void update(std::string givenAnswer); 39 42 40 bool ending(); // tolua_export //retruned true wenn die Id der Antwort end ist oder keine Antworten auf die frage eingetragen sind43 bool ending(); //retruned true wenn die Id der Antwort end ist oder keine Antworten auf die frage eingetragen sind 41 44 42 45 … … 44 47 std::string name_; 45 48 std::string currentQuestionId_; 46 std::map<std::string, Question > questions_;47 std::map<std::string, Answer > answers_;49 std::map<std::string, Question*> questions_; 50 std::map<std::string, Answer*> answers_; 48 51 }; 49 52 }
Note: See TracChangeset
for help on using the changeset viewer.