/* * ORXONOX - the hottest 3D action shooter ever to exist * > www.orxonox.net < * * * License notice: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: * ... * Co-authors: * ... * */ #ifndef _Question_H__ #define _Question_H__ #include "core/BaseObject.h" #include "DialogPrereqs.h" #include "AnswerId.h" #include "core/XMLPort.h" #include "core/CoreIncludes.h" #include namespace orxonox { /** @brief class containing the npc side of the Dialog this class contains one possible text option of the npc, it's id and the ids of possible player reactions (answers) */ class _DialogExport Question : public BaseObject { public: Question(Context* context); virtual void XMLPort(Element& xmelement, XMLPort::Mode mode); void setQuestionId(const std::string& Id); //xmlPort-Funktion, setzt Id const std::string& getQuestionId() const; //xmlPort-Funktion, gibt Id string zuruek void setQuestion(const std::string& question); //xmlPort-Funktion, setzt Fragen string const std::string& getQuestion() const; //xmlPort-Funktion, gibt Fragen string void addAnswerId(AnswerId* answerId); //xmlPort-Funktion, nimmt AnswerIds von entsprechenden Objekten und fuegt sie in List ein. AnswerId* getAnswerId(unsigned int index) const; //xmlPort-Funktion, gibt nichts zuruek /** @brief gives pointer to possivle answerIds of this question @return returns pointer to the array with ids of possible pc textoptions */ const std::vector& getAnswerIds() const; //returnt Pointer auf Vektor mit allen Ids private: std::string questionId_; //!< id of npc textoption std::string question_; //!< string with npc text std::vector answerIds_; //!< vector with possible player reactions }; } #endif