Last change
on this file since 11748 was
11644,
checked in by kuchlert, 7 years ago
|
eigentlich fertig nur noch altes system entfernen
|
File size:
1.1 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 | |
---|
[11644] | 25 | void Answer::setAnswerId(const std::string& answerId){ |
---|
[11579] | 26 | this->answerId_ = answerId; |
---|
| 27 | } |
---|
| 28 | |
---|
[11644] | 29 | const std::string& Answer::getAnswerId() const |
---|
| 30 | { |
---|
[11579] | 31 | return this->answerId_; |
---|
| 32 | } |
---|
| 33 | |
---|
[11644] | 34 | void Answer::setNextQuestion(const std::string& nextId) |
---|
[11579] | 35 | { |
---|
| 36 | this->nextQuestionId_ = nextId; |
---|
| 37 | } |
---|
| 38 | |
---|
[11644] | 39 | const std::string& Answer::getNextQuestion() const |
---|
[11579] | 40 | { |
---|
| 41 | return this->nextQuestionId_; |
---|
| 42 | } |
---|
| 43 | |
---|
[11644] | 44 | void Answer::setAnswer(const std::string& answer) |
---|
[11579] | 45 | { |
---|
| 46 | this->answer_ = answer; |
---|
| 47 | } |
---|
| 48 | |
---|
[11644] | 49 | const std::string& Answer::getAnswer() const |
---|
[11579] | 50 | { |
---|
| 51 | return this->answer_; |
---|
| 52 | } |
---|
| 53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.