Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialog_HS17/src/modules/dialog/Dialog.h @ 11579

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

some bug fixed most not

File size: 1.4 KB
Line 
1#include "core/BaseObject.h"
2#include "Question.h"
3#include "Answer.h"
4#include "core/XMLPort.h"
5#include "overlays/OrxonoxOverlay.h"
6
7#include <string>
8
9namespace orxonox
10{
11        class Dialog : public BaseObject
12        {
13                public:
14                        Dialog(Context* context);
15                        virtual ~Dialog();
16                        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
17                        virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
18
19                        void setName(std::string name);
20                        std::string getName();
21
22                        void setCurrentQuestionId(std::string questionId);
23                        std::string getCurrentQuestionId();
24
25                        void addQuestion(Question question); //fuegt Question der Map hinzu
26                        void addAnswer(Answer answer); //fuegt Answer der Map hinzu
27
28                        std::string getQuestion(); //tolua_export       // returned string der momentanen Frage
29                        std::string getAnswer(std::string answerId); //tolua_export             //returned sting der Antwort zur Id.
30                        std::vector<std::string> getAnswers(); //tolua_export   // returned vector mit allen momentanen AntwortenIds
31
32                        bool execute(bool bTriggered, BaseObject* trigger);
33
34                        void update(std::string givenAnswer);   //tolua_export
35
36                        bool ending(); //tolua_export   //retruned true wenn die Id der Antwort end ist oder keine Antworten auf die frage eingetragen sind
37
38
39                private: 
40                        std::string name_;
41                        std::string currentQuestionId_;
42                        std::map<std::string, Question> questions_;
43                        std::map<std::string, Answer> answers_;
44        };
45}
Note: See TracBrowser for help on using the repository browser.