Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/formationupdate/src/modules/questsystem/QuestItem.h @ 9891

Last change on this file since 9891 was 8891, checked in by jo, 13 years ago

Ai and tutorial improvements merged back to the trunk. AI features: all weapons are used, the ai-firestrength is configurable, bots are able to collect pickups . I've set the tutorial level as default level.

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