Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/dialog/Answer.cc @ 12137

Last change on this file since 12137 was 11782, checked in by landauf, 7 years ago

tabs → spaces

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
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
29#include "Answer.h"
30#include "core/CoreIncludes.h"
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
53    void Answer::setAnswerId(const std::string& answerId){
54        this->answerId_ = answerId;
55    }
56
57    const std::string& Answer::getAnswerId() const
58    {
59        return this->answerId_;
60    }
61
62    void Answer::setNextQuestion(const std::string& nextId)
63    {
64        this->nextQuestionId_ = nextId;
65    }
66
67    const std::string& Answer::getNextQuestion() const
68    {
69        return this->nextQuestionId_;
70    }
71
72    void Answer::setAnswer(const std::string& answer)
73    {
74        this->answer_ = answer;
75    }
76
77    const std::string& Answer::getAnswer() const
78    {
79        return this->answer_;
80    }
81}
Note: See TracBrowser for help on using the repository browser.