#include <src/orxonox/objects/quest/QuestItem.h>
Public Member Functions | |
const QuestDescription * | getDescription (void) const |
Returns the QuestDescription of the QuestItem. | |
const std::string & | getId (void) const |
Returns the id of this QuestItem. | |
QuestItem (BaseObject *creator) | |
Constructor. Registers and initializes the object. | |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
Method for creating a QuestItem object through XML. | |
virtual | ~QuestItem () |
Destructor. | |
Static Public Member Functions | |
static bool | isId (const std::string &id) |
Checks whether a given id is valid. | |
Protected Member Functions | |
void | setDescription (QuestDescription *description) |
Sets the description of the QuestItem. | |
void | setId (const std::string &id) |
Sets the id of the QuestItem. | |
Private Attributes | |
QuestDescription * | description_ |
The QuestDescription of the QuestItem. | |
std::string | id_ |
Identifier. Should be of GUID form: http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure. |
orxonox::QuestItem::QuestItem | ( | BaseObject * | creator | ) |
orxonox::QuestItem::~QuestItem | ( | ) | [virtual] |
Destructor.
const QuestDescription* orxonox::QuestItem::getDescription | ( | void | ) | const [inline] |
Returns the QuestDescription of the QuestItem.
Referenced by orxonox::QuestManager::addSubQuest(), orxonox::Quest::complete(), orxonox::Quest::fail(), orxonox::QuestHint::setActive(), orxonox::Quest::start(), and XMLPort().
const std::string& orxonox::QuestItem::getId | ( | void | ) | const [inline] |
Returns the id of this QuestItem.
Referenced by orxonox::Quest::addCompleteEffect(), orxonox::Quest::addFailEffect(), orxonox::Quest::addHint(), orxonox::GlobalQuest::addRewardEffect(), orxonox::Quest::addSubQuest(), orxonox::Quest::complete(), orxonox::Quest::fail(), orxonox::QuestListener::getQuestId(), orxonox::FailQuest::invoke(), orxonox::CompleteQuest::invoke(), orxonox::QuestManager::registerHint(), orxonox::QuestManager::registerQuest(), orxonox::Quest::setParentQuest(), orxonox::Quest::start(), orxonox::QuestListener::XMLPort(), XMLPort(), orxonox::QuestHint::XMLPort(), orxonox::LocalQuest::XMLPort(), and orxonox::GlobalQuest::XMLPort().
bool orxonox::QuestItem::isId | ( | const std::string & | id | ) | [static] |
Checks whether a given id is valid.
Checks whether an input id is of the required form.
id | The id to be checked. |
Referenced by orxonox::QuestManager::findHint(), orxonox::QuestManager::findQuest(), orxonox::AddQuestHint::setHintId(), setId(), and orxonox::ChangeQuestStatus::setQuestId().
void orxonox::QuestItem::setDescription | ( | QuestDescription * | description | ) | [inline, protected] |
Sets the description of the QuestItem.
description | The QuestDescription to be set. |
Referenced by XMLPort().
void orxonox::QuestItem::setId | ( | const std::string & | id | ) | [protected] |
Sets the id of the QuestItem.
Sets the id of the QuestItem. The id must be of GUID form. See 'http://en.wikipedia.org/wiki/Globally_Unique_IdentifierBasic_structure' for more information.
id | The id to be set. |
< Checks whether the id is a valid id.
References COUT, id_, and isId().
Referenced by XMLPort().
void orxonox::QuestItem::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
Method for creating a QuestItem object through XML.
Reimplemented from orxonox::BaseObject.
Reimplemented in orxonox::GlobalQuest, orxonox::LocalQuest, orxonox::Quest, and orxonox::QuestHint.
References getDescription(), getId(), setDescription(), setId(), SUPER, XMLPortObject, and XMLPortParam.
QuestDescription* orxonox::QuestItem::description_ [private] |
The QuestDescription of the QuestItem.
std::string orxonox::QuestItem::id_ [private] |
Identifier. Should be of GUID form: http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure.
Referenced by QuestItem(), and setId().