[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 | */ |
---|
| 28 | |
---|
| 29 | #include "core/CoreIncludes.h" |
---|
| 30 | |
---|
| 31 | #include "QuestItem.h" |
---|
| 32 | |
---|
| 33 | namespace orxonox { |
---|
| 34 | |
---|
| 35 | CreateFactory(QuestItem); |
---|
| 36 | |
---|
| 37 | /** |
---|
| 38 | @brief |
---|
| 39 | Constructor. Needs as input a unique identifier to be able to identify different instances of this class (and subclasses). |
---|
| 40 | @param id |
---|
| 41 | The unique identifier. Should be of GUID form: http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure |
---|
| 42 | @param title |
---|
| 43 | The title of this QuestItem. Has an empty string as default. |
---|
| 44 | @param description |
---|
| 45 | The description of this QuestItem. Has an empty string as default. |
---|
| 46 | */ |
---|
| 47 | QuestItem::QuestItem(std::string id, std::string title = "", std::string description = "") : BaseObject() |
---|
| 48 | { |
---|
| 49 | this->initialize(); |
---|
| 50 | |
---|
| 51 | this->id_ = id; |
---|
| 52 | this->description_ = QuestDescription(title, description); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | /** |
---|
| 56 | @brief |
---|
| 57 | Destructor. |
---|
| 58 | */ |
---|
| 59 | QuestItem::~QuestItem() |
---|
| 60 | { |
---|
| 61 | |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | /** |
---|
| 65 | @brief |
---|
| 66 | Initializes the object. |
---|
| 67 | Should be called first in every constructor of this class. |
---|
| 68 | */ |
---|
| 69 | void QuestItem::initialize(void) |
---|
| 70 | { |
---|
| 71 | RegisterObject(QuestItem); |
---|
| 72 | |
---|
| 73 | this->id_ = ""; |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | } |
---|