Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialog_HS17/src/modules/dialog/Question.cc @ 11579

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

some bug fixed most not

File size: 1.0 KB
Line 
1#include "Question.h"
2
3
4namespace orxonox
5{
6
7        RegisterClass(Question);
8
9        Question::Question(Context* context) : BaseObject(context)
10        {
11                RegisterObject(Question);
12        }
13
14        void Question::XMLPort(Element& xmlement, XMLPort::Mode mode)
15        {
16                SUPER(Question, XMLPort, xmlement, mode);
17
18                XMLPortParam(Question, "question", setQuestion, getQuestion, xmlement, mode);
19                XMLPortParam(Question, "Id", setQuestionId, getQuestionId, xmlement, mode);
20
21                XMLPortObject(Question, AnswerId, "answers", addAnswerId, getAnswerIds, xmlement, mode);
22        }
23
24        void Question::setQuestionId(std::string Id)
25        {
26                this->questionId_ = Id;
27        }
28
29        std::string Question::getQuestionId()
30        {
31                return this->questionId_;
32        }
33
34        void Question::setQuestion(std::string question)
35        {
36                this->question_ = question;
37        }
38
39        cstd::string Question::getQuestion()
40        {
41                return this->question_;
42        }
43
44        void Question::addAnswerId(AnswerId answerId)
45        {
46                this->answerIds_.push_back(answerId.getId);
47        }
48
49
50        std::vector<std::string> Question::getAnswerIds()
51        {
52                return this->answerIds_;
53        }
54       
55}
Note: See TracBrowser for help on using the repository browser.