[11749] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * ... |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
[11579] | 29 | #include "Answer.h" |
---|
[11611] | 30 | #include "core/CoreIncludes.h" |
---|
[11579] | 31 | |
---|
| 32 | |
---|
| 33 | namespace orxonox{ |
---|
| 34 | |
---|
[11782] | 35 | RegisterClass(Answer); |
---|
[11579] | 36 | |
---|
| 37 | |
---|
[11782] | 38 | // Constructor: |
---|
| 39 | Answer::Answer(Context* context) : BaseObject(context) |
---|
| 40 | { |
---|
| 41 | RegisterObject(Answer); |
---|
| 42 | } |
---|
[11579] | 43 | |
---|
[11782] | 44 | void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
| 45 | { |
---|
| 46 | SUPER(Answer, XMLPort, xmlelement, mode); |
---|
[11579] | 47 | |
---|
[11782] | 48 | XMLPortParam(Answer, "Id", setAnswerId, getAnswerId, xmlelement, mode); |
---|
| 49 | XMLPortParam(Answer, "answer", setAnswer, getAnswer, xmlelement, mode); |
---|
| 50 | XMLPortParam(Answer, "nextQuestionId", setNextQuestion, getNextQuestion, xmlelement,mode); |
---|
| 51 | } |
---|
[11579] | 52 | |
---|
[11782] | 53 | void Answer::setAnswerId(const std::string& answerId){ |
---|
| 54 | this->answerId_ = answerId; |
---|
| 55 | } |
---|
[11579] | 56 | |
---|
[11782] | 57 | const std::string& Answer::getAnswerId() const |
---|
| 58 | { |
---|
| 59 | return this->answerId_; |
---|
| 60 | } |
---|
[11579] | 61 | |
---|
[11782] | 62 | void Answer::setNextQuestion(const std::string& nextId) |
---|
| 63 | { |
---|
| 64 | this->nextQuestionId_ = nextId; |
---|
| 65 | } |
---|
[11579] | 66 | |
---|
[11782] | 67 | const std::string& Answer::getNextQuestion() const |
---|
| 68 | { |
---|
| 69 | return this->nextQuestionId_; |
---|
| 70 | } |
---|
[11579] | 71 | |
---|
[11782] | 72 | void Answer::setAnswer(const std::string& answer) |
---|
| 73 | { |
---|
| 74 | this->answer_ = answer; |
---|
| 75 | } |
---|
[11579] | 76 | |
---|
[11782] | 77 | const std::string& Answer::getAnswer() const |
---|
| 78 | { |
---|
| 79 | return this->answer_; |
---|
| 80 | } |
---|
| 81 | } |
---|