orxonox::QuestDescription Class Reference

This class is a description of a QuestItem. It holds a title and a description. More...

#include <src/orxonox/objects/quest/QuestDescription.h>

Inheritance diagram for orxonox::QuestDescription:

orxonox::BaseObject orxonox::OrxonoxClass

List of all members.

Public Member Functions

const std::stringgetCompleteMessage (void) const
 Returns the complete message.
const std::stringgetDescription (void) const
 Returns the description text.
const std::stringgetFailMessage (void) const
 Returns the fail message.
const std::stringgetTitle (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.


Detailed Description

This class is a description of a QuestItem. It holds a title and a description.

Creating a QuestDescription through XML goes as follows:

<QuestDescription title="Title" description="Description Text" failmessage="You fail." completemessage="You win!">

Author:
Damian 'Mozork' Frick

Constructor & Destructor Documentation

orxonox::QuestDescription::QuestDescription ( BaseObject creator  ) 

Constructor. Registers and initializes the object.

References description_, RegisterObject, and title_.

orxonox::QuestDescription::~QuestDescription (  )  [virtual]

Destructor.


Member Function Documentation

const std::string& orxonox::QuestDescription::getCompleteMessage ( void   )  const [inline]

Returns the complete message.

Returns:
Returns a string containing the complete message of the QuestDescription.

Referenced by XMLPort().

const std::string& orxonox::QuestDescription::getDescription ( void   )  const [inline]

Returns the description text.

Returns:
Returns a string containing the description text of the QuestDescription.

Referenced by orxonox::QuestManager::addHints(), and XMLPort().

const std::string& orxonox::QuestDescription::getFailMessage ( void   )  const [inline]

Returns the fail message.

Returns:
Returns a string containing the fail message of the QuestDescription.

Referenced by XMLPort().

const std::string& orxonox::QuestDescription::getTitle ( void   )  const [inline]

Returns the title.

Returns:
Returns a string containing the title of the QuestDescription.

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.

Parameters:
item The item the QuestDescription is for.
status The status the QuestDescription us for.
Returns:
Returns true if successful.
Todo:
Make sure the messages meet the conditions.

References COUT, orxonox::QuestNotification::send(), and title_.

bool orxonox::QuestDescription::sendAddHintNotification ( void   )  const [inline]

Sends a Notification displaying that a QuestHint was added.

Returns:
Returns true if successful.

Referenced by orxonox::QuestHint::setActive().

bool orxonox::QuestDescription::sendAddQuestNotification ( void   )  const [inline]

Sends a Notification displaying that a Quest was added.

Returns:
Returns true if successful.

Referenced by orxonox::Quest::start().

bool orxonox::QuestDescription::sendCompleteQuestNotification ( void   )  const [inline]

Sends a Notification displaying that a Quest was completed.

Returns:
Returns true if successful.

Referenced by orxonox::Quest::complete().

bool orxonox::QuestDescription::sendFailQuestNotification ( void   )  const [inline]

Sends a Notification displaying that a Quest was failed.

Returns:
Returns true if successful.

Referenced by orxonox::Quest::fail().

void orxonox::QuestDescription::setCompleteMessage ( const std::string message  )  [inline, private]

Sets the complete message.

Parameters:
message The complete message to be set.

Referenced by XMLPort().

void orxonox::QuestDescription::setDescription ( const std::string description  )  [inline, private]

Sets the description text.

Parameters:
description The description text to be set.

Referenced by XMLPort().

void orxonox::QuestDescription::setFailMessage ( const std::string message  )  [inline, private]

Sets the fail message.

Parameters:
message The fail message to be set.

Referenced by XMLPort().

void orxonox::QuestDescription::setTitle ( const std::string title  )  [inline, private]

Sets the title.

Parameters:
title The title to be set.

Referenced by XMLPort().

void orxonox::QuestDescription::XMLPort ( Element &  xmlelement,
XMLPort::Mode  mode 
) [virtual]


Member Data Documentation

The message displayed when the Quest is completed.

The description.

Referenced by QuestDescription().

The message displayed when the Quest is failed.

The title.

Referenced by notificationHelper(), and QuestDescription().


The documentation for this class was generated from the following files:

Generated on Tue Jul 28 16:22:58 2009 for Orxonox by  doxygen 1.5.6