Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialog_HS17/src/modules/dialog/Question.cc @ 11658

Last change on this file since 11658 was 11644, checked in by kuchlert, 6 years ago

eigentlich fertig nur noch altes system entfernen

File size: 1.2 KB
RevLine 
[11579]1#include "Question.h"
[11611]2#include "core/CoreIncludes.h"
[11579]3
4namespace orxonox
5{
6
7        RegisterClass(Question);
8
9        Question::Question(Context* context) : BaseObject(context)
10        {
11                RegisterObject(Question);
12        }
13
14        void Question::XMLPort(Element& xmlement, XMLPort::Mode mode)
15        {
16                SUPER(Question, XMLPort, xmlement, mode);
17
18                XMLPortParam(Question, "question", setQuestion, getQuestion, xmlement, mode);
19                XMLPortParam(Question, "Id", setQuestionId, getQuestionId, xmlement, mode);
20
[11642]21                XMLPortObject(Question, AnswerId, "answerIds", addAnswerId, getAnswerId, xmlement, mode);
[11579]22        }
23
[11644]24        void Question::setQuestionId(const std::string& Id)
[11579]25        {
26                this->questionId_ = Id;
27        }
28
[11644]29        const std::string& Question::getQuestionId() const
[11579]30        {
31                return this->questionId_;
32        }
33
[11644]34        void Question::setQuestion(const std::string& question)
[11579]35        {
36                this->question_ = question;
37        }
38
[11644]39        const std::string& Question::getQuestion() const
[11579]40        {
41                return this->question_;
42        }
43
[11607]44        void Question::addAnswerId(AnswerId* answerId)
[11579]45        {
[11607]46                this->answerIds_.push_back(answerId->getId());
[11579]47        }
48
[11644]49        const AnswerId* Question::getAnswerId() const
[11607]50        {
51                return nullptr;
52        }
[11579]53
[11644]54        const std::vector<std::string>* Question::getAnswerIds()
[11579]55        {
[11642]56                return &(this->answerIds_);
[11579]57        }
58       
59}
Note: See TracBrowser for help on using the repository browser.