Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 11607 was 11607, checked in by maxima, 7 years ago

No more compiler errors. XMLPortObjects not yet implemented.

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