Last change
on this file since 11634 was
11611,
checked in by kuchlert, 7 years ago
|
fixed addQuestion and addAnswer in Dialog
|
File size:
1.0 KB
|
Rev | Line | |
---|
[11579] | 1 | #include "Answer.h" |
---|
[11611] | 2 | #include "core/CoreIncludes.h" |
---|
[11579] | 3 | |
---|
| 4 | |
---|
| 5 | namespace orxonox{ |
---|
| 6 | |
---|
| 7 | RegisterClass(Answer); |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | // Constructor: |
---|
| 11 | Answer::Answer(Context* context) : BaseObject(context) |
---|
| 12 | { |
---|
| 13 | RegisterObject(Answer); |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
| 17 | { |
---|
| 18 | SUPER(Answer, XMLPort, xmlelement, mode); |
---|
| 19 | |
---|
| 20 | XMLPortParam(Answer, "Id", setAnswerId, getAnswerId, xmlelement, mode); |
---|
| 21 | XMLPortParam(Answer, "answer", setAnswer, getAnswer, xmlelement, mode); |
---|
| 22 | XMLPortParam(Answer, "nextQuestionId", setNextQuestion, getNextQuestion, xmlelement,mode); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | void Answer::setAnswerId(std::string answerId){ |
---|
| 26 | this->answerId_ = answerId; |
---|
| 27 | } |
---|
| 28 | |
---|
[11607] | 29 | std::string Answer::getAnswerId(){ |
---|
[11579] | 30 | return this->answerId_; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | void Answer::setNextQuestion(std::string nextId) |
---|
| 34 | { |
---|
| 35 | this->nextQuestionId_ = nextId; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | std::string Answer::getNextQuestion() |
---|
| 39 | { |
---|
| 40 | return this->nextQuestionId_; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | void Answer::setAnswer(std::string answer) |
---|
| 44 | { |
---|
| 45 | this->answer_ = answer; |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | std::string Answer::getAnswer() |
---|
| 49 | { |
---|
| 50 | return this->answer_; |
---|
| 51 | } |
---|
| 52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.