Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/questsystem/QuestItem.h @ 7535

Last change on this file since 7535 was 7456, checked in by dafrick, 14 years ago

Reviewing documentation fo Questsystem, moving documentation fully into doxygen.
Added some files to modules they belong to.

  • Property svn:eol-style set to native
File size: 3.5 KB
RevLine 
[1992]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 *      Damian 'Mozork' Frick
24 *   Co-authors:
25 *      ...
26 *
27 */
[5693]28
[2261]29/**
[7456]30    @file QuestItem.h
[2662]31    @brief Definition of the QuestItem class.
[7456]32        The @ref orxonox::QuestItem "QuestItem" is the parent class of @ref orxonox::Quest "Quest" and @ref orxonox::QuestHint "QuestHint".
33    @ingroup Questsystem
[2261]34*/
[2092]35
[2261]36
[1992]37#ifndef _QuestItem_H__
38#define _QuestItem_H__
39
[5722]40#include "questsystem/QuestsystemPrereqs.h"
[2095]41
[1992]42#include <string>
[2068]43#include "core/BaseObject.h"
[7163]44#include "QuestManager.h"
[1992]45
[2662]46namespace orxonox
47{
[1992]48    /**
49    @brief
[7456]50        Functions as a base class for quest classes such as @ref orxonox::Quest "Quest" or @ref orxonox::QuestHint "QuestHint".
51        Has a unique identifier and a @ref orxonox::QuestDescription "QuestDescription".
[1992]52    @author
[2093]53        Damian 'Mozork' Frick
[1992]54    */
[5722]55    class _QuestsystemExport QuestItem : public BaseObject
[1992]56    {
[2092]57
[2093]58        public:
[2092]59            QuestItem(BaseObject* creator);
[2093]60            virtual ~QuestItem();
[2092]61
[2261]62            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestItem object through XML.
[2092]63
[2261]64            /**
65            @brief Returns the id of this QuestItem.
[2662]66            @return Returns the id of the QuestItem.
[2261]67            */
68            inline const std::string & getId(void) const
[1992]69                { return this->id_; }
[5693]70
[2662]71            /**
72            @brief Returns the QuestDescription of the QuestItem.
73            @return Returns a pointer to the QuestDescription object of the QuestItem.
74            */
[7163]75            inline QuestDescription* getDescription(void) const
[1992]76                { return this->description_; }
[2092]77
[7163]78            /**
79            @brief Check whether the QuestItem is registered with the QuestManager.
80            @return Returns true if the QuestItem is registered with the QuestManager.
81            */
82            inline bool isRegistered(void)
83                { return this->registered_; }
84            /**
85            @brief Set the QuestItem as being registered with the QuestManager.
86            */
87            inline void setRegistered(void)
88                { this->registered_ = true; }
[2092]89
[2093]90        protected:
[2261]91            void setId(const std::string & id); //!< Sets the id of the QuestItem.
[5693]92
[2261]93            /**
94            @brief Sets the description of the QuestItem.
95            @param description The QuestDescription to be set.
96            */
[2093]97            inline void setDescription(QuestDescription* description)
[2068]98                { this->description_ = description; }
[2092]99
[2093]100        private:
[7401]101            std::string id_; //!< Identifier. Must be unique.
[2261]102            QuestDescription* description_; //!< The QuestDescription of the QuestItem.
[2092]103
[7163]104            bool registered_;
105
[1992]106    };
107
108}
109
110#endif /* _QuestItem_H__ */
Note: See TracBrowser for help on using the repository browser.