#include <src/orxonox/objects/quest/QuestDescription.h>
Public Member Functions | |
const std::string & | getCompleteMessage (void) const |
Returns the complete message. | |
const std::string & | getDescription (void) const |
Returns the description text. | |
const std::string & | getFailMessage (void) const |
Returns the fail message. | |
const std::string & | getTitle (void) const |
Returns the title. | |
QuestDescription (BaseObject *creator) | |
Constructor. Registers and initializes the object. | |
bool | sendAddHintNotification (void) const |
Sends a Notification displaying that a QuestHint was added. | |
bool | sendAddQuestNotification (void) const |
Sends a Notification displaying that a Quest was added. | |
bool | sendCompleteQuestNotification (void) const |
Sends a Notification displaying that a Quest was completed. | |
bool | sendFailQuestNotification (void) const |
Sends a Notification displaying that a Quest was failed. | |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
Method for creating a QuestDescription object through XML. | |
virtual | ~QuestDescription () |
Destructor. | |
Private Member Functions | |
bool | notificationHelper (const std::string &item, const std::string &status) const |
Helper for sending QuestDescriptions as Notifications. | |
void | setCompleteMessage (const std::string &message) |
Sets the complete message. | |
void | setDescription (const std::string &description) |
Sets the description text. | |
void | setFailMessage (const std::string &message) |
Sets the fail message. | |
void | setTitle (const std::string &title) |
Sets the title. | |
Private Attributes | |
std::string | completeMessage_ |
The message displayed when the Quest is completed. | |
std::string | description_ |
The description. | |
std::string | failMessage_ |
The message displayed when the Quest is failed. | |
std::string | title_ |
The title. |
Creating a QuestDescription through XML goes as follows:
<QuestDescription title="Title" description="Description Text" failmessage="You fail." completemessage="You win!">
orxonox::QuestDescription::QuestDescription | ( | BaseObject * | creator | ) |
Constructor. Registers and initializes the object.
References description_, RegisterObject, and title_.
orxonox::QuestDescription::~QuestDescription | ( | ) | [virtual] |
Destructor.
const std::string& orxonox::QuestDescription::getCompleteMessage | ( | void | ) | const [inline] |
Returns the complete message.
Referenced by XMLPort().
const std::string& orxonox::QuestDescription::getDescription | ( | void | ) | const [inline] |
Returns the description text.
Referenced by orxonox::QuestManager::addHints(), and XMLPort().
const std::string& orxonox::QuestDescription::getFailMessage | ( | void | ) | const [inline] |
Returns the fail message.
Referenced by XMLPort().
const std::string& orxonox::QuestDescription::getTitle | ( | void | ) | const [inline] |
Returns the title.
Referenced by XMLPort().
bool orxonox::QuestDescription::notificationHelper | ( | const std::string & | item, | |
const std::string & | status | |||
) | const [private] |
Helper for sending QuestDescriptions as Notifications.
This method is a helper for sending QuestDescriptions as Notifications.
item | The item the QuestDescription is for. | |
status | The status the QuestDescription us for. |
References COUT, orxonox::QuestNotification::send(), and title_.
bool orxonox::QuestDescription::sendAddHintNotification | ( | void | ) | const [inline] |
Sends a Notification displaying that a QuestHint was added.
Referenced by orxonox::QuestHint::setActive().
bool orxonox::QuestDescription::sendAddQuestNotification | ( | void | ) | const [inline] |
Sends a Notification displaying that a Quest was added.
Referenced by orxonox::Quest::start().
bool orxonox::QuestDescription::sendCompleteQuestNotification | ( | void | ) | const [inline] |
Sends a Notification displaying that a Quest was completed.
Referenced by orxonox::Quest::complete().
bool orxonox::QuestDescription::sendFailQuestNotification | ( | void | ) | const [inline] |
Sends a Notification displaying that a Quest was failed.
Referenced by orxonox::Quest::fail().
void orxonox::QuestDescription::setCompleteMessage | ( | const std::string & | message | ) | [inline, private] |
Sets the complete message.
message | The complete message to be set. |
Referenced by XMLPort().
void orxonox::QuestDescription::setDescription | ( | const std::string & | description | ) | [inline, private] |
Sets the description text.
description | The description text to be set. |
Referenced by XMLPort().
void orxonox::QuestDescription::setFailMessage | ( | const std::string & | message | ) | [inline, private] |
void orxonox::QuestDescription::setTitle | ( | const std::string & | title | ) | [inline, private] |
void orxonox::QuestDescription::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
Method for creating a QuestDescription object through XML.
Reimplemented from orxonox::BaseObject.
References COUT, getCompleteMessage(), getDescription(), getFailMessage(), getTitle(), setCompleteMessage(), setDescription(), setFailMessage(), setTitle(), SUPER, and XMLPortParam.
The message displayed when the Quest is completed.
The message displayed when the Quest is failed.
std::string orxonox::QuestDescription::title_ [private] |