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