Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.cc @ 11752

Last change on this file since 11752 was 11749, checked in by landauf, 7 years ago

[Dialog_HS17] added license text

File size: 2.0 KB
RevLine 
[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
33namespace orxonox{
34
35        RegisterClass(Answer);
36
37
38        // Constructor:
39        Answer::Answer(Context* context) : BaseObject(context) 
40        {
41            RegisterObject(Answer);
42        }
43
44        void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
45        {
46                SUPER(Answer, XMLPort, xmlelement, mode);
47
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        }
52
[11644]53        void Answer::setAnswerId(const std::string& answerId){
[11579]54                this->answerId_ = answerId;
55        }
56
[11644]57        const std::string& Answer::getAnswerId() const
58        {
[11579]59                return this->answerId_;
60        }
61
[11644]62        void Answer::setNextQuestion(const std::string& nextId)
[11579]63        {
64                this->nextQuestionId_ = nextId;
65        }
66
[11644]67        const std::string& Answer::getNextQuestion() const
[11579]68        {
69                return this->nextQuestionId_;
70        }
71
[11644]72        void Answer::setAnswer(const std::string& answer)
[11579]73        {
74                this->answer_ = answer;
75        }
76
[11644]77        const std::string& Answer::getAnswer() const
[11579]78        {
79                return this->answer_;
80        }
[11749]81}       
Note: See TracBrowser for help on using the repository browser.