Orxonox  0.0.5 Codename: Arcturus
QuestItem.h
Go to the documentation of this file.
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 
37 #ifndef _QuestItem_H__
38 #define _QuestItem_H__
39 
41 
42 #include <string>
43 #include "core/BaseObject.h"
44 #include "QuestManager.h"
45 
46 namespace orxonox
47 {
59  {
60 
61  public:
62  QuestItem(Context* context);
63  virtual ~QuestItem();
64 
65  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
66 
71  inline const std::string & getId(void) const
72  { return this->id_; }
73 
78  inline QuestDescription* getDescription(void) const
79  { return this->description_; }
80 
85  inline bool isRegistered(void)
86  { return this->registered_; }
90  inline void setRegistered(void)
91  { this->registered_ = true; }
92 
93  protected:
94  void setId(const std::string & id);
95 
100  inline void setDescription(QuestDescription* description)
101  { this->description_ = description; }
102 
103  private:
106 
107  bool registered_;
108 
109  };
110 
111 }
112 
113 #endif /* _QuestItem_H__ */
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
void setRegistered(void)
Set the QuestItem as being registered with the QuestManager.
Definition: QuestItem.h:90
bool isRegistered(void)
Check whether the QuestItem is registered with the QuestManager.
Definition: QuestItem.h:85
::std::string string
Definition: gtest-port.h:756
const std::string & getId(void) const
Returns the id of this QuestItem.
Definition: QuestItem.h:71
Definition of the QuestManager class.
xmlelement
Definition: Super.h:519
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
This class is a description of a QuestItem (Quest and QuestHint).
Definition: QuestDescription.h:62
Mode
Definition: CorePrereqs.h:102
Shared library macros, enums, constants and forward declarations for the questsystem module ...
Declaration of BaseObject, the base class of all objects in Orxonox.
Definition: Context.h:45
QuestDescription * getDescription(void) const
Returns the QuestDescription of the QuestItem.
Definition: QuestItem.h:78
QuestDescription * description_
The QuestDescription of the QuestItem.
Definition: QuestItem.h:105
std::string id_
Identifier. Must be unique.
Definition: QuestItem.h:104
void setDescription(QuestDescription *description)
Sets the description of the QuestItem.
Definition: QuestItem.h:100
bool registered_
Whether the QuestItem is registered with the QuestManager.
Definition: QuestItem.h:107
Functions as a base class for quest classes such as Quest or QuestHint.
Definition: QuestItem.h:58
#define _QuestsystemExport
Definition: QuestsystemPrereqs.h:60