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
|
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(std::string answerId){ |
---|
26 | this->answerId_ = answerId; |
---|
27 | } |
---|
28 | |
---|
29 | std::string Answer::getAnswerId(){ |
---|
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.