Line | |
---|
1 | #include "Answer.h" |
---|
2 | |
---|
3 | |
---|
4 | namespace orxonox{ |
---|
5 | |
---|
6 | RegisterClass(Answer); |
---|
7 | |
---|
8 | |
---|
9 | // Constructor: |
---|
10 | Answer::Answer(Context* context) : BaseObject(context) |
---|
11 | { |
---|
12 | RegisterObject(Answer); |
---|
13 | } |
---|
14 | |
---|
15 | void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
16 | { |
---|
17 | SUPER(Answer, XMLPort, xmlelement, mode); |
---|
18 | |
---|
19 | XMLPortParam(Answer, "Id", setAnswerId, getAnswerId, xmlelement, mode); |
---|
20 | XMLPortParam(Answer, "answer", setAnswer, getAnswer, xmlelement, mode); |
---|
21 | XMLPortParam(Answer, "nextQuestionId", setNextQuestion, getNextQuestion, xmlelement,mode); |
---|
22 | } |
---|
23 | |
---|
24 | void Answer::setAnswerId(std::string answerId){ |
---|
25 | this->answerId_ = answerId; |
---|
26 | } |
---|
27 | |
---|
28 | std::string getAnswerId(){ |
---|
29 | return this->answerId_; |
---|
30 | } |
---|
31 | |
---|
32 | void Answer::setNextQuestion(std::string nextId) |
---|
33 | { |
---|
34 | this->nextQuestionId_ = nextId; |
---|
35 | } |
---|
36 | |
---|
37 | std::string Answer::getNextQuestion() |
---|
38 | { |
---|
39 | return this->nextQuestionId_; |
---|
40 | } |
---|
41 | |
---|
42 | void Answer::setAnswer(std::string answer) |
---|
43 | { |
---|
44 | this->answer_ = answer; |
---|
45 | } |
---|
46 | |
---|
47 | std::string Answer::getAnswer() |
---|
48 | { |
---|
49 | return this->answer_; |
---|
50 | } |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.